Review suggestions

This commit is contained in:
Matt 2020-09-09 18:33:47 -04:00
parent c44a079572
commit 813ec68e38
2 changed files with 1 additions and 7 deletions

View file

@ -181,9 +181,7 @@ def get_item_count(parent_id, item_type=None, params=None):
result = _get(url, query_params)
total = result.get('TotalRecordCount')
return total
return result.get('TotalRecordCount', 1)
def get_items(parent_id, item_type=None, basic=False, params=None):

View file

@ -435,8 +435,6 @@ class FullSync(object):
dialog.update(percent, message='Artist: {}'.format(item.get('Name')))
obj.artist(item)
count += 1
# Delete item once it's been processed for memory management
del item
albums = server.get_items(library_id, item_type='MusicAlbum', params={'SortBy': 'AlbumArtist'})
for batch in albums:
@ -446,7 +444,6 @@ class FullSync(object):
dialog.update(percent, message='Album: {} - {}'.format(item.get('AlbumArtist', ''), item.get('Name')))
obj.album(item)
count += 1
del item
songs = server.get_items(library_id, item_type='Audio', params={'SortBy': 'AlbumArtist'})
for batch in songs:
@ -456,7 +453,6 @@ class FullSync(object):
dialog.update(percent, message='Track: {} - {}'.format(item.get('AlbumArtist', ''), item.get('Name')))
obj.song(item)
count += 1
del item
if self.update_library:
self.music_compare(library, obj, jellyfindb)