XBMCnfoTVImporter.bundle
XBMCnfoTVImporter.bundle copied to clipboard
Sonarr v3 adding <tag> </tag> lines in tvshow.nfo, causing duplicate show entries in Plex for each tag
@gboudreau
XBMCnfoTVImporter (V 1.1-93)
Host OS: UnRAID 6.8.3 Plex Install Type: Docker Docker version 19.03.5, build 633a0ea838 Plex Server version: 1.21.1.3876 Plex docker repo: https://registry.hub.docker.com/r/binhex/arch-plex/
Issue
In Sonarr v3, when using the Kodi (XBMC) / Emby Metadata option, it looks like they are now adding into the tvshow.nfo file, a separate entry for each Sonarr tag that is assigned for that show. This then results in XBMCnfoTVImporter to create duplicate show entries in Plex, with the names of each tag.
Example:
Sonarr v3 show with tags assigned
Sonarr v3 metadata agent
Resulting duplicate show entries in Plex
Suggested solution?
Hardcode in to ignore the
Workarounds?
- Least painful = disable metadata agent in Sonarr and use a different metadata scraper like TinyMM that doesn't include the
lines in NFO - Quite painful = keep using Sonarr metadata agent, then create a script that recursively scans all tvshow.nfo files and removes any lines beginning with
. - Most painful - Not use any local NFO and not use XMBCnfo* ....nooooooooooooooo! ;)
NOTE: Radarr v3 doesn't seem to be adding in the same
Hopefully this is enough info for you, let me know if you need/want any more.
Cheers,
blade
OK so just an update to this, I have also just tested with TinyMM, and that too seems to add in lines with
Here is the TinyMM entries
Here is the duplicate entries in Plex for each line in the tvshow.nfo
I tried unticking the tag option in TinyMM, however the tags are still added to the NFO, they must be default tags or something.
OK so another update ... I did some manual entry of the
Another update
I have tested all 4 scrapers in TinyMM and also Emby's own scraper and they are all adding in the
Another issue is that once Plex scans in a show that has duplicate entries cause by tags, you can't just do a Refresh Metadata to remove the duplicates, as they are now collection entries. You need to remove each collection entry one at a time.
As a quick very dirty workaround, I have spun up a one liner to scan for NFO files that contain lines with
One liner: 'find /foldername/ -type f -name '.nfo' -print -exec sed -i -e '/
The command runs pretty quick (well at least on Linux), so a workaround is to have the script run every 10mins and have Plex update every couple of hours instead or even once per day. Remember the duplicate issue will only happen for new TV shows that are added, not for new episodes. However if your NFO gets overwritten with the
Now I also went a step further and spun up a docker container with MediaElch ... I have not used it before, but I was pretty impressed within only a few minutes, especially with the level customization you can make to what and how you want to scrape each piece of data. The other good thing is it looks like it has very active development - https://mediaelch.github.io/mediaelch-blog/posts/
One really cool thing is you can set custom scraper options, and specify which source you want to get each piece of info from:
So in regards to the
Tested it and XBMCnfoTVImporter picks it up properly very quickly, as it doesn't have any
The only other problem is that MediaElch doesn't run unattended, you have to run the scraper manually ... It syncs to Kodi which I believe just tells Kodi to do a refresh after each scrape is finished, but MediaElch still has to be run manually.
Obviously this is a VERY long winded workaround, so I am hoping having the ability to ignore
I made a quick fix in my fork https://github.com/SweetMNM/XBMCnfoTVImporter.bundle
It will now by default not create collections from all of the tags but you can still do so if you wish by toggling options in the agent settings or the library advanced settings
@SweetMNM you should make a PR with your changes. They look fine :)
But, make sure to do it on it's own branch, PRs can take some time to get pulled in ;)
I made this PR with the change in question: https://github.com/gboudreau/XBMCnfoTVImporter.bundle/pull/128 It was irritating me as wall