fix #2104
This commit is contained in:
parent
de0237f348
commit
111f830664
@ -236,16 +236,19 @@ class Plex:
|
|||||||
if item_id:
|
if item_id:
|
||||||
videos = self._plex.fetchItem(item_id)
|
videos = self._plex.fetchItem(item_id)
|
||||||
else:
|
else:
|
||||||
|
# 兼容年份为空的场景
|
||||||
|
kwargs = {"year": year} if year else {}
|
||||||
# 根据标题和年份模糊搜索,该结果不够准确
|
# 根据标题和年份模糊搜索,该结果不够准确
|
||||||
videos = self._plex.library.search(title=title,
|
videos = self._plex.library.search(title=title,
|
||||||
year=year,
|
libtype="show",
|
||||||
libtype="show")
|
**kwargs)
|
||||||
if (not videos
|
if (not videos
|
||||||
and original_title
|
and original_title
|
||||||
and str(original_title) != str(title)):
|
and str(original_title) != str(title)):
|
||||||
videos = self._plex.library.search(title=original_title,
|
videos = self._plex.library.search(title=original_title,
|
||||||
year=year,
|
libtype="show",
|
||||||
libtype="show")
|
**kwargs)
|
||||||
|
|
||||||
if not videos:
|
if not videos:
|
||||||
return None, {}
|
return None, {}
|
||||||
if isinstance(videos, list):
|
if isinstance(videos, list):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user