diff --git a/commands.py b/commands.py index 836d488..d0c688c 100644 --- a/commands.py +++ b/commands.py @@ -66,8 +66,6 @@ async def upper_thumb(): async def refresh_tags(): """刷新已存在的视频的标签,从不支持标签的版本升级上来后需要手动调用一次""" items = await FavoriteItem.filter( - type=MediaType.VIDEO, - status=MediaStatus.NORMAL, downloaded=True, tags=None, ).prefetch_related("upper") diff --git a/processor.py b/processor.py index 3344014..e4714ba 100644 --- a/processor.py +++ b/processor.py @@ -194,7 +194,16 @@ async def process_video( if process_nfo: if not await aexists(fav_item.nfo_path): if fav_item.tags is None: - fav_item.tags = [_["tag_name"] for _ in await v.get_tags()] + try: + fav_item.tags = [ + _["tag_name"] for _ in await v.get_tags() + ] + except Exception: + logger.exception( + "Failed to get tags of video {} {}", + fav_item.bvid, + fav_item.name, + ) # 写入 nfo await EpisodeInfo( title=fav_item.name,