mirror of
https://github.com/thsrite/MoviePilot-Plugins.git
synced 2026-06-03 07:26:47 +00:00
fix #121
This commit is contained in:
@@ -26,7 +26,7 @@ class CloudStrm(_PluginBase):
|
||||
# 插件图标
|
||||
plugin_icon = "https://raw.githubusercontent.com/thsrite/MoviePilot-Plugins/main/icons/create.png"
|
||||
# 插件版本
|
||||
plugin_version = "4.4"
|
||||
plugin_version = "4.4.1"
|
||||
# 插件作者
|
||||
plugin_author = "thsrite"
|
||||
# 作者主页
|
||||
@@ -165,6 +165,20 @@ class CloudStrm(_PluginBase):
|
||||
self._scheduler.print_jobs()
|
||||
self._scheduler.start()
|
||||
|
||||
@eventmanager.register(EventType.PluginAction)
|
||||
def cloudstrm_file(self, event: Event = None):
|
||||
if event:
|
||||
event_data = event.event_data
|
||||
if not event_data or event_data.get("action") != "cloudstrm_file":
|
||||
return
|
||||
|
||||
file_path = event_data.get("file_path")
|
||||
if not file_path:
|
||||
logger.error(f"缺少参数:{event_data}")
|
||||
return
|
||||
|
||||
self.__strm(source_file=file_path)
|
||||
|
||||
@eventmanager.register(EventType.PluginAction)
|
||||
def scan(self, event: Event = None):
|
||||
"""
|
||||
|
||||
@@ -3,18 +3,17 @@ import shutil
|
||||
import urllib.parse
|
||||
from datetime import datetime, timedelta
|
||||
from pathlib import Path
|
||||
|
||||
import pytz
|
||||
from typing import Any, List, Dict, Tuple, Optional
|
||||
|
||||
from app.core.event import eventmanager, Event
|
||||
from app.schemas.types import EventType
|
||||
import pytz
|
||||
from apscheduler.schedulers.background import BackgroundScheduler
|
||||
from apscheduler.triggers.cron import CronTrigger
|
||||
|
||||
from app.core.config import settings
|
||||
from app.core.event import eventmanager, Event
|
||||
from app.log import logger
|
||||
from app.plugins import _PluginBase
|
||||
from app.core.config import settings
|
||||
from app.schemas.types import EventType
|
||||
from app.utils.system import SystemUtils
|
||||
|
||||
|
||||
@@ -26,7 +25,7 @@ class CloudStrmIncrement(_PluginBase):
|
||||
# 插件图标
|
||||
plugin_icon = "https://raw.githubusercontent.com/thsrite/MoviePilot-Plugins/main/icons/create.png"
|
||||
# 插件版本
|
||||
plugin_version = "1.1.2"
|
||||
plugin_version = "1.1.3"
|
||||
# 插件作者
|
||||
plugin_author = "thsrite"
|
||||
# 作者主页
|
||||
@@ -164,6 +163,20 @@ class CloudStrmIncrement(_PluginBase):
|
||||
self._scheduler.print_jobs()
|
||||
self._scheduler.start()
|
||||
|
||||
@eventmanager.register(EventType.PluginAction)
|
||||
def cloudstrm_file(self, event: Event = None):
|
||||
if event:
|
||||
event_data = event.event_data
|
||||
if not event_data or event_data.get("action") != "cloudstrm_file":
|
||||
return
|
||||
|
||||
file_path = event_data.get("file_path")
|
||||
if not file_path:
|
||||
logger.error(f"缺少参数:{event_data}")
|
||||
return
|
||||
|
||||
self.__strm(source_file=file_path)
|
||||
|
||||
@eventmanager.register(EventType.PluginAction)
|
||||
def scan(self, event: Event = None):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user