Merge pull request #352 from oddstr13/pr-scan-fast-and-break-things-2

Use libraries rather than home-screen views
This commit is contained in:
mcarlton00 2020-08-06 17:49:59 -04:00 committed by GitHub
commit 3ddd88943d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -166,7 +166,7 @@ class Views(object):
def get_libraries(self): def get_libraries(self):
try: try:
libraries = self.server.jellyfin.get_views()['Items'] libraries = self.server.jellyfin.get_media_folders()['Items']
except Exception as error: except Exception as error:
LOG.exception(error) LOG.exception(error)
raise IndexError("Unable to retrieve libraries: %s" % error) raise IndexError("Unable to retrieve libraries: %s" % error)
@ -236,8 +236,8 @@ class Views(object):
temp_view['Media'] = media temp_view['Media'] = media
self.add_playlist(playlist_path, temp_view, True) self.add_playlist(playlist_path, temp_view, True)
self.add_nodes(node_path, temp_view, True) self.add_nodes(node_path, temp_view, True)
index += 1 # Compensate for the duplicate. index += 1 # Compensate for the duplicate.
else: else:
if view['Media'] in ('movies', 'tvshows', 'musicvideos'): if view['Media'] in ('movies', 'tvshows', 'musicvideos'):
self.add_playlist(playlist_path, view) self.add_playlist(playlist_path, view)