honue / MoviePilot-Plugins

MoviePilot插件库
GNU General Public License v3.0
86 stars 23 forks source link

Bangumi在看同步没有正常工作 #19

Closed TyxTang closed 7 months ago

TyxTang commented 7 months ago

image 安装了很久都只是同步过这两条,其余emby播放都无反应,豆瓣那边是能正常同步的(webhook没问题) 日志没有再动过

honue commented 7 months ago
        if not BangumiSync.is_anime(path):
            # path_keyword = "cartoon,动漫,动画,ani,anime,新番,番剧,特摄"
            return

        if event_info.item_type in ["TV"] and \
                event_info.event in play_start and \
                event_info.user_name in self._user.split(','):
                pass

你看看是不是不满足这两个条件直接return了

TyxTang commented 7 months ago
        if not BangumiSync.is_anime(path):
            # path_keyword = "cartoon,动漫,动画,ani,anime,新番,番剧,特摄"
            return

        if event_info.item_type in ["TV"] and \
                event_info.event in play_start and \
                event_info.user_name in self._user.split(','):
                pass

你看看是不是不满足这两个条件直接return了

def is_anime(path):
        """
        通过路径关键词来确定是不是anime媒体库
        """
        path_keyword = "cartoon,动漫,动画,ani,anime,新番,番剧,特摄"
        for keyword in path_keyword.split(','):
            if path.count(keyword):
                return True
        return False

我看了下源码,可不可以理解为emby动漫媒体文件的路径必须包含以上path_keyword关键词(我不太清楚webhook实际返回的内容

honue commented 7 months ago

是的,包含上述任意关键词,item_path是你emby中的媒体文件路径

TyxTang commented 7 months ago

感谢,问题已解决