Skip to content

Commit

Permalink
fix cli 2
Browse files Browse the repository at this point in the history
  • Loading branch information
justin025 committed Nov 18, 2024
1 parent da21312 commit 6f0e1ec
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/onthespot/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,7 @@ def run(self):
item = pending.pop(item_id)
token = get_account_token()
item_metadata = globals()[f"{item['item_service']}_get_{item['item_type']}_metadata"](token, item['item_id'])
if item['parent_category'] == 'playlist':
playlist_name = item['playlist_name']
playlist_by = item['playlist_by']
else:
playlist_name = ''
playlist_by = ''

download_queue[item['item_id']] = {
"item_service": item["item_service"],
"item_type": item["item_type"],
Expand All @@ -47,9 +42,9 @@ def run(self):
"file_path": None,
"item_name": item_metadata["title"],
"item_by": item_metadata["artists"],
'is_playlist_item': item['is_playlist_item'],
'playlist_name': playlist_name,
'playlist_by': playlist_by,
'parent_category': item['parent_category'],
'playlist_name': item.get('playlist_name', ''),
'playlist_by': item.get('playlist_by', ''),
'playlist_number': item.get('playlist_number', '')
}
time.sleep(1)
Expand Down

0 comments on commit 6f0e1ec

Please sign in to comment.