mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-06 07:56:52 +08:00
fix
This commit is contained in:
@@ -501,7 +501,8 @@ class TransferChain(ChainBase, metaclass=Singleton):
|
|||||||
# 获取整理屏蔽词
|
# 获取整理屏蔽词
|
||||||
transfer_exclude_words = SystemConfigOper().get(SystemConfigKey.TransferExcludeWords)
|
transfer_exclude_words = SystemConfigOper().get(SystemConfigKey.TransferExcludeWords)
|
||||||
for t in tasks:
|
for t in tasks:
|
||||||
if t.download_hash and self._can_delete_torrent(t.download_hash, t.downloader, transfer_exclude_words):
|
if t.download_hash and self._can_delete_torrent(t.download_hash, t.downloader,
|
||||||
|
transfer_exclude_words):
|
||||||
if self.remove_torrents(t.download_hash, downloader=t.downloader):
|
if self.remove_torrents(t.download_hash, downloader=t.downloader):
|
||||||
logger.info(f"移动模式删除种子成功:{t.download_hash}")
|
logger.info(f"移动模式删除种子成功:{t.download_hash}")
|
||||||
if t.fileitem:
|
if t.fileitem:
|
||||||
@@ -1435,7 +1436,6 @@ class TransferChain(ChainBase, metaclass=Singleton):
|
|||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
def _can_delete_torrent(self, download_hash: str, downloader: str, transfer_exclude_words) -> bool:
|
def _can_delete_torrent(self, download_hash: str, downloader: str, transfer_exclude_words) -> bool:
|
||||||
"""
|
"""
|
||||||
检查是否可以删除种子文件
|
检查是否可以删除种子文件
|
||||||
|
|||||||
+2
-2
@@ -483,7 +483,7 @@ class MediaInfo:
|
|||||||
continue
|
continue
|
||||||
if current_value is None:
|
if current_value is None:
|
||||||
setattr(self, key, value)
|
setattr(self, key, value)
|
||||||
elif type(current_value) == type(value):
|
elif type(current_value) is type(value):
|
||||||
setattr(self, key, value)
|
setattr(self, key, value)
|
||||||
|
|
||||||
def set_douban_info(self, info: dict):
|
def set_douban_info(self, info: dict):
|
||||||
@@ -624,7 +624,7 @@ class MediaInfo:
|
|||||||
continue
|
continue
|
||||||
if current_value is None:
|
if current_value is None:
|
||||||
setattr(self, key, value)
|
setattr(self, key, value)
|
||||||
elif type(current_value) == type(value):
|
elif type(current_value) is type(value):
|
||||||
setattr(self, key, value)
|
setattr(self, key, value)
|
||||||
|
|
||||||
def set_bangumi_info(self, info: dict):
|
def set_bangumi_info(self, info: dict):
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
import importlib
|
import importlib
|
||||||
|
import io
|
||||||
import json
|
import json
|
||||||
import shutil
|
import shutil
|
||||||
import site
|
import site
|
||||||
import sys
|
import sys
|
||||||
import traceback
|
import traceback
|
||||||
|
import zipfile
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Dict, List, Optional, Tuple, Set, Callable, Awaitable
|
from typing import Dict, List, Optional, Tuple, Set, Callable, Awaitable
|
||||||
import zipfile
|
|
||||||
import io
|
|
||||||
|
|
||||||
import aiofiles
|
import aiofiles
|
||||||
import aioshutil
|
import aioshutil
|
||||||
@@ -248,6 +248,7 @@ class PluginHelper(metaclass=WeakSingleton):
|
|||||||
return False, f"未在插件清单中找到 {pid} 的版本号,无法进行 Release 安装"
|
return False, f"未在插件清单中找到 {pid} 的版本号,无法进行 Release 安装"
|
||||||
# 拼接 release_tag
|
# 拼接 release_tag
|
||||||
release_tag = f"{pid}_v{plugin_version}"
|
release_tag = f"{pid}_v{plugin_version}"
|
||||||
|
|
||||||
# 使用 release 进行安装
|
# 使用 release 进行安装
|
||||||
def prepare_release() -> Tuple[bool, str]:
|
def prepare_release() -> Tuple[bool, str]:
|
||||||
return self.__install_from_release(
|
return self.__install_from_release(
|
||||||
@@ -1393,6 +1394,7 @@ class PluginHelper(metaclass=WeakSingleton):
|
|||||||
return False, f"未在插件清单中找到 {pid} 的版本号,无法进行 Release 安装"
|
return False, f"未在插件清单中找到 {pid} 的版本号,无法进行 Release 安装"
|
||||||
# 拼接 release_tag
|
# 拼接 release_tag
|
||||||
release_tag = f"{pid}_v{plugin_version}"
|
release_tag = f"{pid}_v{plugin_version}"
|
||||||
|
|
||||||
# 使用 release 进行安装
|
# 使用 release 进行安装
|
||||||
async def prepare_release() -> Tuple[bool, str]:
|
async def prepare_release() -> Tuple[bool, str]:
|
||||||
return await self.__async_install_from_release(
|
return await self.__async_install_from_release(
|
||||||
@@ -1528,7 +1530,8 @@ class PluginHelper(metaclass=WeakSingleton):
|
|||||||
logger.error(f"解析 Release 信息失败:{e}")
|
logger.error(f"解析 Release 信息失败:{e}")
|
||||||
return False, f"解析 Release 信息失败:{e}"
|
return False, f"解析 Release 信息失败:{e}"
|
||||||
|
|
||||||
res = await self.__async_request_with_fallback(download_url, headers=settings.REPO_GITHUB_HEADERS(repo=user_repo))
|
res = await self.__async_request_with_fallback(download_url,
|
||||||
|
headers=settings.REPO_GITHUB_HEADERS(repo=user_repo))
|
||||||
if res is None or res.status_code != 200:
|
if res is None or res.status_code != 200:
|
||||||
return False, f"下载资产失败:{res.status_code if res else '连接失败'}"
|
return False, f"下载资产失败:{res.status_code if res else '连接失败'}"
|
||||||
|
|
||||||
|
|||||||
@@ -282,9 +282,8 @@ class EmbyModule(_ModuleBase, _MediaServerBase[Emby]):
|
|||||||
episodes=episodes
|
episodes=episodes
|
||||||
) for season, episodes in seasoninfo.items()]
|
) for season, episodes in seasoninfo.items()]
|
||||||
|
|
||||||
def mediaserver_playing(self, server: str,
|
def mediaserver_playing(self, server: str, count: Optional[int] = 20,
|
||||||
count: Optional[int] = 20, username: Optional[str] = None) -> List[
|
username: Optional[str] = None) -> List[schemas.MediaServerPlayItem]:
|
||||||
schemas.MediaServerPlayItem]:
|
|
||||||
"""
|
"""
|
||||||
获取媒体服务器正在播放信息
|
获取媒体服务器正在播放信息
|
||||||
"""
|
"""
|
||||||
@@ -302,9 +301,8 @@ class EmbyModule(_ModuleBase, _MediaServerBase[Emby]):
|
|||||||
return None
|
return None
|
||||||
return server_obj.get_play_url(item_id)
|
return server_obj.get_play_url(item_id)
|
||||||
|
|
||||||
def mediaserver_latest(self, server: Optional[str] = None,
|
def mediaserver_latest(self, server: Optional[str] = None, count: Optional[int] = 20,
|
||||||
count: Optional[int] = 20, username: Optional[str] = None) -> List[
|
username: Optional[str] = None) -> List[schemas.MediaServerPlayItem]:
|
||||||
schemas.MediaServerPlayItem]:
|
|
||||||
"""
|
"""
|
||||||
获取媒体服务器最新入库条目
|
获取媒体服务器最新入库条目
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -402,7 +402,8 @@ class TmdbApi:
|
|||||||
if match:
|
if match:
|
||||||
try:
|
try:
|
||||||
return int(match.group(1))
|
return int(match.group(1))
|
||||||
except Exception:
|
except Exception as err:
|
||||||
|
logger.debug(f"解析TMDBID失败:{str(err)} - {traceback.format_exc()}")
|
||||||
return None
|
return None
|
||||||
return None
|
return None
|
||||||
|
|
||||||
@@ -832,7 +833,6 @@ class TmdbApi:
|
|||||||
return None
|
return None
|
||||||
# dict[地区:分级]
|
# dict[地区:分级]
|
||||||
ratings = {}
|
ratings = {}
|
||||||
results = []
|
|
||||||
if results := (tmdb_info.get("release_dates") or {}).get("results"):
|
if results := (tmdb_info.get("release_dates") or {}).get("results"):
|
||||||
"""
|
"""
|
||||||
[
|
[
|
||||||
|
|||||||
Reference in New Issue
Block a user