fix: don't check for plid length

playlist ids can be of many lengths (at least 18, 34 and 36) and there
doesn't seem to be a rule for how many characters encode a typical
(non-mix, video-related) playlist. such validation requires more
research.
This commit is contained in:
2025-09-27 20:41:07 +02:00
parent b98aa718b0
commit e6d32091e1

View File

@@ -886,8 +886,10 @@ def playlists(data, req, only_json: bool = False):
plid = data[3] plid = data[3]
if len(plid) not in (34, 36): # no info about what length can playlists be
print("error(playlists): len(plid) is not 34 or 36...!") # settle for a basic sanity check instead
# if len(plid) not in (18, 34, 36):
if not plid.startswith("PL"):
response = {"error": "Only standard playlists are currently supported (no mixes, video-based playlists, etc.)"} response = {"error": "Only standard playlists are currently supported (no mixes, video-based playlists, etc.)"}
if only_json: if only_json:
return response return response