Fix handling of directory type playlists in Plex (#122990)

Ignore type directory
This commit is contained in:
amccook 2024-08-01 07:24:09 -07:00 committed by GitHub
parent 4f3d624353
commit fef9c92eb7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -132,7 +132,11 @@ def browse_media( # noqa: C901
"children": [],
}
for playlist in plex_server.playlists():
if playlist.playlistType != "audio" and platform == "sonos":
if (
playlist.type != "directory"
and playlist.playlistType != "audio"
and platform == "sonos"
):
continue
try:
playlists_info["children"].append(item_payload(playlist))