Closed Zhiro90 closed 4 years ago
"If a file is not showing in plex or showing at the wrong season and/or episode number, or is not passing through the forced id, then it is a scanner issue."
If you use a channel id [youtube-UC... or youtube-HC-...] then it will use the year as season
https://github.com/ZeroQI/Absolute-Series-Scanner/blob/master/Scanners/Series/Absolute%20Series%20Scanner.py Lines 968-978
### YouTube Channel numbering ###
if source.startswith('youtube') and id.startswith('UC'):
filename, folder_season = os.path.basename(file), 0 # sometime youtube-dl gets bad upload date and sets date to NA, mark these as season 0 (specials) so user notices and can fix if wanted
if SW_YOUTUBE_DATE:
match = re.match(r"([12]\d{3}[-. ]?(0[1-9]|1[0-2])[-. ]?(0[1-9]|[12]\d|3[01]))",filename)
if match: folder_season = int(filename[0:4]) # file starts with "yyyy-mm-dd" "yyyy.mm.dd" "yyyy mm dd" or "yyyymmdd", so take first four digits as the season year
Log.info('Youtube folder season date {}, season: {}, file: {}'.format("regex" if match else "error set season 0", folder_season, filename))
else:
folder_season = time.gmtime(os.path.getmtime(os.path.join(root, path, filename)))[0] # no info from file or flag not set, revert to original way of reading the file date
Log.info('Youtube folder season gmtime, season: {}, file: {}'.format(folder_season, filename))
ep = files_per_date.index(filename)+1 if filename in files_per_date else 0
standard_holding.append([os.path.join(root, path, filename), root, path, folder_show if id in folder_show else folder_show+'['+id+']', int(folder_season if folder_season is not None else 1), ep, filename, folder_season, ep, 'YouTube', tvdb_mapping, unknown_series_length, offset_season, offset_episode, mappingList])
continue
There is a youtube2 mode you can use [youtube2-xxxxx] mode for playlist to use year as season. Source: https://forums.plex.tv/t/rel-youtube-metadata-agent/44574/189
PS: i can't find the code in ASS or YouTube agent for that function, so if you confirm it works, will add to the readme
Before bothering you again, I read various threads and still haven't found a way to make seasons by year work
Absolute series scanner and youtube agent were updated. Plex danced everytime. Api is mine and working. PMS 4.34.4, also tried with previous version
changed SW_YOUTUBE_DATE to true, renamed with date at the beginning of every video. Metadata correctly retrieved. No grouping by year. This implies a scanner issue i believe.
youtube2 mode results in the playlist info not being detected (shown as "C:\My\Path\Lybrary\Show" instead of simply "Show") but the videos metadata is still being correctly applied. The logs show youtube2 is detected as source and the playlist is identified. But the playlist remains Without any data itself.
Allowing "json with api backup" in the settings, results in nothing being tagged. Only api works.
Possibly related, I'm having the same issue some users recently had in the thread you linked. Can't create channel folder (Channel [ID]\Playlist [ID]\DATE Video [ID]) as it fuses channel and playlists. Also tried youtube2 on channel at the same time as playlist. Still fused.
Currently settled with "Channel\Playlist [ID]\DATE Video [ID]". No youtube2, edited scanner. This way i have correctly shown playlist and video metadata, but without automatic collection for show and without episodes grouped by year.
I don't know if this is the right place to tell you this. Let me know which logs you need.
I would need the ASS scanner logs located im the Plex logs folder, there will be ASS scanner logs folder if you use my scanner for the library
The channel is "displaced gamers". Inside its folder are two playlist folders: "Gaming tech talk" and "facets of the gem". Current log will probably show everything works because i removed channel ID and youtube2, so here are the logs for my attempts at youtube2 mode Displaced Gamers [youtube2-UCWoSKWs8h6lFdiEDAjuIfpA].scanner.log Displaced Gamers [youtube2-UCWoSKWs8h6lFdiEDAjuIfpA].filelist.log
Let me know if you need any other log or want me to simulate adding them again
Edit: Added more youtube2 logs (playlist only) Displaced Gamers [UCWoSKWs8h6lFdiEDAjuIfpA].scanner.log Displaced Gamers [UCWoSKWs8h6lFdiEDAjuIfpA].filelist.log
"If you use a channel id [youtube-UC... or youtube-HC-...] then it will use the year as season" (unless you create a subfolder with the playlist id in which case the id isn't UC or HC anymore...)
This won't create seasons per year: 'Displaced Gamers [youtube2-UCWoSKWs8h6lFdiEDAjuIfpA]\Facets of the Gem [youtube2-PLn5sTGew1WGAbk6dhmNpsf9B2KmfCP7y0]' This will: 'Displaced Gamers -Facets of the Gem [youtube2-UCWoSKWs8h6lFdiEDAjuIfpA]'
Got it to work thanks to you! I needed to put the folders in the root directory, any folder broke the youtube-2 functionality. Thanks again!
For some shows that I've downloaded, their creators haven't used the "season and episode" feature on youtube so they're only a long playlist. Is there a way to manually create and define a season? or at least to group the episodes by year?
Great agent btw. Congrats!
Edit: reading through the changelog about the json reading feature, is it possible to do it through manually editing the json?