mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 15:38:19 +08:00
Merge branch 'jxxghp:v2' into v2
This commit is contained in:
@@ -389,14 +389,13 @@ class TransferChain(ChainBase):
|
|||||||
download_hash = download_file.download_hash
|
download_hash = download_file.download_hash
|
||||||
|
|
||||||
# 查询整理目标目录
|
# 查询整理目标目录
|
||||||
if not target_directory:
|
if not target_directory and not target_path:
|
||||||
if target_path:
|
if src_match:
|
||||||
target_directory = self.directoryhelper.get_dir(file_mediainfo,
|
# 按源目录匹配,以便找到更合适的目录配置
|
||||||
storage=target_storage, dest_path=target_path)
|
|
||||||
elif src_match:
|
|
||||||
target_directory = self.directoryhelper.get_dir(file_mediainfo,
|
target_directory = self.directoryhelper.get_dir(file_mediainfo,
|
||||||
storage=file_item.storage, src_path=file_path)
|
storage=file_item.storage, src_path=file_path)
|
||||||
else:
|
else:
|
||||||
|
# 未指定目标路径,根据媒体信息获取目标目录
|
||||||
target_directory = self.directoryhelper.get_dir(file_mediainfo)
|
target_directory = self.directoryhelper.get_dir(file_mediainfo)
|
||||||
|
|
||||||
# 执行整理
|
# 执行整理
|
||||||
|
|||||||
+13
-12
@@ -524,16 +524,7 @@ class MetaVideo(MetaBase):
|
|||||||
"""
|
"""
|
||||||
if not self.name:
|
if not self.name:
|
||||||
return
|
return
|
||||||
source_res = re.search(r"(%s)" % self._source_re, token, re.IGNORECASE)
|
if token.upper() == "DL" \
|
||||||
if source_res:
|
|
||||||
self._last_token_type = "source"
|
|
||||||
self._continue_flag = False
|
|
||||||
self._stop_name_flag = True
|
|
||||||
if not self._source:
|
|
||||||
self._source = source_res.group(1)
|
|
||||||
self._last_token = self._source.upper()
|
|
||||||
return
|
|
||||||
elif token.upper() == "DL" \
|
|
||||||
and self._last_token_type == "source" \
|
and self._last_token_type == "source" \
|
||||||
and self._last_token == "WEB":
|
and self._last_token == "WEB":
|
||||||
self._source = "WEB-DL"
|
self._source = "WEB-DL"
|
||||||
@@ -553,7 +544,7 @@ class MetaVideo(MetaBase):
|
|||||||
self._source = "WEB-DL"
|
self._source = "WEB-DL"
|
||||||
self._continue_flag = False
|
self._continue_flag = False
|
||||||
return
|
return
|
||||||
# UHD REMUX组合
|
# UHD REMUX组合
|
||||||
if token.upper() == "REMUX" \
|
if token.upper() == "REMUX" \
|
||||||
and self._source == "BluRay":
|
and self._source == "BluRay":
|
||||||
self._source = "BluRay REMUX"
|
self._source = "BluRay REMUX"
|
||||||
@@ -562,7 +553,17 @@ class MetaVideo(MetaBase):
|
|||||||
elif token.upper() == "BLURAY" \
|
elif token.upper() == "BLURAY" \
|
||||||
and self._source == "UHD":
|
and self._source == "UHD":
|
||||||
self._source = "UHD BluRay"
|
self._source = "UHD BluRay"
|
||||||
|
self._continue_flag = False
|
||||||
|
return
|
||||||
|
source_res = re.search(r"(%s)" % self._source_re, token, re.IGNORECASE)
|
||||||
|
if source_res:
|
||||||
|
self._last_token_type = "source"
|
||||||
|
self._continue_flag = False
|
||||||
|
self._stop_name_flag = True
|
||||||
|
if not self._source:
|
||||||
|
self._source = source_res.group(1)
|
||||||
|
self._last_token = self._source.upper()
|
||||||
|
return
|
||||||
effect_res = re.search(r"(%s)" % self._effect_re, token, re.IGNORECASE)
|
effect_res = re.search(r"(%s)" % self._effect_re, token, re.IGNORECASE)
|
||||||
if effect_res:
|
if effect_res:
|
||||||
self._last_token_type = "effect"
|
self._last_token_type = "effect"
|
||||||
|
|||||||
@@ -213,7 +213,7 @@ class Alist(StorageBase):
|
|||||||
path=(Path(fileitem.path) / item["name"]).as_posix() + ("/" if item["is_dir"] else ""),
|
path=(Path(fileitem.path) / item["name"]).as_posix() + ("/" if item["is_dir"] else ""),
|
||||||
name=item["name"],
|
name=item["name"],
|
||||||
basename=Path(item["name"]).stem,
|
basename=Path(item["name"]).stem,
|
||||||
extension=Path(item["name"]).suffix if not item["is_dir"] else None,
|
extension=Path(item["name"]).suffix[1:] if not item["is_dir"] else None,
|
||||||
size=item["size"] if not item["is_dir"] else None,
|
size=item["size"] if not item["is_dir"] else None,
|
||||||
modify_time=self.__parse_timestamp(item["modified"]),
|
modify_time=self.__parse_timestamp(item["modified"]),
|
||||||
thumbnail=item["thumb"],
|
thumbnail=item["thumb"],
|
||||||
@@ -351,7 +351,7 @@ class Alist(StorageBase):
|
|||||||
path=path.as_posix() + ("/" if result["data"]["is_dir"] else ""),
|
path=path.as_posix() + ("/" if result["data"]["is_dir"] else ""),
|
||||||
name=result["data"]["name"],
|
name=result["data"]["name"],
|
||||||
basename=Path(result["data"]["name"]).stem,
|
basename=Path(result["data"]["name"]).stem,
|
||||||
extension=Path(result["data"]["name"]).suffix,
|
extension=Path(result["data"]["name"]).suffix[1:],
|
||||||
size=result["data"]["size"],
|
size=result["data"]["size"],
|
||||||
modify_time=self.__parse_timestamp(result["data"]["modified"]),
|
modify_time=self.__parse_timestamp(result["data"]["modified"]),
|
||||||
thumbnail=result["data"]["thumb"],
|
thumbnail=result["data"]["thumb"],
|
||||||
@@ -521,13 +521,15 @@ class Alist(StorageBase):
|
|||||||
).get_res(download_url)
|
).get_res(download_url)
|
||||||
|
|
||||||
if not path:
|
if not path:
|
||||||
path = settings.TEMP_PATH / fileitem.name
|
new_path = settings.TEMP_PATH / fileitem.name
|
||||||
|
else:
|
||||||
|
new_path = path / fileitem.name
|
||||||
|
|
||||||
with open(path, "wb") as f:
|
with open(new_path, "wb") as f:
|
||||||
f.write(resp.content)
|
f.write(resp.content)
|
||||||
|
|
||||||
if path.exists():
|
if new_path.exists():
|
||||||
return path
|
return new_path
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def upload(
|
def upload(
|
||||||
|
|||||||
@@ -21,7 +21,8 @@ class U115Pan(StorageBase, metaclass=Singleton):
|
|||||||
|
|
||||||
# 支持的整理方式
|
# 支持的整理方式
|
||||||
transtype = {
|
transtype = {
|
||||||
"move": "移动"
|
"move": "移动",
|
||||||
|
"copy": "复制"
|
||||||
}
|
}
|
||||||
|
|
||||||
client: P115Client = None
|
client: P115Client = None
|
||||||
@@ -34,7 +35,8 @@ class U115Pan(StorageBase, metaclass=Singleton):
|
|||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
if not self.client or not self.client.cookies or force:
|
if not self.client or not self.client.cookies or force:
|
||||||
self.client = P115Client(self.__credential)
|
self.client = P115Client(self.__credential,
|
||||||
|
check_for_relogin=True, app="alipaymini", console_qrcode=False)
|
||||||
self.fs = P115FileSystem(self.client)
|
self.fs = P115FileSystem(self.client)
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
logger.error(f"115连接失败,请重新扫码登录:{str(err)}")
|
logger.error(f"115连接失败,请重新扫码登录:{str(err)}")
|
||||||
|
|||||||
+5
-5
@@ -345,13 +345,13 @@ meta_cases = [{
|
|||||||
"part": "",
|
"part": "",
|
||||||
"season": "",
|
"season": "",
|
||||||
"episode": "",
|
"episode": "",
|
||||||
"restype": "BluRay Remux",
|
"restype": "BluRay REMUX",
|
||||||
"pix": "1080p",
|
"pix": "1080p",
|
||||||
"video_codec": "AVC",
|
"video_codec": "AVC",
|
||||||
"audio_codec": "LPCM 7³"
|
"audio_codec": "LPCM 7³"
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"title": "30.Rock.S02E01.1080p.BluRay.X264-BORDURE.mkv",
|
"title": "30.Rock.S02E01.1080p.UHD.BluRay.X264-BORDURE.mkv",
|
||||||
"subtitle": "",
|
"subtitle": "",
|
||||||
"target": {
|
"target": {
|
||||||
"type": "电视剧",
|
"type": "电视剧",
|
||||||
@@ -361,7 +361,7 @@ meta_cases = [{
|
|||||||
"part": "",
|
"part": "",
|
||||||
"season": "S02",
|
"season": "S02",
|
||||||
"episode": "E01",
|
"episode": "E01",
|
||||||
"restype": "BluRay",
|
"restype": "UHD BluRay",
|
||||||
"pix": "1080p",
|
"pix": "1080p",
|
||||||
"video_codec": "X264",
|
"video_codec": "X264",
|
||||||
"audio_codec": ""
|
"audio_codec": ""
|
||||||
@@ -611,7 +611,7 @@ meta_cases = [{
|
|||||||
"subtitle": "",
|
"subtitle": "",
|
||||||
"target": {
|
"target": {
|
||||||
"type": "电视剧",
|
"type": "电视剧",
|
||||||
"cn_name": "处刑少女的生存之道",
|
"cn_name": "處刑少女的生存之道",
|
||||||
"en_name": "",
|
"en_name": "",
|
||||||
"year": "",
|
"year": "",
|
||||||
"part": "",
|
"part": "",
|
||||||
@@ -665,7 +665,7 @@ meta_cases = [{
|
|||||||
"part": "",
|
"part": "",
|
||||||
"season": "",
|
"season": "",
|
||||||
"episode": "",
|
"episode": "",
|
||||||
"restype": "BluRay DoVi UHD",
|
"restype": "UHD BluRay DoVi",
|
||||||
"pix": "1080p",
|
"pix": "1080p",
|
||||||
"video_codec": "X265",
|
"video_codec": "X265",
|
||||||
"audio_codec": "DD 7.1"
|
"audio_codec": "DD 7.1"
|
||||||
|
|||||||
+2
-2
@@ -1,2 +1,2 @@
|
|||||||
APP_VERSION = 'v2.0.6'
|
APP_VERSION = 'v2.0.7'
|
||||||
FRONTEND_VERSION = 'v2.0.6'
|
FRONTEND_VERSION = 'v2.0.7'
|
||||||
|
|||||||
Reference in New Issue
Block a user