Absolute-Series-Scanner icon indicating copy to clipboard operation
Absolute-Series-Scanner copied to clipboard

Playlist.info.json ignored if using a youtube.id file instead of specifying the playlist ID directly in the playlist folder

Open herrenP opened this issue 2 years ago • 2 comments

Platform

Operating system and version: Synology NAS DSJ921+ / DSM 7.1-42661 Update 3

Plex version: 1.28.0.5999-7000

Expected Behavior

Playlist.info.json should be detected and read

Current Behavior

Playlist.info.json is not detected

Steps to Reproduce

  1. Create a youtube.id file and insert a playlist ID (for example [PL2B009153AC977F90])
  2. Create a Playlist.info.json (in my case youtube-dl -J --dump-single-json > Playlist.info.json https://www.youtube.com/playlist?list=PL2B009153AC977F90)
  3. Make sure playlist folder does not have a playlist ID in it's name (in my case I used AVGN as folder name)
  4. Scan library files

Additional information

Output from "scanner.log" when I am using playlist ID in folder name:

Call: "Root", path: "Cinemassacre/AVGN [PL2B009153AC977F90]", folder_show: "AVGN [PL2B009153AC977F90]", dirs (0), files (203)
=============================================================================================================================================================
-------------------------------------------------------------------------------------------------------------------------------------------------------------
=============================================================================================================================================================
Forced ID (series folder) - source: "youtube", id: "PL2B009153AC977F90"
YouTube-dl Playlist file load Cinemassacre/AVGN [PL2B009153AC977F90]/Playlist.info.json
"AVGN [youtube-PL2B009153AC977F90]" s01e        14                         "YouTube" "3DO Interactive Multiplayer - Angry Video Game Nerd (AVGN)" "3DO Interactive Multiplayer - Angry Video Game Nerd (AVGN) [YPoBMzAkZZM].mp4"
...

Output from "scanner.log" when I am using a youtube.id file:

Call: "Root", path: "Cinemassacre/AVGN", folder_show: "AVGN", dirs (0), files (203)
=============================================================================================================================================================
-------------------------------------------------------------------------------------------------------------------------------------------------------------
=============================================================================================================================================================
Forced ID (source file) - source: "youtube", id: "[PL2B009153AC977F90]"
"AVGN [youtube-PL2B009153AC977F90]" s01e        52                         "Word Search" "(Nes) - (Avgn)" "Action 52 (NES) - Angry Video Game Nerd (AVGN) [a4QBeADNM34].mp4"
...

herrenP avatar Aug 06 '22 22:08 herrenP

Thanks for the very good reporting. Could you please attach the Playlist.info.json file? I do not use Plex anymore, and I believe I can change the search function to no longer require id file or playlist entry on foldername...

ZeroQI avatar Aug 07 '22 06:08 ZeroQI

Sure. Here it is: Playlist.info.json.zip

herrenP avatar Aug 07 '22 07:08 herrenP

https://github.com/ZeroQI/Absolute-Series-Scanner/blob/master/Scanners/Series/Absolute%20Series%20Scanner.py#L994 It's between 994 and 1035, json file too big, crashes notepad++ old versions...

weird, line 1025 log output is not seen when using forced id in series foldername, so not using the latest code Log.info(u'---- totalResults: {}, reverse: {}, os.listdir(os.path.join(root, path): {}'.format(totalResults, reverse, os.listdir(os.path.join(root, path))))

Since the list is a dict, it is in unknown order when imported, so needs sorting, replace line 1005 with:

          for rank, video in enumerate(sorted(json_playlist, key = lambda i: (i["upload_date"]), start=1):

ZeroQI avatar Nov 29 '22 01:11 ZeroQI

Did the fix work as expected ?

ZeroQI avatar Sep 13 '23 16:09 ZeroQI

Weird, I have missed your response from last year. I've unfortunately moved on from Plex to Jellyfin since a while back.

herrenP avatar Sep 14 '23 08:09 herrenP

https://github.com/ZeroQI/Absolute-Series-Scanner/issues/421

ZeroQI avatar Jan 08 '24 16:01 ZeroQI