slight improvements
This commit is contained in:
14
shuffler.py
14
shuffler.py
@@ -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!')
|
Reference in New Issue
Block a user