Merge pull request #392 from DzAvril/main

Update zvideohelper to v1.3
This commit is contained in:
jxxghp
2024-06-21 10:54:09 +08:00
committed by GitHub
2 changed files with 6 additions and 3 deletions

View File

@@ -752,11 +752,12 @@
"name": "极影视助手",
"description": "极影视功能扩展",
"labels": "媒体库",
"version": "1.2",
"version": "1.3",
"icon": "zvideo.png",
"author": "DzAvril",
"level": 1,
"history": {
"v1.3": "降低对豆瓣接口的请求频率",
"v1.2": "修复无法获取豆瓣评分的问题",
"v1.1": "支持将极影视评分修改为豆瓣评分",
"v1.0": "同步极影视在看/已看状态到豆瓣"

View File

@@ -15,7 +15,7 @@ from app.core.config import settings
from app.plugins import _PluginBase
from typing import Any, List, Dict, Tuple, Optional
from app.log import logger
import time
# 豆瓣状态
class DoubanStatus(Enum):
@@ -31,7 +31,7 @@ class ZvideoHelper(_PluginBase):
# 插件图标
plugin_icon = "zvideo.png"
# 插件版本
plugin_version = "1.2"
plugin_version = "1.3"
# 插件作者
plugin_author = "DzAvril"
# 作者主页
@@ -419,6 +419,8 @@ class ZvideoHelper(_PluginBase):
def get_douban_info_by_name(self, title):
logger.info(f"正在查询:{title}")
# 延迟10s以防频繁请求被豆瓣封接口
time.sleep(10)
subject_name, subject_id, score = self._douban_helper.get_subject_id(
title=title
)