mirror of
https://github.com/thsrite/MoviePilot-Plugins.git
synced 2026-03-27 10:05:57 +00:00
fix #222
This commit is contained in:
@@ -3,12 +3,13 @@
|
||||
"name": "云盘Strm生成",
|
||||
"description": "监控文件创建,生成Strm文件。",
|
||||
"labels": "云盘",
|
||||
"version": "4.4.1",
|
||||
"version": "4.4.2",
|
||||
"icon": "https://raw.githubusercontent.com/thsrite/MoviePilot-Plugins/main/icons/create.png",
|
||||
"author": "thsrite",
|
||||
"level": 1,
|
||||
"v2": true,
|
||||
"history": {
|
||||
"v4.4.2": "fix bug",
|
||||
"v4.4.1": "支持[目录实时监控]插件联动",
|
||||
"v4.4": "修复bug",
|
||||
"v4.3": "回滚自定义媒体类型",
|
||||
|
||||
@@ -4,18 +4,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
|
||||
|
||||
|
||||
class CloudStrm(_PluginBase):
|
||||
@@ -26,7 +25,7 @@ class CloudStrm(_PluginBase):
|
||||
# 插件图标
|
||||
plugin_icon = "https://raw.githubusercontent.com/thsrite/MoviePilot-Plugins/main/icons/create.png"
|
||||
# 插件版本
|
||||
plugin_version = "4.4.1"
|
||||
plugin_version = "4.4.2"
|
||||
# 插件作者
|
||||
plugin_author = "thsrite"
|
||||
# 作者主页
|
||||
@@ -343,7 +342,7 @@ class CloudStrm(_PluginBase):
|
||||
if Path(dest_file).is_dir():
|
||||
if not Path(dest_file).exists():
|
||||
logger.info(f"创建目标文件夹 {dest_file}")
|
||||
os.makedirs(dest_file)
|
||||
os.makedirs(dest_file, exist_ok=True)
|
||||
continue
|
||||
else:
|
||||
# 非媒体文件
|
||||
@@ -354,7 +353,7 @@ class CloudStrm(_PluginBase):
|
||||
# 文件
|
||||
if not Path(dest_file).parent.exists():
|
||||
logger.info(f"创建目标文件夹 {Path(dest_file).parent}")
|
||||
os.makedirs(Path(dest_file).parent)
|
||||
os.makedirs(Path(dest_file).parent, exist_ok=True)
|
||||
|
||||
# 视频文件创建.strm文件
|
||||
if Path(dest_file).suffix.lower() in settings.RMT_MEDIAEXT:
|
||||
@@ -394,7 +393,7 @@ class CloudStrm(_PluginBase):
|
||||
|
||||
if not dest_path.exists():
|
||||
logger.info(f"创建目标文件夹 {dest_path}")
|
||||
os.makedirs(str(dest_path))
|
||||
os.makedirs(str(dest_path), exist_ok=True)
|
||||
|
||||
# 构造.strm文件路径
|
||||
strm_path = os.path.join(dest_path, f"{os.path.splitext(video_name)[0]}.strm")
|
||||
|
||||
Reference in New Issue
Block a user