nice
This commit is contained in:
parent
b6c59e81ad
commit
9cd2c9189b
6 changed files with 112 additions and 128 deletions
|
|
@ -167,6 +167,7 @@ class ParseItunesXml:
|
|||
track.title = data.get("Name")
|
||||
track.artists = self.parse_artists([data.get("Artist")])
|
||||
track.album = self.parse_album(data.get("Album"))
|
||||
track.play_count = int(data.get("Play Count"))
|
||||
|
||||
if not track.album or not len(track.artists) or not track.title:
|
||||
raise "error parsing"
|
||||
|
|
@ -183,10 +184,9 @@ class ParseItunesXml:
|
|||
|
||||
self.library.name = "Itunes"
|
||||
|
||||
for track in self.library.tracks:
|
||||
track.auto_score = track.play_count
|
||||
|
||||
return self.library
|
||||
|
||||
|
||||
def parse_track_item(self, id, track: dict[str, Any]) -> Track:
|
||||
|
||||
return track
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue