fix: 某些剧集parentThumb为None时的问题

This commit is contained in:
zhu0823 2024-05-07 18:28:53 +08:00
parent 8bb43b52bc
commit 0b84312559

View File

@ -691,7 +691,8 @@ class Plex:
elif item.TYPE == "episode": elif item.TYPE == "episode":
item_type = MediaType.TV.value item_type = MediaType.TV.value
title = "%s%s季 第%s" % (item.grandparentTitle, item.parentIndex, item.index) title = "%s%s季 第%s" % (item.grandparentTitle, item.parentIndex, item.index)
image = self._host + item.parentThumb.lstrip('/') + f"?X-Plex-Token={self._token}" thumb = (item.parentThumb or item.grandparentThumb or '').lstrip('/')
image = (self._host + thumb + f"?X-Plex-Token={self._token}")
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,