@@ -288,26 +288,26 @@ def get_remote_image_by_id(self, item_id: str, image_type: str, depth: int = 0)
288
288
if item .thumb :
289
289
image_url = RequestUtils .combine_url (host = settings .PLEX_PLAY_HOST , path = item .thumb , query = query )
290
290
else :
291
- # 这里对episode进行特殊处理,实际上episode的Backdrop是Poster
292
- if item .TYPE == "episode" and item .thumb :
293
- image_url = RequestUtils .combine_url (host = settings .PLEX_PLAY_HOST , path = item .thumb , query = query )
294
291
# 默认使用art也就是Backdrop进行处理
295
- if not image_url and item .art :
292
+ if item .art :
296
293
image_url = RequestUtils .combine_url (host = settings .PLEX_PLAY_HOST , path = item .art , query = query )
294
+ # 这里对episode进行特殊处理,实际上episode的Backdrop是Poster
295
+ # 也有个别情况,比如机智的凡人小子episode就是Poster,因此这里把episode的优先级降低,默认还是取art
296
+ if not image_url and item .TYPE == "episode" and item .thumb :
297
+ image_url = RequestUtils .combine_url (host = settings .PLEX_PLAY_HOST , path = item .thumb , query = query )
297
298
else :
298
299
if image_type == "Poster" :
299
300
images = self ._plex .fetchItems (ekey = f"{ ekey } /posters" ,
300
301
cls = media .Poster )
301
302
else :
303
+ # 默认使用art也就是Backdrop进行处理
304
+ images = self ._plex .fetchItems (ekey = f"{ ekey } /arts" ,
305
+ cls = media .Art )
302
306
# 这里对episode进行特殊处理,实际上episode的Backdrop是Poster
303
- images = None
304
- if item .TYPE == "episode" :
307
+ # 也有个别情况,比如机智的凡人小子episode就是Poster,因此这里把episode的优先级降低,默认还是取art
308
+ if not images and item .TYPE == "episode" :
305
309
images = self ._plex .fetchItems (ekey = f"{ ekey } /posters" ,
306
310
cls = media .Poster )
307
- # 默认使用art也就是Backdrop进行处理
308
- if not images :
309
- images = self ._plex .fetchItems (ekey = f"{ ekey } /arts" ,
310
- cls = media .Art )
311
311
for image in images :
312
312
if hasattr (image , "key" ) and image .key .startswith ("http" ):
313
313
image_url = image .key
0 commit comments