This commit is contained in:
jxxghp
2024-01-05 20:21:19 +08:00
parent cfb029b6b4
commit bc4931d971
4 changed files with 15 additions and 24 deletions

View File

@ -619,7 +619,7 @@ class Jellyfin(metaclass=Singleton):
"""
if not self._host or not self._apikey:
return ""
return "%sItems/%s/Images/Primary" % (self._host, item_id)
return "%sItems/%s/Images/Primary" % (self._playhost or self._host, item_id)
def __get_backdrop_url(self, item_id: str, image_tag: str) -> str:
"""
@ -660,14 +660,10 @@ class Jellyfin(metaclass=Singleton):
image = self.__get_local_image_by_id(item.get("Id"))
if item_type == MediaType.MOVIE.value:
title = item.get("Name")
subtitle = item.get("Year")
subtitle = item.get("ProductionYear")
else:
if item.get("ParentIndexNumber") == 1:
title = f'{item.get("SeriesName")}'
subtitle = f'{item.get("IndexNumber")}'
else:
title = f'{item.get("SeriesName")}'
subtitle = f'{item.get("ParentIndexNumber")}季 第{item.get("IndexNumber")}'
title = f'{item.get("SeriesName")}'
subtitle = f'S{item.get("ParentIndexNumber")}:{item.get("IndexNumber")} - {item.get("Name")}'
ret_resume.append(schemas.MediaServerPlayItem(
id=item.get("Id"),
title=title,
@ -705,6 +701,7 @@ class Jellyfin(metaclass=Singleton):
ret_latest.append(schemas.MediaServerPlayItem(
id=item.get("Id"),
title=item.get("Name"),
subtitle=item.get("ProductionYear"),
type=item_type,
image=image,
link=link