fix
This commit is contained in:
parent
38dd65bece
commit
3c3b8ff0e4
@ -5,7 +5,6 @@ from fastapi import APIRouter, Depends, HTTPException
|
|||||||
from app import schemas
|
from app import schemas
|
||||||
from app.chain.douban import DoubanChain
|
from app.chain.douban import DoubanChain
|
||||||
from app.chain.search import SearchChain
|
from app.chain.search import SearchChain
|
||||||
from app.core.context import Context
|
|
||||||
from app.core.security import verify_token
|
from app.core.security import verify_token
|
||||||
from app.schemas.types import MediaType
|
from app.schemas.types import MediaType
|
||||||
|
|
||||||
|
@ -75,8 +75,7 @@ def cookie_cloud_sync(background_tasks: BackgroundTasks,
|
|||||||
|
|
||||||
|
|
||||||
@router.get("/reset", summary="重置站点", response_model=schemas.Response)
|
@router.get("/reset", summary="重置站点", response_model=schemas.Response)
|
||||||
def cookie_cloud_sync(background_tasks: BackgroundTasks,
|
def cookie_cloud_sync(db: Session = Depends(get_db),
|
||||||
db: Session = Depends(get_db),
|
|
||||||
_: schemas.TokenPayload = Depends(verify_token)) -> Any:
|
_: schemas.TokenPayload = Depends(verify_token)) -> Any:
|
||||||
"""
|
"""
|
||||||
清空所有站点数据并重新同步CookieCloud站点信息
|
清空所有站点数据并重新同步CookieCloud站点信息
|
||||||
|
@ -43,7 +43,7 @@ def create_user(
|
|||||||
user_info["hashed_password"] = get_password_hash(user_info["password"])
|
user_info["hashed_password"] = get_password_hash(user_info["password"])
|
||||||
user_info.pop("password")
|
user_info.pop("password")
|
||||||
user = User(**user_info)
|
user = User(**user_info)
|
||||||
user = user.create(db)
|
user.create(db)
|
||||||
return schemas.Response(success=True)
|
return schemas.Response(success=True)
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import json
|
import json
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import List, Optional, Dict, Tuple, Generator
|
from typing import List, Optional, Dict, Tuple, Generator, Any
|
||||||
from urllib.parse import quote_plus
|
from urllib.parse import quote_plus
|
||||||
|
|
||||||
from plexapi import media
|
from plexapi import media
|
||||||
@ -220,7 +220,7 @@ class Plex(metaclass=Singleton):
|
|||||||
self._plex.query(f'/library/sections/{lib_key}/refresh?path={quote_plus(path)}')
|
self._plex.query(f'/library/sections/{lib_key}/refresh?path={quote_plus(path)}')
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def __find_librarie(path: Path, libraries: List[dict]) -> Tuple[str, str]:
|
def __find_librarie(path: Path, libraries: List[Any]) -> Tuple[str, str]:
|
||||||
"""
|
"""
|
||||||
判断这个path属于哪个媒体库
|
判断这个path属于哪个媒体库
|
||||||
多个媒体库配置的目录不应有重复和嵌套,
|
多个媒体库配置的目录不应有重复和嵌套,
|
||||||
@ -262,7 +262,7 @@ class Plex(metaclass=Singleton):
|
|||||||
return {}
|
return {}
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def __get_ids(guids: List[dict]) -> dict:
|
def __get_ids(guids: List[Any]) -> dict:
|
||||||
guid_mapping = {
|
guid_mapping = {
|
||||||
"imdb://": "imdb_id",
|
"imdb://": "imdb_id",
|
||||||
"tmdb://": "tmdb_id",
|
"tmdb://": "tmdb_id",
|
||||||
|
@ -415,7 +415,7 @@ class BestFilmVersion(_PluginBase):
|
|||||||
resp = self.get_items(Emby().get_data(url))
|
resp = self.get_items(Emby().get_data(url))
|
||||||
all_item.extend(resp)
|
all_item.extend(resp)
|
||||||
else:
|
else:
|
||||||
resp = self.plex_get_watchlist(self)
|
resp = self.plex_get_watchlist()
|
||||||
all_item.extend(resp)
|
all_item.extend(resp)
|
||||||
|
|
||||||
for data in all_item:
|
for data in all_item:
|
||||||
@ -502,7 +502,7 @@ class BestFilmVersion(_PluginBase):
|
|||||||
return []
|
return []
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def plex_get_watchlist(self):
|
def plex_get_watchlist():
|
||||||
# 根据加入日期 降序排序
|
# 根据加入日期 降序排序
|
||||||
url = f"https://metadata.provider.plex.tv/library/sections/watchlist/all?type=1&sort=addedAt%3Adesc" \
|
url = f"https://metadata.provider.plex.tv/library/sections/watchlist/all?type=1&sort=addedAt%3Adesc" \
|
||||||
f"&X-Plex-Container-Start=0&X-Plex-Container-Size=50" \
|
f"&X-Plex-Container-Start=0&X-Plex-Container-Size=50" \
|
||||||
|
@ -306,7 +306,7 @@ class TorrentTransfer(_PluginBase):
|
|||||||
continue
|
continue
|
||||||
# TODO 读取trackers
|
# TODO 读取trackers
|
||||||
try:
|
try:
|
||||||
torrent_main = None
|
torrent_main = {}
|
||||||
main_announce = None
|
main_announce = None
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
logger.error(f"解析种子文件 {torrent_file} 失败:{err}")
|
logger.error(f"解析种子文件 {torrent_file} 失败:{err}")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user