Skip to content

Commit

Permalink
fix plex
Browse files Browse the repository at this point in the history
  • Loading branch information
jxxghp committed Oct 11, 2023
1 parent d784496 commit cd391d1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/plugins/personmeta/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@ def __get_jellyfin_items() -> dict:
logger.error(f"获取Jellyfin媒体的所有子媒体项失败:{err}")
return {}

def __get_plex_items(t: str) -> dict:
def __get_plex_items() -> dict:
"""
获得Plex媒体的所有子媒体项
"""
Expand All @@ -723,7 +723,7 @@ def __get_plex_items(t: str) -> dict:
plex = Plex().get_plex()
items['Items'] = []
if parentid:
if mtype and 'Season' in t:
if mtype and 'Season' in mtype:
plexitem = plex.library.fetchItem(ekey=parentid)
items['Items'] = []
for season in plexitem.seasons():
Expand All @@ -734,7 +734,7 @@ def __get_plex_items(t: str) -> dict:
'Overview': season.summary
}
items['Items'].append(item)
elif mtype and 'Episode' in t:
elif mtype and 'Episode' in mtype:
plexitem = plex.library.fetchItem(ekey=parentid)
items['Items'] = []
for episode in plexitem.episodes():
Expand Down Expand Up @@ -785,7 +785,7 @@ def __get_plex_items(t: str) -> dict:
elif server == "jellyfin":
return __get_jellyfin_items()
else:
return __get_plex_items(mtype)
return __get_plex_items()

@staticmethod
def set_iteminfo(server: str, itemid: str, iteminfo: dict):
Expand Down

0 comments on commit cd391d1

Please sign in to comment.