Merge pull request #2146 from zhu0823/main

This commit is contained in:
jxxghp 2024-05-23 07:10:48 +08:00 committed by GitHub
commit 0aa3aa8521
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -708,6 +708,10 @@ class Plex:
title = "%s%s季 第%s" % (item.grandparentTitle, item.parentIndex, item.index) title = "%s%s季 第%s" % (item.grandparentTitle, item.parentIndex, item.index)
thumb = (item.parentThumb or item.grandparentThumb or '').lstrip('/') thumb = (item.parentThumb or item.grandparentThumb or '').lstrip('/')
image = (self._host + thumb + f"?X-Plex-Token={self._token}") image = (self._host + thumb + f"?X-Plex-Token={self._token}")
elif item.TYPE == "show":
item_type = MediaType.TV.value
title = "%s%s" % (item.title, item.seasonCount)
image = item.posterUrl
link = self.get_play_url(item.key) link = self.get_play_url(item.key)
ret_resume.append(schemas.MediaServerPlayItem( ret_resume.append(schemas.MediaServerPlayItem(
id=item.key, id=item.key,
@ -717,7 +721,5 @@ class Plex:
image=image, image=image,
link=link link=link
)) ))
offset += num offset += num
return ret_resume[:num] return ret_resume[:num]