Skip to content

Commit 98256c9

Browse files
Copilotekinnee
andcommitted
Clean up type hints and finalize code organization
Co-authored-by: ekinnee <1707617+ekinnee@users.noreply.github.com>
1 parent 835dde5 commit 98256c9

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

AppleMusicXmlToLidarr.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import json
66
import time
77
import logging
8-
from typing import List, Dict
8+
from typing import List, Dict, Tuple
99

1010
logging.basicConfig(level=logging.INFO)
1111

@@ -112,7 +112,7 @@ def extract_unique_albums(xml_path: str) -> List[Dict]:
112112

113113
return album_list
114114

115-
def build_lidarr_json(songs: List[Dict]) -> (List[Dict], List[Dict]):
115+
def build_lidarr_json(songs: List[Dict]) -> Tuple[List[Dict], List[Dict]]:
116116
"""
117117
For each song, lookup the MusicBrainzId and build the Lidarr-compatible dict.
118118
Returns two lists: found (with MBID) and not_found (for later processing).
@@ -129,7 +129,7 @@ def build_lidarr_json(songs: List[Dict]) -> (List[Dict], List[Dict]):
129129
time.sleep(1) # MusicBrainz rate limit for anonymous requests
130130
return found, not_found
131131

132-
def build_albums_json(albums: List[Dict]) -> (List[Dict], List[Dict]):
132+
def build_albums_json(albums: List[Dict]) -> Tuple[List[Dict], List[Dict]]:
133133
"""
134134
For each album, lookup the release-group MusicBrainzId.
135135
Returns two lists: found (with MBID) and not_found (for later processing).

0 commit comments

Comments
 (0)