fix for shows
This commit is contained in:
parent
bfdf94fc14
commit
640a1f70dc
@ -233,7 +233,7 @@ def get_content(library_name, jbop, search=None):
|
|||||||
else:
|
else:
|
||||||
searchable = False
|
searchable = False
|
||||||
keyword = {key + '__icontains': value for key, value in search.items()}
|
keyword = {key + '__icontains': value for key, value in search.items()}
|
||||||
|
|
||||||
for library in library_name:
|
for library in library_name:
|
||||||
plex_library = plex.library.section(library)
|
plex_library = plex.library.section(library)
|
||||||
library_type = plex_library.type
|
library_type = plex_library.type
|
||||||
@ -243,13 +243,13 @@ def get_content(library_name, jbop, search=None):
|
|||||||
else:
|
else:
|
||||||
child_lst = [x.ratingKey for x in plex_library.all(**keyword)]
|
child_lst = [x.ratingKey for x in plex_library.all(**keyword)]
|
||||||
elif library_type == 'show':
|
elif library_type == 'show':
|
||||||
child = plex.library.section(library).all()
|
|
||||||
if searchable:
|
if searchable:
|
||||||
for episode in child.search(**keyword):
|
for child in plex_library.search(**keyword):
|
||||||
child_lst += episode.ratingKey
|
child_lst += [child.ratingKey]
|
||||||
else:
|
else:
|
||||||
|
child = plex_library.all()
|
||||||
for episode in child.episodes(**keyword):
|
for episode in child.episodes(**keyword):
|
||||||
child_lst += episode.ratingKey
|
child_lst += [episode.ratingKey]
|
||||||
else:
|
else:
|
||||||
pass
|
pass
|
||||||
play_lst = child_lst
|
play_lst = child_lst
|
||||||
|
Loading…
Reference in New Issue
Block a user