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:
@@ -886,8 +886,10 @@ def playlists(data, req, only_json: bool = False):
|
||||
|
||||
plid = data[3]
|
||||
|
||||
if len(plid) not in (34, 36):
|
||||
print("error(playlists): len(plid) is not 34 or 36...!")
|
||||
# no info about what length can playlists be
|
||||
# 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.)"}
|
||||
if only_json:
|
||||
return response
|
||||
|
||||
Reference in New Issue
Block a user