slight improvements

This commit is contained in:
2022-05-20 15:25:56 -05:00
parent e93914745e
commit b0ff92e541
3 changed files with 13 additions and 36 deletions

View File

@@ -1,7 +1,6 @@
import json
import datetime as dt
import os
from dpath import util
import sys
import numpy as np
from ytmusicapi import YTMusic
ytmusic = YTMusic("config.json")
@@ -9,8 +8,12 @@ ytmusic = YTMusic("config.json")
# I tried the "interactive" authentication but wasn't having luck with it
# Add the name of the playlist you want to shuffle here
to_shuffle = 'Sleep'
# Add the name of the playlist you want to shuffle here, or provide it as a command line argument
if sys.argv[1]:
to_shuffle = str(sys.argv[1])
else:
to_shuffle = 'playlist name here'
def get_playlistID(name):
@@ -48,5 +51,4 @@ shuffled['description'] = 'Shuffled ' + now
shuffled['video_ids'] = track_ids
shuffled['privacy_status'] = privacy
ytmusic.create_playlist(**shuffled)
print(f'The playlist called \"{to_shuffle}\" has been shuffled!')
#TODO and UI: auth and playlist name
print(f'The playlist called \"{to_shuffle}\" has been shuffled!')