mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-26 02:36:10 +00:00
Fix duplicates in views
This commit is contained in:
parent
2677f98012
commit
f37fd7c983
3 changed files with 6 additions and 6 deletions
|
@ -246,10 +246,10 @@ def get_sync():
|
||||||
except Exception:
|
except Exception:
|
||||||
sync = {}
|
sync = {}
|
||||||
|
|
||||||
sync['Libraries'] = sync.get('Libraries', [])
|
sync['Libraries'] = list(set(sync.get('Libraries', [])))
|
||||||
sync['RestorePoint'] = sync.get('RestorePoint', {})
|
sync['RestorePoint'] = sync.get('RestorePoint', {})
|
||||||
sync['Whitelist'] = sync.get('Whitelist', [])
|
sync['Whitelist'] = list(set(sync.get('Whitelist', [])))
|
||||||
sync['SortedViews'] = sync.get('SortedViews', [])
|
sync['SortedViews'] = list(set(sync.get('SortedViews', [])))
|
||||||
|
|
||||||
return sync
|
return sync
|
||||||
|
|
||||||
|
|
|
@ -152,13 +152,13 @@ def get_artists(parent_id=None, basic=False, params=None, server_id=None):
|
||||||
for items in _get_items(query, server_id):
|
for items in _get_items(query, server_id):
|
||||||
yield items
|
yield items
|
||||||
|
|
||||||
def get_albums_by_artist(artist_id, basic=False, server_id=None):
|
def get_albums_by_artist(artist_id, basic=False):
|
||||||
|
|
||||||
params = {
|
params = {
|
||||||
'SortBy': "DateCreated",
|
'SortBy': "DateCreated",
|
||||||
'ArtistIds': artist_id
|
'ArtistIds': artist_id
|
||||||
}
|
}
|
||||||
for items in get_items(None, "MusicAlbum", basic, params, server_id):
|
for items in get_items(None, "MusicAlbum", basic, params):
|
||||||
yield items
|
yield items
|
||||||
|
|
||||||
@stop()
|
@stop()
|
||||||
|
|
|
@ -133,7 +133,7 @@ class FullSync(object):
|
||||||
|
|
||||||
self.process_library(library)
|
self.process_library(library)
|
||||||
|
|
||||||
if not library.startswith('Boxsets:'):
|
if not library.startswith('Boxsets:') and library not in self.sync['Whitelist']:
|
||||||
self.sync['Whitelist'].append(library)
|
self.sync['Whitelist'].append(library)
|
||||||
|
|
||||||
self.sync['Libraries'].pop(self.sync['Libraries'].index(library))
|
self.sync['Libraries'].pop(self.sync['Libraries'].index(library))
|
||||||
|
|
Loading…
Reference in a new issue