|
@@ -10,7 +10,7 @@ if len(sys.argv) != 4:
|
|
lidarr_server, lidarr_api_key, music_folder = sys.argv[1:4]
|
|
lidarr_server, lidarr_api_key, music_folder = sys.argv[1:4]
|
|
|
|
|
|
resp = requests.get(
|
|
resp = requests.get(
|
|
- f"http://{lidarr_server}/api/v1/artist",
|
|
|
|
|
|
+ f"{lidarr_server}/api/v1/artist",
|
|
headers={"Authorization": f"Bearer {lidarr_api_key}"}
|
|
headers={"Authorization": f"Bearer {lidarr_api_key}"}
|
|
)
|
|
)
|
|
artists = resp.json()
|
|
artists = resp.json()
|
|
@@ -20,4 +20,4 @@ for artist in artists:
|
|
artist_path = music_folder + artist_name
|
|
artist_path = music_folder + artist_name
|
|
if ('/' not in artist_name) and (not os.path.exists(artist_path)):
|
|
if ('/' not in artist_name) and (not os.path.exists(artist_path)):
|
|
print("Creating ", artist_path)
|
|
print("Creating ", artist_path)
|
|
- os.mkdir(artist_path)
|
|
|
|
|
|
+ os.mkdir(artist_path)
|