Skip to content

YouTube Playlist.info.json file causes error if there are private videos in a playlist #520

Description

@noemartinez

Platform

Operating system and version: Ubuntu 24.04
Plex version: 1.42.1.10060

Expected Behavior

Playlist information should be loaded from Playlist.info.json even when there's some private videos (which apparently show up as null entries) in the YouTube playlist.

Current Behavior

The scanner crashes due to null entries in the JSON file

Steps to Reproduce

  1. Inside the playlist folder, write the playlist info JSON file for this playlist which has 2 private videos yt-dlp --dump-single-json 'https://www.youtube.com/watch?v=5bRfSzbdfcU&list=PLJ49NV73ttrtNfEURR5YrckZsdDjniSjT' > Playlist.info.json
  2. Write out the episodes with yt-dlp --write-info-json -o '%(upload_date>%Y_%m_%d)s - %(title)s - [%(display_id)s].%(ext)s' 'https://www.youtube.com/watch?v=Eqin7y9_-IQ&list=PL_0BB1yzZzOe2-MgLE0npPnjgl-jDBW1i'
  3. Add the library to plex, and notice this error in /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Logs/Plex Media Scanner.log:
Sep 22, 2025 21:52:14.983 [123668494532352] ERROR - Error in Python: Running scanner:
Traceback (most recent call last):
  File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Scanners/Series/Absolute Series Scanner.py", line 1008, in Scan
    for rank, video in enumerate(sorted(json_playlist, key = lambda i: (i["upload_date"])), start=1):
  File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Scanners/Series/Absolute Series Scanner.py", line 1008, in <lambda>
    for rank, video in enumerate(sorted(json_playlist, key = lambda i: (i["upload_date"])), start=1):
TypeError: 'NoneType' object has no attribute '__getitem__'

Additional information

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions