I will get that updated and clarified.
You were not using the XBMCnfo plugins, were you?
I followed these steps but instead of nuking my existing install, I created a new config folder to mount into the docker container. Then I created the Library/Application Support/Plex Media Server subfolders in that new folder, copied .LocalAdminToken and Preferences.xml over and started up the new instance. There I created the new custom agents and recreated my previous libraries exactly.
The resulting libraries confirmed what I was already saying about my file structure not being the issue. Of my >8k movies, only 30 were not matched (and these turned out to mainly be tv miniseries where the parts were released as one file so I mistook them for movies).
Versions, local artwork as well as rotten tomatoes reviews from plex all showed up for the old movies that my main instance refuses to match.
However this did not yield the expected results.
I used this command to export the watched data etc. from my old db.
echo ".dump metadata_item_settings" ".dump metadata_item_views" ".dump accounts" ".dump devices" ".dump statistics_media" ".dump statistics_bandwidth" | sqlite3 com.plexapp.plugins.library.db | grep -v TABLE | grep -v INDEX > settings.sql
Followed by this command to import it into the new db (after manually dropping the tables in question in the new db like you outlined).
cat settings.sql | sqlite3 com.plexapp.plugins.library.db
Confirmed that the tables got populated and started up Plex again.
However the only imported watched data was for the few movies and tv shows that I added after I had switched the metadata agent from XBMCnfo to the new custom agent on my main instance.
Matching with the XBMCnfo plugins yields different IDs for the movies/episodes than matching against the āPlex Movieā agent and Plex only seems to use the id when checking the āwatchedā status.
A look in the metadata_item_settings table of the db of my main instance confirms this.
Listing the oldest watched entries yields xbmc ids:
sqlite> SELECT * FROM metadata_item_settings limit 15;
id|account_id|guid|rating|view_offset|view_count|last_viewed_at|created_at|updated_at|skip_count|last_skipped_at|changed_at|extra_data|last_rated_at
1|1|com.plexapp.agents.xbmcnfo://tt0062687?lang=xn|||3|1692506224|1489431846|1692506224|0||8367810652211399878||
2|1|com.plexapp.agents.xbmcnfo://tt0092067?lang=xn|||10|1721687022|1489432753|1721687022|3|1679549857|8367810652216066844||
3|1|com.plexapp.agents.xbmcnfotv://70350/1/1?lang=xn|||2|1548621747|1489433386|1548621747|0||615471||
4|1|com.plexapp.agents.xbmcnfotv://70350/1?lang=xn|||2|1548621739|1489433386|1548621739|0||615469||
5|1|com.plexapp.agents.xbmcnfotv://70350?lang=xn|||2|1548621739|1489433386|1548621739|0||615470||
6|1|com.plexapp.agents.xbmcnfo://tt0371552?lang=xn|||1|1489523889|1489433682|1489523889|0||30356||
7|12883036|com.plexapp.agents.xbmcnfo://tt0096842?lang=xn||188185|0|1489569599|1489448542|1489569599|0||32929||
8|12605295|com.plexapp.agents.xbmcnfo://tt0816692?lang=xn|||1|1489486914|1489486061|1489486914|0||28691||
9|1|com.plexapp.agents.xbmcnfo://tt0119488?lang=xn|||0||1489487870|1489516488|0||30308||
10|12890896|com.plexapp.agents.xbmcnfo://tt0450232?lang=xn||711490|1|1489516741|1489515811|1489516741|0||30350||
11|12890896|com.plexapp.agents.xbmcnfo://tt0320661?lang=xn|||4|1760455529|1489516607|1760455529|0||8367810652222575645||
12|12892818|com.plexapp.agents.xbmcnfotv://70350/1/1?lang=xn|||2|1489779467|1489529532|1489779467|0||33289||
13|12892818|com.plexapp.agents.xbmcnfotv://70350/1?lang=xn|||3|1489781746|1489529532|1489781746|0||33831||
14|12892818|com.plexapp.agents.xbmcnfotv://70350?lang=xn|||3|1489781746|1489529532|1489781746|0||33832||
15|12892818|com.plexapp.agents.xbmcnfotv://70350/1/2?lang=xn||193442|1|1489781746|1489532614|1489781746|0||33830||
Which neatly include the imdb id for movies and tvdb id for tv shows.
Meanwhile the last watched entries of media added after I switched the metadata agent yield Plex internal ids (I donāt know where to look them up if itās possible at all):
sqlite> SELECT * FROM metadata_item_settings order by id desc limit 15;
id|account_id|guid|rating|view_offset|view_count|last_viewed_at|created_at|updated_at|skip_count|last_skipped_at|changed_at|extra_data|last_rated_at
47870|1|plex://episode/696f5dac6fa5d61bd97c925d|||1|1774810512||1774810512|0||8367810652223078726||
47869|1|plex://episode/5fbd72923ae781002dd156a7|||1|1774806282||1774806282|0||8367810652223078533|{"pv:bulkPlayed":"1774806282","url":"pv%3AbulkPlayed=1774806282"}|
47868|1|plex://episode/5fbd72913ae781002dd1569f|||1|1774806282||1774806282|0||8367810652223078532|{"pv:bulkPlayed":"1774806282","url":"pv%3AbulkPlayed=1774806282"}|
47867|1|plex://episode/5fbd72903ae781002dd15696|||1|1774806282||1774806282|0||8367810652223078531|{"pv:bulkPlayed":"1774806282","url":"pv%3AbulkPlayed=1774806282"}|
47866|1|plex://episode/5fbd728e3ae781002dd15688|||1|1774806282||1774806282|0||8367810652223078530|{"pv:bulkPlayed":"1774806282","url":"pv%3AbulkPlayed=1774806282"}|
47865|1|plex://episode/5fbd728c3ae781002dd1567a|||1|1774806282||1774806282|0||8367810652223078529|{"pv:bulkPlayed":"1774806282","url":"pv%3AbulkPlayed=1774806282"}|
47864|1|plex://episode/5fbd728a3ae781002dd1566c|||1|1774806282||1774806282|0||8367810652223078528|{"pv:bulkPlayed":"1774806282","url":"pv%3AbulkPlayed=1774806282"}|
47863|1|plex://episode/5fbd72893ae781002dd15662|||1|1774806282||1774806282|0||8367810652223078527|{"pv:bulkPlayed":"1774806282","url":"pv%3AbulkPlayed=1774806282"}|
47862|1|plex://episode/5fbd72893ae781002dd1565a|||1|1774806282||1774806282|0||8367810652223078526|{"pv:bulkPlayed":"1774806282","url":"pv%3AbulkPlayed=1774806282"}|
47861|1|plex://episode/5fbd72883ae781002dd15652|||1|1774806282||1774806282|0||8367810652223078525|{"pv:bulkPlayed":"1774806282","url":"pv%3AbulkPlayed=1774806282"}|
47860|1|plex://episode/5fbd72883ae781002dd1564a|||1|1774806282||1774806282|0||8367810652223078524|{"pv:bulkPlayed":"1774806282","url":"pv%3AbulkPlayed=1774806282"}|
47859|1|plex://episode/5fbd72873ae781002dd15642|||1|1774806282||1774806282|0||8367810652223078523|{"pv:bulkPlayed":"1774806282","url":"pv%3AbulkPlayed=1774806282"}|
47858|1|plex://episode/5fbd72863ae781002dd15637|||1|1774806282||1774806282|0||8367810652223078522|{"pv:bulkPlayed":"1774806282","url":"pv%3AbulkPlayed=1774806282"}|
47857|1|plex://episode/5fbd72863ae781002dd1562e|||1|1774806282||1774806282|0||8367810652223078521|{"pv:bulkPlayed":"1774806282","url":"pv%3AbulkPlayed=1774806282"}|
47856|1|plex://season/602e645dc9d11c002dbcb4c1|||0|||1774806282|0||8367810652223078520|{"pv:playedItemAndChildren":"1774806282","url":"pv%3AplayedItemAndChildren=1774806282"}|
Seeing that it only carried over the watched status of a few movies and episodes, I reverted the import of watched states to the new db and changed my docker compose back to mount the config folder with my main instance. For whatever reason that had lost the Library Access settings, which were a tad annoying to recreate.
So now I have 2 full dbs. My main instance that refuses to match content added with the XBMCnfo plugins and the new one that lacks the watched state for 99,9% of the content but otherwise seems to work fine.
Iām guessing thereās no easy way to match my existing watched states with XBMCnfo ids to the new plex movie/episode ids to carry over my watched status to the new library?
If thatās the case Iāll just stick to my current install and live with only new entries actually using the new agent.
Ye, I was testing that scenario exactly. It immediately matched to new agent after changing and refreshing the items. I couldnāt get it to do what was happening to you.
That question was meant for @dokuro in the context of his guide to transfer watched stats etc. between installs.
Sorry no, I have never used any external plugins with plex. I have only used the plex movie / plex series scanner & agent.
@Casual_Tea Iāll also add that it helps no end that I strictly follow the plex naming for movies and episodes. I also weekly monitor for episode changes at tmdb so that if anything changes I also change them on my media. That way Iām always 100% confident that everything is matched correctly and more importantly up to date with current online sources based on how they order episodes. Youād be amazed how much these change over time.
That way guidās always line up for me for movies and shows. Music tracks can be an additional headache due to musicbrainz relationship but not relevant for this specific topic.
This is a minor bug but Iāll report it anyhow.
I have scan my library automatically & run partial scans enabled ā¦
⦠and when using a custom agent with the order Plex Local Media -> Plex NFO Movie -> Plex Movie (primary) the local assets and NFO are ignored and not updated within plex when adding new content. I have to force refresh the item after they are scanned in for them to be picked up.
Thanks, will look into it!
Glad to see this support is finally here.
One bug to report so far:
If using Kodi formatted .NFO files the embedded urls pointing to the āimage urlā of the actors does not import. All actors come across with as blank with no profile pics. Any thoughs on how this can be addressed? Other than that , great job.
Finally thank you devs.
How did you realize that monitoring?
I found the music support in Plex extremely disappointing and lacking (multi-value support insufficient/broken, plexamp scrobbling hard-linked to the āownerā of a device, no multi-room support and other garbage) so I removed my 1m tracks library as it only bloated up the db and slowed searches down to a crawl. Using lms on the NAS, upmpdcli and snapcast on Raspberry Pis with DACs and Symfonium on Android beats the hell out of Plex performance- and featurewise. On PCs, MusicBee remains the king.
Since itās working for you: When you do this, is the internal guid in metadata_item_settings changed from the com.plexapp.agents.xbmcnfo://ttxxxxxxxx?lang=xn style to the plex://movie/xxxxxxxxxxxxxxxx style? And does Plex also remap past viewings of that movie so that the viewing history continues to work?
Example:
Princess Mononoke watched in Plex 8 times over a span of 9 years with the com.plexapp.agents.xbmcnfo://ttxxxxxxxx?lang=xn guid.
If it is then matched against Plex Movie and gets a plex://movie/xxxxxxxxxxxxxxxx guid and is watched once more, will the viewing history merge those 9 views (8 with the old guid and 1 with the new one)?
Iām asking because I was able to migrate the āwatchedā status of my old db with the XBMCnfo guids to the new db with the Plex Movie/Plex TV guids after watching a 4 hour database tutorial and with the help of ChatGPT.
However only replacing the guids in metadata_item_settings to match the new one for each file in the db and porting over devices, statistics_media and statistics_bandwidth as they are breaks the viewing history.
While having the watched state for all users and files is a great start, Iād hate to lose 9 years worth of viewing history.
I use filebot and their extended attributes (xattr). This stores local filebot attributes alongside my media files which I can then query against the online metadata providers (tmdb or tvdb). If something like title changes I can then detect it which typically can mean an episode re-ordering. This topic on the filebot forum explains what I worked out with the help of the filebot developer.
As I mentioned above, I have never used this plugin. I used the plex providers so all my guids are plex://xxxx/yyyy ones.
Thinking about it however you could as a test change on your existing server your scanner/agent from the xbmcnfo plugin to the plex provided ones, force refresh which should (in theory) migrate your watched status & played history over to their provider. Some stuff might not align but most might. Then sql export that and use it as your import. Again, totally untested as Iāve never used that third party plugin.
EDIT: It goes without saying but just in case make sure you have backups if you attempt this ![]()
This is exactly the same for me, I just canāt get extras to match for local content no matter what I do I have and readded libraries many times with the etxras with different names (mostly other directory or -other) and no matter what I do they do not show in the mobile apps.
Interesting approach. Iāve used tmm for years and this might be the first thing I hear about FileBot that sounds like something tmm canāt do.
That question was meant for @drzoidberg33. I tried to make that clear by quoting part of his message.
That is exactly what does not work for me and the initial problem I described here, hoping that it could be fixed on the Plex side.
I changed my existing libraries from XBCMnfo to custom new agents with Plex Movie/TV as primary + local data and NFO as secondary. Which works great for new stuff I add but did not change existing movies/tv shows at all. Even after a full metadata refresh or when I try to manually match these.
My tests revealed that the exact same files get matched near perfectly on a fresh install with identically configured libraries and the same custom metadata agents.
Iāve bricked 5 or 6 database (copies) until I got this
to work properly.
Iāve just been testing editions that didnāt exist when I set up my server years ago. Iām pleased to report that these editions now appear as separate entries with their own poster and metadata (extracted from their separate nfo files). If you donāt use the {edition-Some Edition} naming scheme, itās still an edition, but it wonāt have its own entry in the movie list. I like that a lot.
Star Wars exists in various editions, all of which are listed. Flatfoot in Africa exists in two editions (DVD, 1080p), but remains a single entry in the list.
However, when I search for Star Wars, I get a combined result. Iām not sure if thatās how itās supposed to be. But I think thatās a different topic that doesnāt belong here.
And thereās another problem: Tags donāt create collections (or add items) even though the tags are included in the NFO file:
<movie>
...
<tag>1001 Filme</tag>
<tag>IMDB 250</tag>
...
</movie>
Hi drzoidberg
Thank you for your hard work with NFO files and for responding on the forum.
I am sure I am making a mistake somewhere but I keep racking my brain to find out where. I just canāt get extras to show at all.
They do show in the web, and on the Android TV (old) app. But not in the new experience app at least on Android.
This isnāt the only film I have tried, nor the only set up.
You are mixing the āextras folderā method with the āfile name suffixā method to mark extras. This wonāt work in Plex, eeither with .nfo or without. If you have a subfolder for a type of extras, donāt include the extra type in the file name.
Hi OttoKerner
Thank you for your reply. I have removed the library, changed the file names as suggested and recreated the library. Again, the extras show in the web app, but they do not show in the New Experience apps.
I am really keen to get this working in Plex as I am using Jellyfin but it is not very pretty.
Looks lke this is a bug in the mobile client. Iāll file an issue for that team.
Thanks for adding this! I only just noticed its addtion a week ago, and have been testing.
I built a library and set NFO as the agent. Sorry if this was asked already: Once the library is created, do edits within PMS (such as plot, collection etc) edit the NFO? or do I need to make NFO edits outside of plex?







