### Deploy SmartStrm with Docker Compose Source: https://context7.com/cp0204/smartstrm/llms.txt Recommended deployment method using docker-compose.yml for easier configuration management and service maintenance. This setup allows for detailed configuration of volumes, environment variables, and network settings. ```yaml name: smartstrm services: smartstrm: image: cp0204/smartstrm:latest container_name: smartstrm restart: unless-stopped network_mode: host volumes: - /yourpath/smartstrm/config:/app/config # 配置目录 - /yourpath/smartstrm/logs:/app/logs # 日志目录(可选) - /yourpath/smartstrm/strm:/strm # STRM 生成目录 environment: - PORT=8024 # 管理端口 - ADMIN_USERNAME=admin # 管理用户名 - ADMIN_PASSWORD=admin123 # 管理用户密码 - ENABLE_IPV6=true # 启用 IPv6 双栈(可选) - LOGIN_ENTRY=login # 安全登录入口(可选) - LICENSE=your_license_key # Pro 许可证密钥(可选) ``` -------------------------------- ### Update SmartStrm on FNOS NAS (Direct) Source: https://context7.com/cp0204/smartstrm/llms.txt Run this shell command to directly download and execute the SmartStrm update script on a FNOS NAS. The script handles detection of installation path, system architecture, downloading, backup, replacement, and service restart. ```bash bash <(sudo wget -qO- https://github.com/Cp0204/SmartStrm/raw/refs/heads/main/tools/fnos_update_smartstrm.sh) ``` -------------------------------- ### Configure 115 Cloud Open Platform Source: https://context7.com/cp0204/smartstrm/llms.txt Configure the 115 Cloud Open Platform driver. Supports one-click authorization and QR code login. Enable 'file_id_mode' to use file IDs instead of original paths for STRM files, which can reduce API requests and improve startup speed. ```json { "driver": "open115", "name": "我的115网盘", "config": { "app_id": "your_app_id", "app_secret": "your_app_secret", "refresh_token": "your_refresh_token", "file_id_mode": true } } // file_id_mode: 文件编号模式,以文件编号替代原路径写入 STRM // 可减少 API 请求,提高起播速度(推荐开启) ``` -------------------------------- ### Configure Tianyi Cloud Drive Source: https://context7.com/cp0204/smartstrm/llms.txt Set up the Tianyi Cloud Drive driver. Supports family sharing, QR code login, and direct link parsing for .cas files. Configure 'login_type' as 'password' or 'qrcode'. ```json { "driver": "cloud189", "name": "我的天翼云盘", "config": { "username": "your_phone_number", "password": "your_password", "family_id": "your_family_id", "login_type": "qrcode" } } // 支持家庭共享:配置 family_id 访问家庭云资源 // 支持 .cas 秒传文件:设置中加入 cas 扩展名,可直接播放 cas 生成的 strm // login_type: "password" 或 "qrcode"(二维码登录) ``` -------------------------------- ### Configure MoviePilot Organize Trigger Source: https://context7.com/cp0204/smartstrm/llms.txt Configures MoviePilot organize completion event triggers, supporting remote servers as media direct link sources (Pro feature). Use this to integrate STRM into your local media library when using remote servers for media. The source_path and target_path should be specified. ```bash # MoviePilot Webhook 配置 curl -X POST "http://yourip:8024/webhook/mp_organize" \ -H "Content-Type: application/json" \ -d '{ "token": "your_webhook_token", "task_name": "MoviePilot同步任务", "source_path": "/downloads/完成/电影名", "target_path": "/movies/电影名" }' ``` ```bash # 适用场景: 远程服务器作为媒体直链源,使用 STRM 集成到本地媒体库 ``` -------------------------------- ### Deploy SmartStrm with Docker Compose Source: https://github.com/cp0204/smartstrm/blob/main/README.md Recommended deployment method for SmartStrm using a docker-compose.yml file. Customize volume paths and environment variables as needed. Access the management backend at `http://yourip:8024` after deployment. ```yaml name: smartstrm services: smartstrm: image: cp0204/smartstrm:latest container_name: smartstrm restart: unless-stopped network_mode: host volumes: - /yourpath/smartstrm/config:/app/config # 挂载配置目录 - /yourpath/smartstrm/logs:/app/logs # 挂载日志目录,可选 - /yourpath/smartstrm/strm:/strm # 挂载 STRM 生成目录 # 以上 /yourpath 改为你实际存放配置的路径 environment: - PORT=8024 # 管理端口,可选 - ADMIN_USERNAME=admin # 管理用户名 - ADMIN_PASSWORD=admin123 # 管理用户密码 ``` -------------------------------- ### Configure OpenList/AList Storage Source: https://context7.com/cp0204/smartstrm/llms.txt Configure the OpenList or AList driver for SmartStrm. Supports signature functionality and subdirectory configuration via 'site_url'. Compatible with older AList versions and Xiaoya without a 'created' field. ```json { "driver": "openlist", "name": "我的AList", "config": { "url": "http://alist.example.com:5244", "token": "your_alist_token", "site_url": "/path/to/subdir", "sign_enabled": true } } // 支持配置 site_url 二级目录 // 兼容 AList 旧版和小雅无 created 字段 // sign_enabled: 启用签名功能 ``` -------------------------------- ### Configure Local File System Storage Source: https://context7.com/cp0204/smartstrm/llms.txt Set up the local file system driver for SmartStrm. Supports real-time file change monitoring for immediate synchronization (Pro feature). 'watch_enabled' must be set to true for this functionality. ```json { "driver": "local", "name": "本地媒体目录", "config": { "path": "/mnt/media", "compatibility_mode": true, "watch_enabled": true } } // compatibility_mode: 兼容模式 // 支持 CloudDrive2/Rclone/SMB 等挂载点的文件变更监听 // watch_enabled: 启用实时监听文件变更(Pro 功能) ``` -------------------------------- ### Configure WebDAV Storage Source: https://context7.com/cp0204/smartstrm/llms.txt Set up the WebDAV driver for SmartStrm, compatible with services like PikPak. Requires URL, username, and password. Supports UTC time format. ```json { "driver": "webdav", "name": "我的WebDAV存储", "config": { "url": "https://dav.example.com/dav", "username": "your_username", "password": "your_password" } } // 支持 UTC 时间格式 // 兼容 PikPak 等 WebDAV 服务 ``` -------------------------------- ### Configure 123 Cloud Open Platform Source: https://context7.com/cp0204/smartstrm/llms.txt Configure the 123 Cloud Open Platform driver. Requires developer registration. Supports enhanced directory change detection using directory size information, which is recommended to be enabled. ```json { "driver": "pan123", "name": "我的123云盘", "config": { "client_id": "your_client_id", "client_secret": "your_client_secret", "refresh_token": "your_refresh_token", "enhanced_dir_detection": true } } // enhanced_dir_detection: 增强目录变更检测 // 使用目录大小信息(有 10min 左右滞后)辅助识别多层级变更,建议开启 ``` -------------------------------- ### Deploy SmartStrm with Docker Source: https://github.com/cp0204/smartstrm/blob/main/README.md Run SmartStrm using Docker. Ensure to replace `/yourpath/` with your actual configuration path. The `PORT`, `ADMIN_USERNAME`, and `ADMIN_PASSWORD` environment variables are optional. ```bash docker run -d \ --name smartstrm \ --restart unless-stopped \ --network host \ -v /yourpath/smartstrm/config:/app/config \ -v /yourpath/smartstrm/logs:/app/logs \ -v /yourpath/smartstrm/strm:/strm \ -e PORT=8024 \ -e ADMIN_USERNAME=admin \ -e ADMIN_PASSWORD=admin123 \ cp0204/smartstrm:latest ``` -------------------------------- ### Configure Quark Cloud Drive Source: https://context7.com/cp0204/smartstrm/llms.txt Set up the Quark Cloud Drive driver for SmartStrm. Supports both QR code and cookie-based login. Configure the STRM resource request mode, with 'smart_fallback' recommended for optimal performance. ```json { "driver": "quark", "name": "我的夸克网盘", "config": { "cookie": "your_quark_cookie_here", "strm_mode": "smart_fallback", "transcode_quality": "1080p" } } // STRM 资源请求方式选项: // - "direct": 直链模式 // - "transcode": 转码模式 // - "smart_fallback": 智能回落(推荐,获取失败时自动回落到代理) // 夸克网盘TV 驱动 (quark_tv) 支持扫码登录,更友好支持 302 直链 ``` -------------------------------- ### Plugin System - Filename Keyword Skip Source: https://context7.com/cp0204/smartstrm/llms.txt Configure the filename keyword skip plugin to skip files containing specific keywords during generation, supporting regex matching. ```APIDOC ## 插件系统 - 文件名关键词跳过 配置文件名关键词跳过插件,生成时跳过包含特定关键词的文件,支持正则匹配。 ### Configuration ```json { "plugin": "filename_keyword_skip", "enabled": true, "config": { "keywords": ["样片", "预告", "trailer", "sample"], "use_regex": true, "regex_patterns": ["^\\.", "\\(\d+\)""], "mode": "exclude", "directory_only": false } } ``` ### Parameter Explanations - `mode`: "exclude" (exclude mode) / "include" (include only mode). - `directory_only`: Only effective for directories. Flexible configuration can achieve selective updates for specified directories within a task. ``` -------------------------------- ### Webhook API - MoviePilot Organize Complete Trigger Source: https://context7.com/cp0204/smartstrm/llms.txt Configure MoviePilot organization completion event triggers, supporting remote servers as direct media link sources (Pro feature). ```APIDOC ## Webhook API - MoviePilot 整理完成触发 配置 MoviePilot 整理完成事件触发,支持远程服务器作为媒体直链源(Pro 功能)。 ### Endpoint `POST /webhook/mp_organize` ### Request Body Example ```json { "token": "your_webhook_token", "task_name": "MoviePilot同步任务", "source_path": "/downloads/完成/电影名", "target_path": "/movies/电影名" } ``` ### Use Case Suitable for scenarios where a remote server acts as the media direct link source, integrating STRM into the local media library. ``` -------------------------------- ### Configure Custom STRM Filename Plugin Source: https://context7.com/cp0204/smartstrm/llms.txt This plugin allows for custom naming rules for STRM files. Configure the template, whether to remove the original extension, and if media extensions should be added. ```json { "plugin": "custom_strm_filename", "enabled": true, "config": { "template": "{filename}", "remove_extension": false, "add_media_extension": true } } ``` -------------------------------- ### STRM Task Configuration Source: https://context7.com/cp0204/smartstrm/llms.txt Create STRM generation tasks, configuring scan paths, Crontab schedules, and incremental options. ```APIDOC ## STRM 任务配置 创建 STRM 生成任务,配置扫描路径、Crontab 定时计划、增量生成等选项。 ### Request Body Example ```json { "name": "电影库同步任务", "storage_id": "storage_uuid_here", "scan_path": "/movies", "output_path": "/strm/movies", "crontab": "0 2 * * *", "incremental": true, "sync_delete": true, "media_extensions": ["mp4", "mkv", "avi", "rmvb", "ts", "iso"], "copy_extensions": ["nfo", "jpg", "png", "srt", "ass"], "min_file_size": 2097152, "file_id_mode": true } ``` ### Parameter Explanations - `crontab`: Crontab expression, e.g., "0 2 * * *" means execute at 2 AM every day. - `incremental`: Incremental generation mode, processes only changed files. - `sync_delete`: Synchronized deletion, automatically cleans local STRM when remote is deleted. - `min_file_size`: Media file size threshold (bytes), defaults to 2MB. - `file_id_mode`: File ID mode (recommended), reduces API requests. ``` -------------------------------- ### 302 Proxy Configuration Source: https://context7.com/cp0204/smartstrm/llms.txt Configure 302 direct link proxy for direct cloud drive streaming without consuming NAS bandwidth. Supports Emby/Jellyfin/Plex/Feiniu Video. ```APIDOC ## 302 代理配置 配置 302 直链代理,实现视频流直连网盘不占用 NAS 带宽,支持 Emby/Jellyfin/Plex/飞牛影视。 ### Basic Configuration ```yaml proxy_enabled: true proxy_port: 8097 # 代理端口 emby_url: "http://emby:8096" # Emby 服务地址 emby_api_key: "your_emby_api_key" # Emby API 密钥 ``` ### Advanced Options ```yaml smart_fallback: true # 智能回落,直链失败时自动代理 optimize_first_play: true # 优化 STRM 首播速度(实验性) hide_premiere_promo: true # 隐藏 Emby Premiere 推广 external_player_button: true # 嵌入调用外部播放器按钮 ``` ### Supported Media Server Ports Proxy - Emby/Jellyfin: Proxy original service port. - Feiniu Video: Proxy port 8005 or 5666. ``` -------------------------------- ### SmartStrm Environment Variables Source: https://context7.com/cp0204/smartstrm/llms.txt Configure core SmartStrm settings using environment variables. This includes management port, authentication credentials, security settings like custom login entry, and network configurations such as IPv6 enablement. ```bash # 基础配置 PORT=8024 # 管理端口,默认 8024 ADMIN_USERNAME=admin # 管理员用户名 ADMIN_PASSWORD=admin123 # 管理员密码 # 安全配置 LOGIN_ENTRY=login # 自定义登录入口路径,未登录不会自动跳转到登录页 LICENSE=your_license_key # Pro 版本许可证密钥 # 网络配置 ENABLE_IPV6=true # 启用 IPv6 监听,默认启用双栈 # 日志配置 # 默认保留主日志 7 天、任务日志 1000 行 ``` -------------------------------- ### Configure Infuse ISO Compatibility Plugin Source: https://context7.com/cp0204/smartstrm/llms.txt This plugin ensures compatibility with Infuse by naming generated ISO files with an .iso.strm suffix. It also includes an option to fix issues with signed playback when STRM settings or OpenList enable signature features. ```json { "plugin": "infuse_iso_compat", "enabled": true, "config": { "fix_signed_playback": true } } ``` -------------------------------- ### Configure Task Request Delay Plugin Source: https://context7.com/cp0204/smartstrm/llms.txt Implement a delay after each request during task execution to reduce the chance of being flagged by anti-scraping measures. Configure the delay in milliseconds and whether to delay on directory listing operations. ```json { "plugin": "task_request_delay", "enabled": true, "config": { "delay_ms": 500, "delay_on_list_dir": true, "delay_on_list_dir_fail": true } } ``` -------------------------------- ### Configure 302 Proxy Source: https://context7.com/cp0204/smartstrm/llms.txt Sets up a 302 direct link proxy to enable video streaming directly from cloud drives without consuming NAS bandwidth. Supports Emby, Jellyfin, Plex, and Feiniu Video. Advanced options include smart fallback, optimizing first play, hiding premiere promotions, and embedding external player buttons. ```yaml # 302 代理基础配置 proxy_enabled: true proxy_port: 8097 # 代理端口 emby_url: "http://emby:8096" # Emby 服务地址 emby_api_key: "your_emby_api_key" # Emby API 密钥 # 高级选项 smart_fallback: true # 智能回落,直链失败时自动代理 optimize_first_play: true # 优化 STRM 首播速度(实验性) hide_premiere_promo: true # 隐藏 Emby Premiere 推广 external_player_button: true # 嵌入调用外部播放器按钮 # 支持的媒体服务器端口代理 # Emby/Jellyfin: 代理原服务端口 # 飞牛影视: 代理 8005 端口或 5666 端口 ``` -------------------------------- ### Configure TMDB API for Media Renaming Source: https://context7.com/cp0204/smartstrm/llms.txt Set up the TMDB API key and define renaming templates for movies and TV shows. Supports various variables for customization, including title, original title, year, season, and episode numbers. ```json { "tmdb_api_key": "your_tmdb_api_key", "rename_template": { "movie": "{title} ({year})", "tv": "{title} ({year})/Season {season}/{title} - S{season:02d}E{episode:02d}", "variables": [ "{title}", "{title_original}", "{year}", "{season}", "{episode}" ] } } ``` -------------------------------- ### Configure FNOS Refresh Plugin Source: https://context7.com/cp0204/smartstrm/llms.txt Configure this plugin to refresh the FNOS media library when a task runs. It supports automatic media library matching, scanning specified directories, and automatically removing missing items. ```json { "plugin": "fnos_refresh", "enabled": true, "config": { "fnos_url": "http://fnos:5666", "fnos_token": "your_fnos_token", "force_https": false, "allow_self_signed": false, "auto_remove_missing": true } } ``` -------------------------------- ### Trigger STRM Task with QAS/CloudSaver Source: https://context7.com/cp0204/smartstrm/llms.txt Integrates with Quark-Auto-Save (QAS) or CloudSaver to automatically trigger STRM generation after saving. Specify the task name, target path, and drive type. Supported drive types include quark, quark_tv, open115, pan123, and cloud189. ```bash # QAS 触发任务 curl -X POST "http://yourip:8024/webhook/qas_strm" \ -H "Content-Type: application/json" \ -d '{ "token": "your_webhook_token", "task_name": "电影库同步任务", "target_path": "/movies/新电影", "drive_type": "quark" }' ``` ```bash # CloudSaver 触发任务 curl -X POST "http://yourip:8024/webhook/cs_strm" \ -H "Content-Type: application/json" \ -d '{ "token": "your_webhook_token", "task_name": "电视剧同步任务", "target_path": "/tvshows/新剧集", "drive_type": "open115" }' ``` ```bash # 支持的 drive_type: quark, quark_tv, open115, pan123, cloud189 ``` -------------------------------- ### Configure CloudDrive2 Real-time Trigger Source: https://context7.com/cp0204/smartstrm/llms.txt Configures CloudDrive2 file change notifications for real-time STRM generation after transfer (Pro feature). Set up the CloudDrive2 Webhook to POST to the specified URL. The storage_mapping parameter is used to map CloudDrive2 storage paths to SmartStrm storage paths. ```bash # CloudDrive2 Webhook 配置 # POST http://yourip:8024/webhook/cd2_change?token=your_webhook_token ``` ```json # 请求体示例 { "token": "your_webhook_token", "event": "file_change", "path": "/CloudDrive/movies/新电影", "storage_mapping": { "cd2_storage": "ss_storage/path" } } ``` ```bash # storage_mapping: CloudDrive2 存储到 SmartStrm 存储的路径映射 # 支持映射到 SS 存储的子路径,格式: "cd2_storage=ss_storage/path" ``` -------------------------------- ### Webhook API - QAS/CloudSaver Integration Source: https://context7.com/cp0204/smartstrm/llms.txt Integrate with Quark-Auto-Save (QAS) or CloudSaver to automatically trigger STRM generation after transfer completion. ```APIDOC ## Webhook API - QAS/CloudSaver 联动 与 Quark-Auto-Save (QAS) 或 CloudSaver 联动,转存完成后自动触发 STRM 生成。 ### Endpoint `POST /webhook/qas_strm` (for QAS) `POST /webhook/cs_strm` (for CloudSaver) ### Request Body (QAS Example) ```json { "token": "your_webhook_token", "task_name": "电影库同步任务", "target_path": "/movies/新电影", "drive_type": "quark" } ``` ### Request Body (CloudSaver Example) ```json { "token": "your_webhook_token", "task_name": "电视剧同步任务", "target_path": "/tvshows/新剧集", "drive_type": "open115" } ``` ### Supported `drive_type` `quark`, `quark_tv`, `open115`, `pan123`, `cloud189` ``` -------------------------------- ### Configure Filename Keyword Skip Plugin Source: https://context7.com/cp0204/smartstrm/llms.txt Configures a plugin to skip files containing specific keywords during generation, supporting regular expression matching. The 'mode' can be set to 'exclude' (default) or 'include'. 'directory_only' can be set to true to apply the rule only to directories. ```json { "plugin": "filename_keyword_skip", "enabled": true, "config": { "keywords": ["样片", "预告", "trailer", "sample"], "use_regex": true, "regex_patterns": ["^\\.", "\\(\d+\)"], "mode": "exclude", "directory_only": false } } ``` ```bash // mode: "exclude" 排除模式 / "include" 仅包含模式 // directory_only: 仅对目录生效 // 灵活配置可实现仅更新任务下的指定目录 ``` -------------------------------- ### STRM Signature Configuration Source: https://context7.com/cp0204/smartstrm/llms.txt Configure STRM signature functionality to prevent path guessing and enhance security. ```APIDOC ## STRM 签名配置 配置 STRM 签名功能,防止路径被猜解请求,增强安全性。 ### Configuration ```yaml strm_sign_enabled: true # 启用 STRM 签名 strm_sign_secret: "your_secret_key" # 签名密钥 ``` ### Notes 1. After enabling or changing the signature key, cloud drive STRM files need to be regenerated. 2. When the base URL is an internal IP and the built-in 302 proxy is used, internal requests are bypassed. 3. Updating to v0.4.5+ will enable signing by default. ### Signature Whitelist Automatically includes the target IP of the 302 proxy to improve proxy server compatibility. ``` -------------------------------- ### Configure STRM Content Replacement Plugin Source: https://context7.com/cp0204/smartstrm/llms.txt Use this plugin to automatically replace text content within STRM files during generation. It supports multiple replacement rules for batch modification of base addresses or paths. ```json { "plugin": "strm_content_replace", "enabled": true, "config": { "replacements": [ { "old": "http://old.domain.com", "new": "https://new.domain.com" }, { "old": "/old/path/", "new": "/new/path/" } ] } } ``` -------------------------------- ### Update SmartStrm on FNOS NAS (with Proxy) Source: https://context7.com/cp0204/smartstrm/llms.txt Use this command to run the SmartStrm update script on a FNOS NAS when a proxy is required for downloading. The script performs automatic detection, download, backup, replacement, and service restart. ```bash bash <(sudo wget -qO- https://github.com/Cp0204/SmartStrm/raw/refs/heads/main/tools/fnos_update_smartstrm.sh) --proxy ``` -------------------------------- ### Plugin System - Illegal Filename Fix Source: https://context7.com/cp0204/smartstrm/llms.txt Configure the illegal filename fix plugin to automatically rename illegal filenames on remote storage during task execution. ```APIDOC ## 插件系统 - 非法文件名修正 配置非法文件名修正插件,运行任务时自动重命名远端存储的非法文件名。 ### Configuration ```json { "plugin": "illegal_filename_fix", "enabled": true, "config": { "remove_chars": ["<", ">", ":", "\"", "/", "\\", "|", "?", "*"], "trim_spaces": true, "max_length": 200, "handle_chinese": true } } ``` ### Parameter Explanations - `remove_chars`: Illegal characters to remove. - `trim_spaces`: Trim leading and trailing spaces. - `max_length`: Maximum filename length; automatically truncated if exceeded. - `handle_chinese`: Correctly handles Chinese character truncation. ``` -------------------------------- ### Webhook API - General Task Trigger Source: https://context7.com/cp0204/smartstrm/llms.txt Trigger specified tasks via the Webhook API, supporting delayed execution and custom STRM parameter overrides. ```APIDOC ## Webhook API - 通用触发任务 通过 Webhook API 触发指定任务执行,支持延迟执行和自定义 STRM 参数覆盖。 ### Endpoint `POST /webhook/a_task` ### Request Body ```json { "token": "your_webhook_token", "task_id": "task_uuid_here", "delay": 5, "strm": { "base_url": "http://custom.base.url" } } ``` ### Response Example (Success) ```json { "code": 0, "message": "任务已触发", "task_id": "task_uuid_here" } ``` ``` -------------------------------- ### Configure Emby Deletion Sync Source: https://context7.com/cp0204/smartstrm/llms.txt Configures Emby deletion event synchronization to automatically delete remote cloud drive files when media is deleted from Emby. Add the provided URL to Emby's Webhook settings. SmartStrm will automatically parse STRM paths and delete corresponding remote files. ```bash # Emby Webhook 配置 # 在 Emby 设置 -> Webhooks 中添加以下 URL: # http://yourip:8024/webhook/emby_delete?token=your_webhook_token ``` ```json # Emby 发送的删除事件示例 { "Event": "library.deleted", "Item": { "Path": "/strm/movies/电影名称/电影名称.strm", "Type": "Movie" } } ``` ```bash # SmartStrm 自动解析 STRM 路径并删除对应的远端文件 ``` -------------------------------- ### Configure STRM Task Source: https://context7.com/cp0204/smartstrm/llms.txt Defines a STRM generation task with options for scan path, crontab schedule, incremental processing, and file extensions. Use incremental mode to process only changed files and sync_delete to clean up local STRM when remote files are deleted. File ID mode is recommended to reduce API requests. ```json { "name": "电影库同步任务", "storage_id": "storage_uuid_here", "scan_path": "/movies", "output_path": "/strm/movies", "crontab": "0 2 * * *", "incremental": true, "sync_delete": true, "media_extensions": ["mp4", "mkv", "avi", "rmvb", "ts", "iso"], "copy_extensions": ["nfo", "jpg", "png", "srt", "ass"], "min_file_size": 2097152, "file_id_mode": true } ``` -------------------------------- ### Webhook API - Emby Deletion Sync Source: https://context7.com/cp0204/smartstrm/llms.txt Configure Emby deletion event synchronization. When media is deleted from Emby, automatically delete the corresponding remote cloud drive file. ```APIDOC ## Webhook API - Emby 删除同步 配置 Emby 删除事件同步,当从 Emby 中删除媒体时自动删除远端网盘文件。 ### Emby Webhook Configuration Add the following URL in Emby Settings -> Webhooks: `http://yourip:8024/webhook/emby_delete?token=your_webhook_token` ### Emby Deletion Event Example ```json { "Event": "library.deleted", "Item": { "Path": "/strm/movies/电影名称/电影名称.strm", "Type": "Movie" } } ``` SmartStrm automatically parses the STRM path and deletes the corresponding remote file. ``` -------------------------------- ### Configure STRM Signature Source: https://context7.com/cp0204/smartstrm/llms.txt Enables STRM signature functionality to prevent path guessing and enhance security. A secret key is required. Enabling or changing the signature key necessitates regenerating STRM files. Internal IPs using the built-in 302 proxy are automatically signed. ```yaml # STRM 签名配置 strm_sign_enabled: true # 启用 STRM 签名 strm_sign_secret: "your_secret_key" # 签名密钥 # 注意事项: # 1. 启用或更换签名密钥后,云盘类 STRM 文件需要重新生成 # 2. 当基础地址是内网 IP 并使用自带的 302 代理时,内部免签放行 # 3. 更新到 v0.4.5+ 版本将默认开启签名 # 签名白名单 # 自动包含 302 代理的目标 IP,提升代理服务器兼容性 ``` -------------------------------- ### Webhook API - CloudDrive2 Real-time Trigger Source: https://context7.com/cp0204/smartstrm/llms.txt Configure CloudDrive2 file change notifications for real-time STRM generation after transfer (Pro feature). ```APIDOC ## Webhook API - CloudDrive2 实时触发 配置 CloudDrive2 文件变更通知,实现转存后实时触发 STRM 生成(Pro 功能)。 ### CloudDrive2 Webhook Configuration `POST http://yourip:8024/webhook/cd2_change?token=your_webhook_token` ### Request Body Example ```json { "token": "your_webhook_token", "event": "file_change", "path": "/CloudDrive/movies/新电影", "storage_mapping": { "cd2_storage": "ss_storage/path" } } ``` ### Parameter Explanations - `storage_mapping`: Maps CloudDrive2 storage to SmartStrm storage path. Supports mapping to subpaths of SS storage, format: `"cd2_storage=ss_storage/path"`. ``` -------------------------------- ### Trigger STRM Task via Webhook API Source: https://context7.com/cp0204/smartstrm/llms.txt Triggers a specified STRM task using the Webhook API. Supports delayed execution and custom STRM parameter overrides. Ensure the correct task ID and webhook token are provided. ```bash # 触发指定任务 curl -X POST "http://yourip:8024/webhook/a_task" \ -H "Content-Type: application/json" \ -d '{ "token": "your_webhook_token", "task_id": "task_uuid_here", "delay": 5, "strm": { "base_url": "http://custom.base.url" } }' ``` ```json # 响应示例 { "code": 0, "message": "任务已触发", "task_id": "task_uuid_here" } ``` -------------------------------- ### Configure Illegal Filename Fix Plugin Source: https://context7.com/cp0204/smartstrm/llms.txt Configures a plugin to automatically rename illegal filenames on remote storage during task execution. It supports removing specified characters, trimming spaces, setting a maximum filename length, and correctly handling Chinese character truncation. ```json { "plugin": "illegal_filename_fix", "enabled": true, "config": { "remove_chars": ["<", ">", ":", "\"", "/", "\\", "|", "?", "*"], "trim_spaces": true, "max_length": 200, "handle_chinese": true } } ``` ```bash // remove_chars: 需要移除的非法字符 // trim_spaces: 去除首尾空格 // max_length: 文件名最大长度,超长自动截断 // handle_chinese: 正确处理中文字符截断 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.