mirror of
https://github.com/blacktwin/JBOPS.git
synced 2025-12-11 19:37:18 +00:00
Flip libraries conditional
This commit is contained in:
parent
4d162d849d
commit
f8a95935f9
@ -19,13 +19,13 @@ PLEX_TOKEN = os.getenv('PLEX_TOKEN', PLEX_TOKEN)
|
|||||||
|
|
||||||
|
|
||||||
def check_streaming_services(plex, libraries, services, available_only):
|
def check_streaming_services(plex, libraries, services, available_only):
|
||||||
if not libraries:
|
if libraries:
|
||||||
|
sections = [plex.library.section(library) for library in libraries]
|
||||||
|
else:
|
||||||
sections = [
|
sections = [
|
||||||
section for section in plex.library.sections()
|
section for section in plex.library.sections()
|
||||||
if section.agent in {'tv.plex.agents.movie', 'tv.plex.agents.series'}
|
if section.agent in {'tv.plex.agents.movie', 'tv.plex.agents.series'}
|
||||||
]
|
]
|
||||||
else:
|
|
||||||
sections = [plex.library.section(library) for library in libraries]
|
|
||||||
|
|
||||||
for section in sections:
|
for section in sections:
|
||||||
print(f'{section.title}')
|
print(f'{section.title}')
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user