8000 [pull] v2 from jxxghp:v2 by pull[bot] · Pull Request #137 · comanche2008/MoviePilot · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[pull] v2 from jxxghp:v2 #137

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions app/api/endpoints/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,9 @@ def clone_plugin(plugin_id: str,
)

if success:
# 注册插件服务
reload_plugin(message)
# 将分身插件添加到原插件所在的文件夹中
_add_clone_to_plugin_folder(plugin_id, message)
return schemas.Response(success=True, message="插件分身创建成功")
else:
Expand Down
10 changes: 10 additions & 0 deletions app/modules/filemanager/transhandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,16 @@ def __transfer_file(self, fileitem: FileItem, mediainfo: MediaInfo,
else:
logger.info(f"正在删除已存在的文件:{target_file}")
target_file.unlink()
else:
exists_item = target_oper.get_item(target_file)
if exists_item:
if not over_flag:
logger.warn(f"文件已存在:【{target_storage}】{target_file}")
return None, f"【{target_storage}】{target_file} 已存在"
else:
logger.info(f"正在删除已存在的文件:【{target_storage}】{target_file}")
target_oper.delete(exists_item)
# 执行文件整理命令
new_item, errmsg = self.__transfer_command(fileitem=fileitem,
target_storage=target_storage,
source_oper=source_oper,
Expand Down
17 changes: 9 additions & 8 deletions app/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,17 +540,18 @@ def update_plugin_job(self, pid: str):
self.remove_plugin_job(pid)
# 获取插件服务列表
with self._lock:
plugin_manager = PluginManager()
try:
plugin_services = PluginManager().get_plugin_services(pid=pid)
plugin_services = plugin_manager.get_plugin_services(pid=pid)
except Exception as e:
logger.error(f"运行插件 {pid} 服务失败:{str(e)} - {traceback.format_exc()}")
return
# 获取插件名称
plugin_name = PluginManager().get_plugin_attr(pid, "plugin_name")
plugin_name = plugin_manager.get_plugin_attr(pid, "plugin_name")
# 开始注册插件服务
for service in plugin_services:
try:
sid = f"{service['id']}"
sid = f"{pid}_{service['id']}"
job_id = sid.split("|")[0]
self.remove_plugin_job(pid, job_id)
self._jobs[job_id] = {
Expand Down Expand Up @@ -599,8 +600,8 @@ def list(self) -> List[schemas.ScheduleInfo]:
name = service.get("name")
provider_name = service.get("provider_name")
if service.get("running") and name and provider_name:
if name not in added:
added.append(name)
if job_id not in added:
added.append(job_id)
schedulers.append(schemas.ScheduleInfo(
id=job_id,
name=name,
Expand All @@ -609,11 +610,11 @@ def list(self) -> List[schemas.ScheduleInfo]:
))
# 获取其他待执行任务
for job in jobs:
if job.name not in added:
added.append(job.name)
job_id = job.id.split("|")[0]
if job_id not in added:
added.append(job_id)
else:
continue
job_id = job.id.split("|")[0]
service = self._jobs.get(job_id)
if not service:
continue
Expand Down
4 changes: 2 additions & 2 deletions version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
APP_VERSION = 'v2.5.1-1'
FRONTEND_VERSION = 'v2.5.1-1'
APP_VERSION = 'v2.5.2'
FRONTEND_VERSION = 'v2.5.2'
Loading
0