validate playlist ids in playlist methods
additionally small code quality improvements
This commit is contained in:
parent
84af92a442
commit
5ae470e260
6 changed files with 29 additions and 26 deletions
|
|
@ -138,6 +138,10 @@ def validate_response(response, per_page, limit, current_count):
|
|||
return len(response['parsed']) >= expected_items_count
|
||||
|
||||
|
||||
def validate_playlist_id(playlistId):
|
||||
return playlistId if not playlistId.startswith("VL") else playlistId[2:]
|
||||
|
||||
|
||||
def nav(root, items, none_if_absent=False):
|
||||
"""Access a nested object in root by item sequence."""
|
||||
try:
|
||||
|
|
|
|||
Loading…
Reference in a new issue