This commit is contained in:
jxxghp
2024-01-03 21:29:23 +08:00
parent 163a855d5c
commit a60fde3b91
4 changed files with 27 additions and 14 deletions

View File

@ -612,17 +612,21 @@ class Plex(metaclass=Singleton):
for item in items:
item_type = MediaType.MOVIE.value if item.TYPE == "movie" else MediaType.TV.value
if item_type == MediaType.MOVIE.value:
name = item.title
title = item.title
subtitle = item.year
else:
if item.parentIndex == 1:
name = "%s%s" % (item.grandparentTitle, item.index)
title = item.grandparentTitle
subtitle = f"{item.index}"
else:
name = "%s%s季第%s" % (item.grandparentTitle, item.parentIndex, item.index)
title = item.grandparentTitle
subtitle = f"{item.parentIndex}季 第{item.index}"
link = self.get_play_url(item.key)
image = item.artUrl
ret_resume.append(schemas.MediaServerPlayItem(
id=item.key,
name=name,
title=title,
subtitle=subtitle,
type=item_type,
image=image,
link=link,
@ -646,7 +650,7 @@ class Plex(metaclass=Singleton):
image = item.posterUrl
ret_resume.append(schemas.MediaServerPlayItem(
id=item.key,
name=title,
title=title,
type=item_type,
image=image,
link=link