diff --git a/resources/lib/downloader.py b/resources/lib/downloader.py index d9b52a49..85081155 100644 --- a/resources/lib/downloader.py +++ b/resources/lib/downloader.py @@ -210,6 +210,15 @@ def get_albums_by_artist(artist_id, basic=False): for items in get_items(None, "MusicAlbum", basic, params): yield items +def get_songs_by_artist(artist_id, basic=False): + + params = { + 'SortBy': "DateCreated", + 'ArtistIds': artist_id + } + for items in get_items(None, "Audio", basic, params): + yield items + @stop() def _get_items(query, server_id=None): diff --git a/resources/lib/full_sync.py b/resources/lib/full_sync.py index 4813cb4c..c311b24e 100644 --- a/resources/lib/full_sync.py +++ b/resources/lib/full_sync.py @@ -389,6 +389,13 @@ class FullSync(object): message="%s/%s/%s" % (message, album['Name'][:7], song['Name'][:7])) obj.song(song) + for songs in server.get_songs_by_artist(artist['Id']): + for song in songs['Items']: + + dialog.update(percent, message="%s/%s" % (message, song['Name'])) + obj.song(song) + + if self.update_library: self.music_compare(library, obj, embydb)