Skip to main content

CloudMediaSync 增强版

PyPI - Version PyPI - Downloads PyPI - Wheel

在 CloudMediaSync 基础上增强了页面和消息渠道的一些功能,并增加了一些开放接口,便于其他程序调用。

部署

基于原版安装教程

1. 下载增强文件

进入CloudMediaSync部署目录,全选复制以下命令并执行,自动识别系统架构并下载对应文件(macOS 的 arm64 将自动映射为 aarch64):

arch=$(uname -m)
case "$arch" in
  x86_64|amd64)
    pkg_arch="x86_64"
    ;;
  arm64|aarch64)
    pkg_arch="aarch64"
    ;;
  *)
    echo "不支持的架构: $arch" >&2
    exit 1
    ;;
esac

URL="https://cnb.cool/ilay1678/cloud-media-sync-enhanced/-/git/raw/master/dist/usercustomize.cpython-312-${pkg_arch}-linux-gnu.so"
echo "Downloading $URL ..."
if command -v wget >/dev/null 2>&1; then
  wget -O usercustomize.so "$URL"
else
  curl -L "$URL" -o usercustomize.so
fi
echo "Saved to ./usercustomize.so"

2. 修改docker-compose.yaml文件

挂载增强文件并增加环境变量:

services:
  cloud-media-sync:
    privileged: true
    container_name: cloud-media-sync
    image: imaliang/cloud-media-sync:latest  # 使用原版镜像
    restart: always
    network_mode: bridge
    volumes:
      - "./config:/config"
      - "./logs:/logs"
      - "./cache:/var/cache/nginx/emby"
      - "/data/media:/media"
      # 挂载增强文件
      - "./usercustomize.so:/cms/cms-api/usercustomize.so"
    ports:
      - "9527:9527"
      - "9096:9096"
    environment:
      - PUID=0
      - PGID=0
      - UMASK=022
      - TZ=Asia/Shanghai
      - RUN_ENV=online
      - ADMIN_USERNAME=admin
      - ADMIN_PASSWORD=admin
      - CMS_API_TOKEN=cloud_media_sync
      - EMBY_HOST_PORT=http://172.17.0.1:8096
      - EMBY_API_KEY=xxx
      - DONATE_CODE=CMS_XXX_XXX
      # Panso配置(资源搜索所需)
      - PANSO_URL=http://your_panso_server_url
      - PANSO_USERNAME=your_username  # 可选,不配置表示无需认证
      - PANSO_PASSWORD=your_password  # 可选,不配置表示无需认证

3. 启动服务

docker-compose up -d

注意事项

  • 当前搜索能力基于 Panso,请确保配置 PANSO_URL
  • 如果 Panso 服务不需要认证,可以不配置 PANSO_USERNAME 和 PANSO_PASSWORD
  • 消息渠道和网页弹窗中的资源搜索均已切换为 Panso

页面增强

订阅弹窗内置 Panso 资源搜索

在订阅弹窗中可直接通过 Panso 搜索 115、阿里云盘、磁力和 ed2k 资源,并支持复制链接或直接转存。

消息渠道增强

功能概述

为 CloudMediaSynC 的 Telegram 机器人和企业微信渠道提供增强功能,基于 Panso 实现媒体资源搜索和转存。

主要功能

智能媒体搜索

  • 触发方式: 以 ? 或 ? 开头发送消息
  • 示例: ? 三体、? 复仇者联盟
  • 功能: 自动搜索电影、电视剧等媒体资源
  • 搜索源: Panso
  • 返回: 按网盘类型聚合的资源结果,支持继续查看链接并自动转存

Panso 搜索源

Panso 提供网盘链接聚合服务:

  • 搜索结果格式: 按网盘类型分组(百度网盘、阿里云盘、夸克网盘等)
  • 支持操作:
    • 显示各类型网盘的资源链接
    • 回复 p1、p2、p3... 查看详细链接并自动转存
    • 直接复制链接手动转存

开放接口

Panso 搜索接口

本系统提供了代理接口访问远程 Panso 服务。

工作原理

  • 当配置了 PANSO_URL 后,系统会自动连接到远程Panso服务
  • 如果配置了 PANSO_USERNAME 和 PANSO_PASSWORD,系统会自动向远程Panso服务认证
  • 用户无需手动登录,系统内部自动处理认证和token管理

本地代理接口 - POST /api/panso/search

通过本地API代理访问远程Panso服务的搜索功能。

请求参数:

参数名 类型 必填 描述
kw string 是 搜索关键词
channels string[] 否 搜索的频道列表,不提供则使用默认配置
conc number 否 并发搜索数量,不提供则自动设置
refresh boolean 否 强制刷新,不使用缓存
res string 否 结果类型:all/results/merge,默认merge
src string 否 数据来源:all/tg/plugin,默认all
plugins string[] 否 指定搜索的插件列表
cloud_types string[] 否 指定返回的网盘类型列表
ext object 否 扩展参数,传递给插件的自定义参数

请求示例:

{
  "kw": "三体",
  "res": "merge",
  "cloud_types": ["baidu", "aliyun", "quark"]
}

响应字段:

字段名 类型 描述
total number 搜索结果总数
results object[] 搜索结果数组,包含详细信息
merged_by_type object 按网盘类型分组的链接

响应示例:

{
  "total": 10,
  "merged_by_type": {
    "baidu": [
      {
        "url": "https://pan.baidu.com/s/xxxxx",
        "password": "1234",
        "note": "三体全集 4K",
        "datetime": "2024-01-01T00:00:00Z",
        "source": "tg:某频道",
        "images": ["https://example.com/image.jpg"]
      }
    ],
    "aliyun": [
      {
        "url": "https://www.aliyundrive.com/s/xxxxx",
        "password": "",
        "note": "三体 蓝光原盘",
        "datetime": "2024-01-02T00:00:00Z",
        "source": "plugin:某插件"
      }
    ]
  }
}

GET方式搜索 - GET /api/panso/search

也支持GET方式搜索,参数通过query string传递:

GET /api/panso/search?kw=三体&res=merge&cloud_types=baidu,aliyun

注意事项

  • 系统会自动处理与远程Panso服务的认证,无需手动登录
  • 如果环境变量配置了PANSO_USERNAME和PANSO_PASSWORD,系统会自动认证
  • 如果未配置认证信息,系统将尝试无认证访问远程Panso服务
  • Token管理完全自动化,包括过期重新获取
  • 建议使用POST方式传递复杂参数

Metadata

Release files for cms_enhance 2026033101

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for cms_enhance 2026033101
File Interpreter ABI Platform Actions
cms_enhance-2026033101-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details for cms_enhance-2026033101-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
cms_enhance-2026033101-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ ARM64 Details for cms_enhance-2026033101-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Total release size: 4.6 MB

Release files / cms_enhance-2026033101-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL cms_enhance-2026033101-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 2.4 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
cae5a5a40381f674261db974cb24cfed1bcb1cfe48286fb7ec96c734f89193bc
BLAKE2b-256 checksum
How to use checksums
8f5593d6bb0cceaed3c9b434b28238076adaf7a87e58947def29cc6c15420238
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / cms_enhance-2026033101-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL cms_enhance-2026033101-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 2.3 MB
Tags CPython 3.12 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
167cacc58e58218c39587276abcf6fd9f49fa66122491ac3bd039c37bce5f6f9
BLAKE2b-256 checksum
How to use checksums
e7edb51c9fc52df4e529c3cac46a0204a66c83697413b21a419c47ea581d22f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for cms_enhance 2026033101

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page