ZeroQI / YouTube-Agent.bundle

Plex Metadata Agent for Movies and TV Series libraries
452 stars 43 forks source link

Episode order is completely wrong #69

Closed LeendertPlas closed 3 years ago

LeendertPlas commented 3 years ago

While the episodes are matched correctly, the episode number and the season is completely wrong. image

For example, this picture is from 2017 and is assigned season 2021 and episode 140. D:\Youtube\video\Wendover Productions [UC9RM-iSvTu1uPJb8X5yp3EQ]\wendover-productions_2017-03-28_wendover-productions_russias-geography-problem_1080p-avc1-opus_[v3C_5bsdQWg].mkv image

This picture is from 2018 and is assinged 2021 and episode 139. D:\Youtube\video\Wendover Productions [UC9RM-iSvTu1uPJb8X5yp3EQ]\wendover-productions_2018-07-17_wendover-productions_how-airports-make-money_1080p-avc1-opus_[wdU1WTBJMl0].mkv image

It doesn't make any sense why it would be assigned this way.

ZeroQI commented 3 years ago

The season and episode number are chosen by the SCANNER https://github.com/ZeroQI/Absolute-Series-Scanner/blob/master/Scanners/Series/Absolute%20Series%20Scanner.py

Youtube is line 864-903 and 967-979 for channel numbering

if you set up SW_YOUTUBE_DATE line 155 to True, Sand label your files starting with "yyyy-mm-dd" "yyyy.mm.dd" "yyyy mm dd" or "yyyymmdd", it will work better otherwise files are ordered by creation date on disk, so as the year is wrong, the file creation date in filesystem is wrong possibly, you probably didn't set youtubedl correctly as it is made to match the file system file creation date to the youtube upload time...

Or use Playlist as the numbering will be correct then

LeendertPlas commented 3 years ago

Thank you, that seems like something i'm able to change!

Critical-Impact commented 3 years ago

I ran into this as well, it appears that youtube-dl will sometimes not set the creation date on videos to the correct date. Now from what I've read it's because it's the last modified date on the video and not the actual uploaded date. As such sometimes videos from say 2017 will show up in 2021. I've toggled on SW_YOUTUBE_DATE and then used %(upload_date)s instead of the playlist id. I'm not 100% sure this is correct but it's my best guess as to why it only sometimes breaks.