Bug: DateAdded incorrectly used for Series release date
Opened this issue · 2 comments
First of all, thanks for an amazing plugin!
I just used it to fix metadata with TinyMediaManager for my entire library and override various Plex shortcomings which have annoyed me for years.
Set TMM to export XMBC format nfo files, imported to Plex with this plugin.
Awesome.
Request
But. It seems the dateadded
field is used as release date / premiere / air date? Would it be possible to decouple dateadded
from those, as it is incorrect?
Also, it might make sense to use the year
field instead and perhaps pad it with "01-01" so it works in Plex?
If none of the above are doable, perhaps make the release date / air date fields optional so it is possible to avoid the incorrect data? Just this would make a mountain of difference.
tldr;
Difference between "date added" and release dates
"dateadded" is information showing when I added something to my library - meaning the item is new to me. Then I can sort the library by "recently added" shows or episodes.
This does not mean the tv show just aired and is new to the world, which is what the release date / premiered / air date fields are for. These fields are published facts. Big difference between "date added" and release date fields.
Unexpected results from the plugin's current behavior
I just started using TMM and exported nfo files for the entire media library:
- All shows except one have a correct
year
field in the nfo, but this field is sadly ignored. - A handful of them apparently were able to get a release date field that qualified higher than the
dateadded
field and are ok. - 95% of the tv shows got the existing (correct) release data overridden by a date within the last week, coming from the
dateadded
field. As that is when I started using TMM (sadpanda).
This was unexpected.
The way the plugin behaves now, I could add the original "Beverly Hills 90210" today and it would get a release date of today, even though it is 30 years old.
Context
I tracked down a couple of posts on Plex forum documenting the behavior:
https://forums.plex.tv/t/metadata-agents-for-exported-xbmc-library/15430/362
https://forums.plex.tv/t/xbmc-tv-nfo-importer-not-working-frodo-standards/48741/17
Discussions on Kodi here:
https://forum.kodi.tv/showthread.php?tid=293290&pid=2557820#pid2557820
Workaround
Currently I do this:
- Stop Plex
- Update nfo files for the entire library with TMM
- Run this in my Plex mediafolder, to remove the
dateadded
field:find . -name "*.nfo" -exec sed -i '' /dateadded/d {} +
- Start Plex
- Refresh all metadata in Plex
Oh noes.. Would it be correct that the plugin fills in the release / air date, even if the field is not present in the .nfo file?
I just manually deleted the erroneous 2019 date out of 75% of my library. Running "refresh all metadata" in the hope to get the right year back again as it was before (from tvdb or similar). And now it is filling up with 2019 everywhere once again...
Normally the <aired></aired>
tag will be used to set the "originally available at" date. If this is not found the <premiered></premiered>
tag will be used instead. If both doesn't exist, it falls back to <dateadded></dateadded>
as a last resort. If you don't want that, please use the other fields in your nfo files.
I don't use plex any longer, so I don't know and can't check if plex has a separate database field for dateadded. If so, it would of course make sense to change how it works now. Pull requests are welcome, but might generate an outcry by other users, if the behaviour they expect is changed.