Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
e35838c326
@ -121,7 +121,10 @@ class ChainBase(metaclass=ABCMeta):
|
|||||||
:return: 识别的媒体信息,包括剧集信息
|
:return: 识别的媒体信息,包括剧集信息
|
||||||
"""
|
"""
|
||||||
if not tmdbid and hasattr(meta, "tmdbid"):
|
if not tmdbid and hasattr(meta, "tmdbid"):
|
||||||
|
# 识别用名中含指定信息情形
|
||||||
tmdbid = meta.tmdbid
|
tmdbid = meta.tmdbid
|
||||||
|
if not mtype and meta.type in [MediaType.TV, MediaType.MOVIE]:
|
||||||
|
mtype = meta.type
|
||||||
return self.run_module("recognize_media", meta=meta, mtype=mtype, tmdbid=tmdbid)
|
return self.run_module("recognize_media", meta=meta, mtype=mtype, tmdbid=tmdbid)
|
||||||
|
|
||||||
def match_doubaninfo(self, name: str, imdbid: str = None,
|
def match_doubaninfo(self, name: str, imdbid: str = None,
|
||||||
|
@ -803,7 +803,9 @@ class Emby(metaclass=Singleton):
|
|||||||
logger.debug(f"接收到emby webhook:{message}")
|
logger.debug(f"接收到emby webhook:{message}")
|
||||||
eventItem = schemas.WebhookEventInfo(event=eventType, channel="emby")
|
eventItem = schemas.WebhookEventInfo(event=eventType, channel="emby")
|
||||||
if message.get('Item'):
|
if message.get('Item'):
|
||||||
if message.get('Item', {}).get('Type') == 'Episode':
|
if message.get('Item', {}).get('Type') == 'Episode' \
|
||||||
|
or message.get('Item', {}).get('Type') == 'Series' \
|
||||||
|
or message.get('Item', {}).get('Type') == 'Season':
|
||||||
eventItem.item_type = "TV"
|
eventItem.item_type = "TV"
|
||||||
if message.get('Item', {}).get('SeriesName') \
|
if message.get('Item', {}).get('SeriesName') \
|
||||||
and message.get('Item', {}).get('ParentIndexNumber') \
|
and message.get('Item', {}).get('ParentIndexNumber') \
|
||||||
@ -813,6 +815,10 @@ class Emby(metaclass=Singleton):
|
|||||||
"S" + str(message.get('Item', {}).get('ParentIndexNumber')),
|
"S" + str(message.get('Item', {}).get('ParentIndexNumber')),
|
||||||
"E" + str(message.get('Item', {}).get('IndexNumber')),
|
"E" + str(message.get('Item', {}).get('IndexNumber')),
|
||||||
message.get('Item', {}).get('Name'))
|
message.get('Item', {}).get('Name'))
|
||||||
|
elif message.get('Item', {}).get('SeriesName'):
|
||||||
|
eventItem.item_name = "%s %s" % (
|
||||||
|
message.get('Item', {}).get('SeriesName'),
|
||||||
|
message.get('Item', {}).get('Name'))
|
||||||
else:
|
else:
|
||||||
eventItem.item_name = message.get('Item', {}).get('Name')
|
eventItem.item_name = message.get('Item', {}).get('Name')
|
||||||
eventItem.item_id = message.get('Item', {}).get('SeriesId')
|
eventItem.item_id = message.get('Item', {}).get('SeriesId')
|
||||||
|
@ -466,7 +466,9 @@ class Jellyfin(metaclass=Singleton):
|
|||||||
eventItem.device_name = message.get('DeviceName')
|
eventItem.device_name = message.get('DeviceName')
|
||||||
eventItem.user_name = message.get('NotificationUsername')
|
eventItem.user_name = message.get('NotificationUsername')
|
||||||
eventItem.client = message.get('ClientName')
|
eventItem.client = message.get('ClientName')
|
||||||
if message.get("ItemType") == "Episode":
|
if message.get("ItemType") == "Episode" \
|
||||||
|
or message.get("ItemType") == "Series" \
|
||||||
|
or message.get("ItemType") == "Season":
|
||||||
# 剧集
|
# 剧集
|
||||||
eventItem.item_type = "TV"
|
eventItem.item_type = "TV"
|
||||||
eventItem.season_id = message.get('SeasonNumber')
|
eventItem.season_id = message.get('SeasonNumber')
|
||||||
|
@ -729,12 +729,12 @@ class MediaSyncDel(_PluginBase):
|
|||||||
查询转移记录
|
查询转移记录
|
||||||
"""
|
"""
|
||||||
# 季数
|
# 季数
|
||||||
if season_num and season_num.isdigit():
|
if season_num and str(season_num).isdigit():
|
||||||
season_num = str(season_num).rjust(2, '0')
|
season_num = str(season_num).rjust(2, '0')
|
||||||
else:
|
else:
|
||||||
season_num = None
|
season_num = None
|
||||||
# 集数
|
# 集数
|
||||||
if episode_num and episode_num.isdigit():
|
if episode_num and str(episode_num).isdigit():
|
||||||
episode_num = str(episode_num).rjust(2, '0')
|
episode_num = str(episode_num).rjust(2, '0')
|
||||||
else:
|
else:
|
||||||
episode_num = None
|
episode_num = None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user