{
  "openapi": "3.0.3",
  "info": {
    "title": "Drivemby · Emby 兼容 API",
    "version": "2026-09-23",
    "description": "Drivemby 提供的 **Emby 兼容 API**，不是完整 Emby 服务端实现。仅承诺本文列出的能力；目前不提供转码。\n\n### 接入步骤\n1. 在控制台「账号与安全 → Emby 服务连接」创建独立连接密码。\n2. 使用绑定邮箱和连接密码调用 AuthenticateByName，保存 AccessToken 与 User.Id。\n3. 打开认证设置，将 AccessToken 填入 X-Emby-Token（或 Bearer 二选一）。\n4. 获取 Views，使用分类 Id 作为 ParentId 浏览媒体，播放前请求 PlaybackInfo。\n\n### 兼容范围与扩展\n路径支持服务器根路径和 /emby 前缀，下面默认 /emby。媒体、图片与状态接口需要 VIP；账号信息只需登录。**播放历史 PlaybackHistory、待看 Watchlist、UserData.IsWatchlisted、详情 Images 和 ServerDomains 是 Drivemby 扩展**，这些扩展不属于标准 Emby 接口契约。分类以标准 CollectionFolder 下发，电影与剧集分别为 movies / tvshows。\n\n### 在线调试\n在线调试会向当前服务器发出真实请求，写操作会修改账号数据。授权仅留在当前页面内存，刷新后需重新填写；不要分享连接密码、Token 或签名播放地址。文档资源本地提供，不向外部验证器上传请求。\n\n### 通用约定\nJSON 错误为 {error:{code,message}}。400 参数无效；401 会话失效；403 权限不足；404 不存在或不可见；429 限流；502 无可用播放来源。分页从0开始，时间位置使用 ticks（每秒10,000,000）。"
  },
  "servers": [
    {
      "url": "/emby",
      "description": "当前服务器 · Emby 前缀"
    },
    {
      "url": "/",
      "description": "当前服务器 · 根路径兼容"
    }
  ],
  "tags": [
    {
      "name": "服务与认证"
    },
    {
      "name": "分类与媒体"
    },
    {
      "name": "图片"
    },
    {
      "name": "播放"
    },
    {
      "name": "观看与状态"
    },
    {
      "name": "Drivemby 扩展"
    },
    {
      "name": "其他兼容接口"
    },
    {
      "name": "后台管理"
    }
  ],
  "security": [
    {
      "EmbyToken": []
    },
    {
      "BearerAuth": []
    }
  ],
  "paths": {
    "/System/Info/Public": {
      "get": {
        "tags": [
          "服务与认证"
        ],
        "summary": "获取公开服务器信息",
        "description": "无需登录。",
        "operationId": "get__System_Info_Public",
        "parameters": [],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerInfo"
                }
              }
            }
          },
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "会话无效或已过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限或 VIP 不满足",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "不存在、不可见或不属于当前用户",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "触发限流，请稍后重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "外部服务暂不可用或没有可用播放来源",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/Users/Public": {
      "get": {
        "tags": [
          "服务与认证"
        ],
        "summary": "公开用户列表（空）",
        "description": "不公开账号信息，始终返回空数组。",
        "operationId": "get__Users_Public",
        "parameters": [],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/User"
                  }
                }
              }
            }
          },
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "会话无效或已过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限或 VIP 不满足",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "不存在、不可见或不属于当前用户",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "触发限流，请稍后重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "外部服务暂不可用或没有可用播放来源",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/Users/AuthenticateByName": {
      "post": {
        "tags": [
          "服务与认证"
        ],
        "summary": "使用邮箱和服务连接密码登录",
        "description": "在控制台「账号与安全 → Emby 服务连接」创建独立密码。不是邮箱验证码或 Passkey。保存 AccessToken 和 User.Id；打开认证设置 输入 Token。",
        "operationId": "post__Users_AuthenticateByName",
        "parameters": [],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "User": {
                      "$ref": "#/components/schemas/User"
                    },
                    "AccessToken": {
                      "type": "string",
                      "description": "后续请求携带的会话 Token"
                    },
                    "ServerId": {
                      "type": "string"
                    },
                    "SessionInfo": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "会话无效或已过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限或 VIP 不满足",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "不存在、不可见或不属于当前用户",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "触发限流，请稍后重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "外部服务暂不可用或没有可用播放来源",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "Username": {
                    "type": "string",
                    "format": "email",
                    "example": "you@example.com"
                  },
                  "Pw": {
                    "type": "string",
                    "format": "password",
                    "description": "自定义连接密码或默认生成的 6 位数字；旧版 dmb_ 长密码仍兼容"
                  },
                  "Password": {
                    "type": "string",
                    "format": "password",
                    "description": "兼容别名，与 Pw 至少提供一项"
                  }
                },
                "required": [
                  "Username"
                ]
              }
            }
          }
        }
      }
    },
    "/Sessions/Logout": {
      "post": {
        "tags": [
          "服务与认证"
        ],
        "summary": "注销当前会话",
        "description": "注销当前 Token。",
        "operationId": "post__Sessions_Logout",
        "parameters": [],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "会话无效或已过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限或 VIP 不满足",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "不存在、不可见或不属于当前用户",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "触发限流，请稍后重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "外部服务暂不可用或没有可用播放来源",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/Users/{uid}": {
      "get": {
        "tags": [
          "服务与认证"
        ],
        "summary": "获取当前用户资料",
        "description": "PrimaryImageTag 对应 Drivemby 默认 Logo。",
        "operationId": "get__Users_uid_",
        "parameters": [
          {
            "name": "uid",
            "in": "path",
            "required": true,
            "description": "当前用户 ID，必须与 Token 对应",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "会话无效或已过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限或 VIP 不满足",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "不存在、不可见或不属于当前用户",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "触发限流，请稍后重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "外部服务暂不可用或没有可用播放来源",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/System/Info": {
      "get": {
        "tags": [
          "服务与认证"
        ],
        "summary": "获取服务器信息",
        "description": "",
        "operationId": "get__System_Info",
        "parameters": [],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerInfo"
                }
              }
            }
          },
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "会话无效或已过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限或 VIP 不满足",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "不存在、不可见或不属于当前用户",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "触发限流，请稍后重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "外部服务暂不可用或没有可用播放来源",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/System/Ping": {
      "get": {
        "tags": [
          "服务与认证"
        ],
        "summary": "检查会话连通性",
        "description": "",
        "operationId": "get__System_Ping",
        "parameters": [],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "会话无效或已过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限或 VIP 不满足",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "不存在、不可见或不属于当前用户",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "触发限流，请稍后重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "外部服务暂不可用或没有可用播放来源",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "服务与认证"
        ],
        "summary": "检查会话连通性",
        "description": "",
        "operationId": "post__System_Ping",
        "parameters": [],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "会话无效或已过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限或 VIP 不满足",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "不存在、不可见或不属于当前用户",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "触发限流，请稍后重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "外部服务暂不可用或没有可用播放来源",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/System/Ext/ServerDomains": {
      "get": {
        "tags": [
          "Drivemby 扩展"
        ],
        "summary": "获取服务器地址",
        "description": "",
        "operationId": "get__System_Ext_ServerDomains",
        "parameters": [],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "会话无效或已过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限或 VIP 不满足",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "不存在、不可见或不属于当前用户",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "触发限流，请稍后重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "外部服务暂不可用或没有可用播放来源",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/Users/{uid}/Views": {
      "get": {
        "tags": [
          "分类与媒体"
        ],
        "summary": "获取分类媒体库",
        "description": "复用后台分类，拆成「动画 · 电影」「动画 · 剧集」等非空媒体库，另有未识别入口。电影 CollectionType=movies，剧集=tvshows。使用返回的 Id 作为 Items 的 ParentId。同一作品跨分类 ID 和用户状态一致。",
        "operationId": "get__Users_uid_Views",
        "parameters": [
          {
            "name": "uid",
            "in": "path",
            "required": true,
            "description": "当前用户 ID，必须与 Token 对应",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemList"
                }
              }
            }
          },
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "会话无效或已过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限或 VIP 不满足",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "不存在、不可见或不属于当前用户",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "触发限流，请稍后重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "外部服务暂不可用或没有可用播放来源",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/Items": {
      "get": {
        "tags": [
          "分类与媒体"
        ],
        "summary": "查询媒体列表",
        "description": "电影分类默认以合集聚合；以合集 Id 为 ParentId 获取成员。筛选收藏、已看、待看等状态时不合并合集。",
        "operationId": "get__Items",
        "parameters": [
          {
            "name": "StartIndex",
            "in": "query",
            "description": "从0开始",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "Limit",
            "in": "query",
            "description": "每页最多200条",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "ParentId",
            "in": "query",
            "description": "分类、合集或季的 ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Recursive",
            "in": "query",
            "description": "递归查询",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "IncludeItemTypes",
            "in": "query",
            "description": "逗号分隔，如 Movie,Series",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "SearchTerm",
            "in": "query",
            "description": "名称搜索",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Ids",
            "in": "query",
            "description": "逗号分隔的媒体 ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "AnyProviderIdEquals",
            "in": "query",
            "description": "多个 ID 为任一匹配，最多100个。格式 Tmdb.157744,Tmdb.243224 或 Imdb.tt1234567",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "IsPlayed",
            "in": "query",
            "description": "已看筛选",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "IsFavorite",
            "in": "query",
            "description": "收藏筛选",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "IsWatchlisted",
            "in": "query",
            "description": "Drivemby 扩展：待看筛选",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "Filters",
            "in": "query",
            "description": "支持 IsPlayed、IsUnplayed、IsFavorite、IsFavoriteOrLiked",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "SortBy",
            "in": "query",
            "description": "逗号分隔排序字段：SortName、DateCreated、DateAdded、PremiereDate、ProductionYear、DatePlayed、DateWatchlisted、PlayCount、ParentIndexNumber、IndexNumber",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "SortOrder",
            "in": "query",
            "description": "排序方向",
            "schema": {
              "type": "string",
              "enum": [
                "Ascending",
                "Descending"
              ],
              "default": "Ascending"
            }
          },
          {
            "name": "GroupItemsIntoCollections",
            "in": "query",
            "description": "电影分类默认合并合集；false 返回单部电影",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "Genres",
            "in": "query",
            "description": "逗号分隔的类型名称",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Studios",
            "in": "query",
            "description": "逗号分隔的制作方名称",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "StartItemId",
            "in": "query",
            "description": "从指定条目开始，包含该条目",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemList"
                }
              }
            }
          },
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "会话无效或已过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限或 VIP 不满足",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "不存在、不可见或不属于当前用户",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "触发限流，请稍后重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "外部服务暂不可用或没有可用播放来源",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/Users/{uid}/Items": {
      "get": {
        "tags": [
          "分类与媒体"
        ],
        "summary": "查询媒体列表",
        "description": "电影分类默认以合集聚合；以合集 Id 为 ParentId 获取成员。筛选收藏、已看、待看等状态时不合并合集。",
        "operationId": "get__Users_uid_Items",
        "parameters": [
          {
            "name": "uid",
            "in": "path",
            "required": true,
            "description": "当前用户 ID，必须与 Token 对应",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "StartIndex",
            "in": "query",
            "description": "从0开始",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "Limit",
            "in": "query",
            "description": "每页最多200条",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "ParentId",
            "in": "query",
            "description": "分类、合集或季的 ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Recursive",
            "in": "query",
            "description": "递归查询",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "IncludeItemTypes",
            "in": "query",
            "description": "逗号分隔，如 Movie,Series",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "SearchTerm",
            "in": "query",
            "description": "名称搜索",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Ids",
            "in": "query",
            "description": "逗号分隔的媒体 ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "AnyProviderIdEquals",
            "in": "query",
            "description": "多个 ID 为任一匹配，最多100个。格式 Tmdb.157744,Tmdb.243224 或 Imdb.tt1234567",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "IsPlayed",
            "in": "query",
            "description": "已看筛选",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "IsFavorite",
            "in": "query",
            "description": "收藏筛选",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "IsWatchlisted",
            "in": "query",
            "description": "Drivemby 扩展：待看筛选",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "Filters",
            "in": "query",
            "description": "支持 IsPlayed、IsUnplayed、IsFavorite、IsFavoriteOrLiked",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "SortBy",
            "in": "query",
            "description": "逗号分隔排序字段：SortName、DateCreated、DateAdded、PremiereDate、ProductionYear、DatePlayed、DateWatchlisted、PlayCount、ParentIndexNumber、IndexNumber",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "SortOrder",
            "in": "query",
            "description": "排序方向",
            "schema": {
              "type": "string",
              "enum": [
                "Ascending",
                "Descending"
              ],
              "default": "Ascending"
            }
          },
          {
            "name": "GroupItemsIntoCollections",
            "in": "query",
            "description": "电影分类默认合并合集；false 返回单部电影",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "Genres",
            "in": "query",
            "description": "逗号分隔的类型名称",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Studios",
            "in": "query",
            "description": "逗号分隔的制作方名称",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "StartItemId",
            "in": "query",
            "description": "从指定条目开始，包含该条目",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemList"
                }
              }
            }
          },
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "会话无效或已过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限或 VIP 不满足",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "不存在、不可见或不属于当前用户",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "触发限流，请稍后重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "外部服务暂不可用或没有可用播放来源",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/Users/{uid}/Items/{id}": {
      "get": {
        "tags": [
          "分类与媒体"
        ],
        "summary": "获取媒体详情及完整图片候选",
        "description": "Images 是 Drivemby 扩展，直接返回图片类型、索引、tag、语言、尺寸和无字标记。列表优先带字海报与背景，详情优先无字，缺失时回退。详情加载后应更新图片 tag；单集 Primary 仍为剧照。",
        "operationId": "get__Users_uid_Items_id_",
        "parameters": [
          {
            "name": "uid",
            "in": "path",
            "required": true,
            "description": "当前用户 ID，必须与 Token 对应",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "媒体 ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Item"
                }
              }
            }
          },
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "会话无效或已过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限或 VIP 不满足",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "不存在、不可见或不属于当前用户",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "触发限流，请稍后重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "外部服务暂不可用或没有可用播放来源",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/Users/{uid}/Items/Latest": {
      "get": {
        "tags": [
          "分类与媒体"
        ],
        "summary": "获取最新内容",
        "description": "注意：此接口返回数组，不是 Items 包装对象。",
        "operationId": "get__Users_uid_Items_Latest",
        "parameters": [
          {
            "name": "uid",
            "in": "path",
            "required": true,
            "description": "当前用户 ID，必须与 Token 对应",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Limit",
            "in": "query",
            "description": "最多200条",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Item"
                  }
                }
              }
            }
          },
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "会话无效或已过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限或 VIP 不满足",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "不存在、不可见或不属于当前用户",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "触发限流，请稍后重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "外部服务暂不可用或没有可用播放来源",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/Users/{uid}/Items/Resume": {
      "get": {
        "tags": [
          "观看与状态"
        ],
        "summary": "获取继续观看",
        "description": "UserData 包含 PlaybackPositionTicks、LastPlayedDate；已知总时长时返回 PlayedPercentage，未知则省略。",
        "operationId": "get__Users_uid_Items_Resume",
        "parameters": [
          {
            "name": "uid",
            "in": "path",
            "required": true,
            "description": "当前用户 ID，必须与 Token 对应",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "StartIndex",
            "in": "query",
            "description": "从0开始",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "Limit",
            "in": "query",
            "description": "每页最多200条",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemList"
                }
              }
            }
          },
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "会话无效或已过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限或 VIP 不满足",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "不存在、不可见或不属于当前用户",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "触发限流，请稍后重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "外部服务暂不可用或没有可用播放来源",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/Shows/{id}/Seasons": {
      "get": {
        "tags": [
          "分类与媒体"
        ],
        "summary": "获取剧集季列表",
        "description": "id 为 Series ID。",
        "operationId": "get__Shows_id_Seasons",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "媒体 ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemList"
                }
              }
            }
          },
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "会话无效或已过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限或 VIP 不满足",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "不存在、不可见或不属于当前用户",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "触发限流，请稍后重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "外部服务暂不可用或没有可用播放来源",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/Shows/{id}/Episodes": {
      "get": {
        "tags": [
          "分类与媒体"
        ],
        "summary": "获取单集列表",
        "description": "id 为 Series ID；包含季集编号、单集元数据、文件来源。季号0表示特别篇。",
        "operationId": "get__Shows_id_Episodes",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "媒体 ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "StartIndex",
            "in": "query",
            "description": "从0开始",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "Limit",
            "in": "query",
            "description": "每页最多200条",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "ParentId",
            "in": "query",
            "description": "分类、合集或季的 ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Recursive",
            "in": "query",
            "description": "递归查询",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "IncludeItemTypes",
            "in": "query",
            "description": "逗号分隔，如 Movie,Series",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "SearchTerm",
            "in": "query",
            "description": "名称搜索",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Ids",
            "in": "query",
            "description": "逗号分隔的媒体 ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "AnyProviderIdEquals",
            "in": "query",
            "description": "多个 ID 为任一匹配，最多100个。格式 Tmdb.157744,Tmdb.243224 或 Imdb.tt1234567",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "IsPlayed",
            "in": "query",
            "description": "已看筛选",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "IsFavorite",
            "in": "query",
            "description": "收藏筛选",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "IsWatchlisted",
            "in": "query",
            "description": "Drivemby 扩展：待看筛选",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "Filters",
            "in": "query",
            "description": "支持 IsPlayed、IsUnplayed、IsFavorite、IsFavoriteOrLiked",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "SortBy",
            "in": "query",
            "description": "逗号分隔排序字段：SortName、DateCreated、DateAdded、PremiereDate、ProductionYear、DatePlayed、DateWatchlisted、PlayCount、ParentIndexNumber、IndexNumber",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "SortOrder",
            "in": "query",
            "description": "排序方向",
            "schema": {
              "type": "string",
              "enum": [
                "Ascending",
                "Descending"
              ],
              "default": "Ascending"
            }
          },
          {
            "name": "GroupItemsIntoCollections",
            "in": "query",
            "description": "电影分类默认合并合集；false 返回单部电影",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "Genres",
            "in": "query",
            "description": "逗号分隔的类型名称",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Studios",
            "in": "query",
            "description": "逗号分隔的制作方名称",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "StartItemId",
            "in": "query",
            "description": "从指定条目开始，包含该条目",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "SeasonId",
            "in": "query",
            "description": "季 ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Season",
            "in": "query",
            "description": "季号",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "UserId",
            "in": "query",
            "description": "当前用户 ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemList"
                }
              }
            }
          },
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "会话无效或已过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限或 VIP 不满足",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "不存在、不可见或不属于当前用户",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "触发限流，请稍后重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "外部服务暂不可用或没有可用播放来源",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/Shows/NextUp": {
      "get": {
        "tags": [
          "分类与媒体"
        ],
        "summary": "获取下一集",
        "description": "根据观看记录返回下一未看普通集；有续播时不重复返回。",
        "operationId": "get__Shows_NextUp",
        "parameters": [
          {
            "name": "SeriesId",
            "in": "query",
            "description": "可限定一部剧集",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemList"
                }
              }
            }
          },
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "会话无效或已过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限或 VIP 不满足",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "不存在、不可见或不属于当前用户",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "触发限流，请稍后重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "外部服务暂不可用或没有可用播放来源",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/Items/{id}/PlaybackInfo": {
      "get": {
        "tags": [
          "播放"
        ],
        "summary": "获取最终可播放地址",
        "description": "Path / DirectStreamUrl 是最终绝对地址，无需再调 stream。按 RequiredHttpHeaders 设置媒体请求头；部分网盘签名绑定 UA，请提供实际播放请求的 PlaybackUserAgent。地址过期后重新获取。当前不转码。GET 从 query 读取，POST 可使用 JSON；重复身份参数必须一致。",
        "operationId": "get__Items_id_PlaybackInfo",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "媒体 ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "UserId",
            "in": "query",
            "description": "当前用户 ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "MediaSourceId",
            "in": "query",
            "description": "可选，选择具体来源",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "PlaybackUserAgent",
            "in": "query",
            "description": "实际播放请求的 User-Agent；未提供时使用本次请求 UA",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlaybackInfo"
                }
              }
            }
          },
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "会话无效或已过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限或 VIP 不满足",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "不存在、不可见或不属于当前用户",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "触发限流，请稍后重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "外部服务暂不可用或没有可用播放来源",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "播放"
        ],
        "summary": "获取最终可播放地址",
        "description": "Path / DirectStreamUrl 是最终绝对地址，无需再调 stream。按 RequiredHttpHeaders 设置媒体请求头；部分网盘签名绑定 UA，请提供实际播放请求的 PlaybackUserAgent。地址过期后重新获取。当前不转码。GET 从 query 读取，POST 可使用 JSON；重复身份参数必须一致。",
        "operationId": "post__Items_id_PlaybackInfo",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "媒体 ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "UserId",
            "in": "query",
            "description": "当前用户 ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "MediaSourceId",
            "in": "query",
            "description": "可选，选择具体来源",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "PlaybackUserAgent",
            "in": "query",
            "description": "实际播放请求的 User-Agent；未提供时使用本次请求 UA",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlaybackInfo"
                }
              }
            }
          },
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "会话无效或已过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限或 VIP 不满足",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "不存在、不可见或不属于当前用户",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "触发限流，请稍后重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "外部服务暂不可用或没有可用播放来源",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlaybackRequest"
              }
            }
          }
        }
      }
    },
    "/Sessions/Playing": {
      "post": {
        "tags": [
          "播放"
        ],
        "summary": "开始播放",
        "description": "使用获取 PlaybackInfo 的同一登录会话，并携带 PlaySessionId 与所选 MediaSourceId。PositionTicks 每秒10,000,000。Playing 立即记录历史；Progress/Stopped 保存位置，不要求先满30秒。自动已看另需有效播放证据和可信文件时长，上报的 RunTimeTicks 不作为依据。",
        "operationId": "post__Sessions_Playing",
        "parameters": [],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "会话无效或已过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限或 VIP 不满足",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "不存在、不可见或不属于当前用户",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "触发限流，请稍后重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "外部服务暂不可用或没有可用播放来源",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlayEvent"
              }
            }
          }
        }
      }
    },
    "/Sessions/Playing/Progress": {
      "post": {
        "tags": [
          "播放"
        ],
        "summary": "上报进度",
        "description": "使用获取 PlaybackInfo 的同一登录会话，并携带 PlaySessionId 与所选 MediaSourceId。PositionTicks 每秒10,000,000。Playing 立即记录历史；Progress/Stopped 保存位置，不要求先满30秒。自动已看另需有效播放证据和可信文件时长，上报的 RunTimeTicks 不作为依据。",
        "operationId": "post__Sessions_Playing_Progress",
        "parameters": [],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "会话无效或已过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限或 VIP 不满足",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "不存在、不可见或不属于当前用户",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "触发限流，请稍后重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "外部服务暂不可用或没有可用播放来源",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlayEvent"
              }
            }
          }
        }
      }
    },
    "/Sessions/Playing/Stopped": {
      "post": {
        "tags": [
          "播放"
        ],
        "summary": "结束播放",
        "description": "使用获取 PlaybackInfo 的同一登录会话，并携带 PlaySessionId 与所选 MediaSourceId。PositionTicks 每秒10,000,000。Playing 立即记录历史；Progress/Stopped 保存位置，不要求先满30秒。自动已看另需有效播放证据和可信文件时长，上报的 RunTimeTicks 不作为依据。",
        "operationId": "post__Sessions_Playing_Stopped",
        "parameters": [],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "会话无效或已过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限或 VIP 不满足",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "不存在、不可见或不属于当前用户",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "触发限流，请稍后重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "外部服务暂不可用或没有可用播放来源",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlayEvent"
              }
            }
          }
        }
      }
    },
    "/Sessions/Playing/Ping": {
      "post": {
        "tags": [
          "播放"
        ],
        "summary": "播放心跳（兼容空操作）",
        "description": "当前只返回成功，不保存进度；请用 Progress 更新观看记录。",
        "operationId": "post__Sessions_Playing_Ping",
        "parameters": [],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "会话无效或已过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限或 VIP 不满足",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "不存在、不可见或不属于当前用户",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "触发限流，请稍后重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "外部服务暂不可用或没有可用播放来源",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/Users/{uid}/FavoriteItems/{id}": {
      "post": {
        "tags": [
          "观看与状态"
        ],
        "summary": "添加收藏",
        "description": "独立更新此状态，不修改其他状态或播放进度。不需要请求体，兼容 application/json 空请求体。",
        "operationId": "post__Users_uid_FavoriteItems_id_",
        "parameters": [
          {
            "name": "uid",
            "in": "path",
            "required": true,
            "description": "当前用户 ID，必须与 Token 对应",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "媒体 ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserData"
                }
              }
            }
          },
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "会话无效或已过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限或 VIP 不满足",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "不存在、不可见或不属于当前用户",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "触发限流，请稍后重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "外部服务暂不可用或没有可用播放来源",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "观看与状态"
        ],
        "summary": "取消收藏",
        "description": "独立更新此状态，不修改其他状态或播放进度。不需要请求体，兼容 application/json 空请求体。",
        "operationId": "delete__Users_uid_FavoriteItems_id_",
        "parameters": [
          {
            "name": "uid",
            "in": "path",
            "required": true,
            "description": "当前用户 ID，必须与 Token 对应",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "媒体 ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserData"
                }
              }
            }
          },
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "会话无效或已过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限或 VIP 不满足",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "不存在、不可见或不属于当前用户",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "触发限流，请稍后重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "外部服务暂不可用或没有可用播放来源",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/Users/{uid}/PlayedItems/{id}": {
      "post": {
        "tags": [
          "观看与状态"
        ],
        "summary": "添加已看",
        "description": "手动标记或取消已看会清空当前播放位置。不改变收藏或待看。不需要请求体。",
        "operationId": "post__Users_uid_PlayedItems_id_",
        "parameters": [
          {
            "name": "uid",
            "in": "path",
            "required": true,
            "description": "当前用户 ID，必须与 Token 对应",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "媒体 ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserData"
                }
              }
            }
          },
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "会话无效或已过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限或 VIP 不满足",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "不存在、不可见或不属于当前用户",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "触发限流，请稍后重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "外部服务暂不可用或没有可用播放来源",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "观看与状态"
        ],
        "summary": "取消已看",
        "description": "手动标记或取消已看会清空当前播放位置。不改变收藏或待看。不需要请求体。",
        "operationId": "delete__Users_uid_PlayedItems_id_",
        "parameters": [
          {
            "name": "uid",
            "in": "path",
            "required": true,
            "description": "当前用户 ID，必须与 Token 对应",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "媒体 ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserData"
                }
              }
            }
          },
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "会话无效或已过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限或 VIP 不满足",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "不存在、不可见或不属于当前用户",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "触发限流，请稍后重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "外部服务暂不可用或没有可用播放来源",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/Users/{uid}/WatchlistItems/{id}": {
      "post": {
        "tags": [
          "Drivemby 扩展"
        ],
        "summary": "添加待看",
        "description": "独立更新此状态，不修改其他状态或播放进度。不需要请求体，兼容 application/json 空请求体。",
        "operationId": "post__Users_uid_WatchlistItems_id_",
        "parameters": [
          {
            "name": "uid",
            "in": "path",
            "required": true,
            "description": "当前用户 ID，必须与 Token 对应",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "媒体 ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserData"
                }
              }
            }
          },
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "会话无效或已过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限或 VIP 不满足",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "不存在、不可见或不属于当前用户",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "触发限流，请稍后重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "外部服务暂不可用或没有可用播放来源",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Drivemby 扩展"
        ],
        "summary": "取消待看",
        "description": "独立更新此状态，不修改其他状态或播放进度。不需要请求体，兼容 application/json 空请求体。",
        "operationId": "delete__Users_uid_WatchlistItems_id_",
        "parameters": [
          {
            "name": "uid",
            "in": "path",
            "required": true,
            "description": "当前用户 ID，必须与 Token 对应",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "媒体 ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserData"
                }
              }
            }
          },
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "会话无效或已过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限或 VIP 不满足",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "不存在、不可见或不属于当前用户",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "触发限流，请稍后重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "外部服务暂不可用或没有可用播放来源",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/Users/{uid}/Watchlist": {
      "get": {
        "tags": [
          "Drivemby 扩展"
        ],
        "summary": "获取独立待看清单",
        "description": "默认 DateWatchlisted / Descending；强制待看筛选、不合并合集。标记已看不会自动移出待看。列表与详情 UserData.IsWatchlisted 返回状态。后台「观看与清单」与此接口共用数据。",
        "operationId": "get__Users_uid_Watchlist",
        "parameters": [
          {
            "name": "uid",
            "in": "path",
            "required": true,
            "description": "当前用户 ID，必须与 Token 对应",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "StartIndex",
            "in": "query",
            "description": "从0开始",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "Limit",
            "in": "query",
            "description": "每页最多200条",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "ParentId",
            "in": "query",
            "description": "分类、合集或季的 ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Recursive",
            "in": "query",
            "description": "递归查询",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "IncludeItemTypes",
            "in": "query",
            "description": "逗号分隔，如 Movie,Series",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "SearchTerm",
            "in": "query",
            "description": "名称搜索",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Ids",
            "in": "query",
            "description": "逗号分隔的媒体 ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "AnyProviderIdEquals",
            "in": "query",
            "description": "多个 ID 为任一匹配，最多100个。格式 Tmdb.157744,Tmdb.243224 或 Imdb.tt1234567",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "IsPlayed",
            "in": "query",
            "description": "已看筛选",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "IsFavorite",
            "in": "query",
            "description": "收藏筛选",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "Filters",
            "in": "query",
            "description": "支持 IsPlayed、IsUnplayed、IsFavorite、IsFavoriteOrLiked",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "SortBy",
            "in": "query",
            "description": "逗号分隔排序字段：SortName、DateCreated、DateAdded、PremiereDate、ProductionYear、DatePlayed、DateWatchlisted、PlayCount、ParentIndexNumber、IndexNumber",
            "schema": {
              "type": "string",
              "default": "DateWatchlisted"
            }
          },
          {
            "name": "SortOrder",
            "in": "query",
            "description": "排序方向",
            "schema": {
              "type": "string",
              "enum": [
                "Ascending",
                "Descending"
              ],
              "default": "Descending"
            }
          },
          {
            "name": "Genres",
            "in": "query",
            "description": "逗号分隔的类型名称",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Studios",
            "in": "query",
            "description": "逗号分隔的制作方名称",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "StartItemId",
            "in": "query",
            "description": "从指定条目开始，包含该条目",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemList"
                }
              }
            }
          },
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "会话无效或已过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限或 VIP 不满足",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "不存在、不可见或不属于当前用户",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "触发限流，请稍后重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "外部服务暂不可用或没有可用播放来源",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/Users/{uid}/Items/{id}/HideFromResume": {
      "post": {
        "tags": [
          "观看与状态"
        ],
        "summary": "隐藏或恢复继续观看",
        "description": "不清空播放位置。",
        "operationId": "post__Users_uid_Items_id_HideFromResume",
        "parameters": [
          {
            "name": "uid",
            "in": "path",
            "required": true,
            "description": "当前用户 ID，必须与 Token 对应",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "媒体 ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Hide",
            "in": "query",
            "description": "true 隐藏，false 恢复",
            "schema": {
              "type": "boolean",
              "default": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserData"
                }
              }
            }
          },
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "会话无效或已过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限或 VIP 不满足",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "不存在、不可见或不属于当前用户",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "触发限流，请稍后重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "外部服务暂不可用或没有可用播放来源",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/Items/{id}/Images/{type}": {
      "get": {
        "tags": [
          "图片"
        ],
        "summary": "获取媒体图片",
        "description": "支持 Primary、Backdrop、Logo，按 tag 或类型内索引读取候选；不存在的图片404。详情 Images 提供完整候选，没有独立图片列表接口。",
        "operationId": "get__Items_id_Images_type_",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "媒体 ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "path",
            "required": true,
            "description": "图片类型",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tag",
            "in": "query",
            "description": "响应中的图片内容标签",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "图片字节",
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/webp": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "302": {
            "description": "重定向到图片地址",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "未登录"
          },
          "403": {
            "description": "权限不足"
          },
          "404": {
            "description": "图片不存在"
          }
        }
      },
      "head": {
        "tags": [
          "图片"
        ],
        "summary": "获取媒体图片",
        "description": "支持 Primary、Backdrop、Logo，按 tag 或类型内索引读取候选；不存在的图片404。详情 Images 提供完整候选，没有独立图片列表接口。",
        "operationId": "head__Items_id_Images_type_",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "媒体 ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "path",
            "required": true,
            "description": "图片类型",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tag",
            "in": "query",
            "description": "响应中的图片内容标签",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "图片字节",
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/webp": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "302": {
            "description": "重定向到图片地址",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "未登录"
          },
          "403": {
            "description": "权限不足"
          },
          "404": {
            "description": "图片不存在"
          }
        }
      }
    },
    "/Items/{id}/Images/{type}/{index}": {
      "get": {
        "tags": [
          "图片"
        ],
        "summary": "获取媒体图片",
        "description": "支持 Primary、Backdrop、Logo，按 tag 或类型内索引读取候选；不存在的图片404。详情 Images 提供完整候选，没有独立图片列表接口。",
        "operationId": "get__Items_id_Images_type_index_",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "媒体 ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "path",
            "required": true,
            "description": "图片类型",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "index",
            "in": "path",
            "required": true,
            "description": "图片类型内索引，从0开始",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "tag",
            "in": "query",
            "description": "响应中的图片内容标签",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "图片字节",
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/webp": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "302": {
            "description": "重定向到图片地址",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "未登录"
          },
          "403": {
            "description": "权限不足"
          },
          "404": {
            "description": "图片不存在"
          }
        }
      },
      "head": {
        "tags": [
          "图片"
        ],
        "summary": "获取媒体图片",
        "description": "支持 Primary、Backdrop、Logo，按 tag 或类型内索引读取候选；不存在的图片404。详情 Images 提供完整候选，没有独立图片列表接口。",
        "operationId": "head__Items_id_Images_type_index_",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "媒体 ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "path",
            "required": true,
            "description": "图片类型",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "index",
            "in": "path",
            "required": true,
            "description": "图片类型内索引，从0开始",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "tag",
            "in": "query",
            "description": "响应中的图片内容标签",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "图片字节",
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/webp": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "302": {
            "description": "重定向到图片地址",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "未登录"
          },
          "403": {
            "description": "权限不足"
          },
          "404": {
            "description": "图片不存在"
          }
        }
      }
    },
    "/Users/{uid}/Images/{type}": {
      "get": {
        "tags": [
          "图片"
        ],
        "summary": "获取默认用户头像",
        "description": "仅支持 Primary 和索引0，返回项目默认 Logo。只需登录。",
        "operationId": "get__Users_uid_Images_type_",
        "parameters": [
          {
            "name": "uid",
            "in": "path",
            "required": true,
            "description": "当前用户 ID，必须与 Token 对应",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "path",
            "required": true,
            "description": "图片类型",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tag",
            "in": "query",
            "description": "响应中的图片内容标签",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "图片字节",
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/webp": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "302": {
            "description": "重定向到图片地址",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "未登录"
          },
          "403": {
            "description": "权限不足"
          },
          "404": {
            "description": "图片不存在"
          }
        }
      },
      "head": {
        "tags": [
          "图片"
        ],
        "summary": "获取默认用户头像",
        "description": "仅支持 Primary 和索引0，返回项目默认 Logo。只需登录。",
        "operationId": "head__Users_uid_Images_type_",
        "parameters": [
          {
            "name": "uid",
            "in": "path",
            "required": true,
            "description": "当前用户 ID，必须与 Token 对应",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "path",
            "required": true,
            "description": "图片类型",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tag",
            "in": "query",
            "description": "响应中的图片内容标签",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "图片字节",
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/webp": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "302": {
            "description": "重定向到图片地址",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "未登录"
          },
          "403": {
            "description": "权限不足"
          },
          "404": {
            "description": "图片不存在"
          }
        }
      }
    },
    "/Users/{uid}/Images/{type}/{index}": {
      "get": {
        "tags": [
          "图片"
        ],
        "summary": "获取默认用户头像",
        "description": "仅支持 Primary 和索引0，返回项目默认 Logo。只需登录。",
        "operationId": "get__Users_uid_Images_type_index_",
        "parameters": [
          {
            "name": "uid",
            "in": "path",
            "required": true,
            "description": "当前用户 ID，必须与 Token 对应",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "path",
            "required": true,
            "description": "图片类型",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "index",
            "in": "path",
            "required": true,
            "description": "图片类型内索引，从0开始",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "tag",
            "in": "query",
            "description": "响应中的图片内容标签",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "图片字节",
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/webp": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "302": {
            "description": "重定向到图片地址",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "未登录"
          },
          "403": {
            "description": "权限不足"
          },
          "404": {
            "description": "图片不存在"
          }
        }
      },
      "head": {
        "tags": [
          "图片"
        ],
        "summary": "获取默认用户头像",
        "description": "仅支持 Primary 和索引0，返回项目默认 Logo。只需登录。",
        "operationId": "head__Users_uid_Images_type_index_",
        "parameters": [
          {
            "name": "uid",
            "in": "path",
            "required": true,
            "description": "当前用户 ID，必须与 Token 对应",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "path",
            "required": true,
            "description": "图片类型",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "index",
            "in": "path",
            "required": true,
            "description": "图片类型内索引，从0开始",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "tag",
            "in": "query",
            "description": "响应中的图片内容标签",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "图片字节",
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/webp": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "302": {
            "description": "重定向到图片地址",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "未登录"
          },
          "403": {
            "description": "权限不足"
          },
          "404": {
            "description": "图片不存在"
          }
        }
      }
    },
    "/Videos/{id}/stream": {
      "get": {
        "tags": [
          "播放"
        ],
        "summary": "302 跳转到媒体地址",
        "description": "兼容入口，通常直接使用 PlaybackInfo 的最终地址。",
        "operationId": "get__Videos_id_stream",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "媒体 ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "MediaSourceId",
            "in": "query",
            "description": "具体来源 ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "302": {
            "description": "媒体重定向",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "未登录"
          },
          "403": {
            "description": "权限不足"
          },
          "404": {
            "description": "来源不存在"
          },
          "502": {
            "description": "媒体地址获取失败"
          }
        }
      },
      "head": {
        "tags": [
          "播放"
        ],
        "summary": "302 跳转到媒体地址",
        "description": "兼容入口，通常直接使用 PlaybackInfo 的最终地址。",
        "operationId": "head__Videos_id_stream",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "媒体 ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "MediaSourceId",
            "in": "query",
            "description": "具体来源 ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "302": {
            "description": "媒体重定向",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "未登录"
          },
          "403": {
            "description": "权限不足"
          },
          "404": {
            "description": "来源不存在"
          },
          "502": {
            "description": "媒体地址获取失败"
          }
        }
      }
    },
    "/Videos/{id}/stream.{ext}": {
      "get": {
        "tags": [
          "播放"
        ],
        "summary": "302 跳转到媒体地址",
        "description": "兼容入口，通常直接使用 PlaybackInfo 的最终地址。",
        "operationId": "get__Videos_id_stream_ext_",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "媒体 ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ext",
            "in": "path",
            "required": true,
            "description": "图片类型",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "MediaSourceId",
            "in": "query",
            "description": "具体来源 ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "302": {
            "description": "媒体重定向",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "未登录"
          },
          "403": {
            "description": "权限不足"
          },
          "404": {
            "description": "来源不存在"
          },
          "502": {
            "description": "媒体地址获取失败"
          }
        }
      },
      "head": {
        "tags": [
          "播放"
        ],
        "summary": "302 跳转到媒体地址",
        "description": "兼容入口，通常直接使用 PlaybackInfo 的最终地址。",
        "operationId": "head__Videos_id_stream_ext_",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "媒体 ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ext",
            "in": "path",
            "required": true,
            "description": "图片类型",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "MediaSourceId",
            "in": "query",
            "description": "具体来源 ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "302": {
            "description": "媒体重定向",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "未登录"
          },
          "403": {
            "description": "权限不足"
          },
          "404": {
            "description": "来源不存在"
          },
          "502": {
            "description": "媒体地址获取失败"
          }
        }
      }
    },
    "/Items/{id}/Download": {
      "get": {
        "tags": [
          "播放"
        ],
        "summary": "302 跳转到媒体地址",
        "description": "兼容入口，通常直接使用 PlaybackInfo 的最终地址。",
        "operationId": "get__Items_id_Download",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "媒体 ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "MediaSourceId",
            "in": "query",
            "description": "具体来源 ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "302": {
            "description": "媒体重定向",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "未登录"
          },
          "403": {
            "description": "权限不足"
          },
          "404": {
            "description": "来源不存在"
          },
          "502": {
            "description": "媒体地址获取失败"
          }
        }
      },
      "head": {
        "tags": [
          "播放"
        ],
        "summary": "302 跳转到媒体地址",
        "description": "兼容入口，通常直接使用 PlaybackInfo 的最终地址。",
        "operationId": "head__Items_id_Download",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "媒体 ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "MediaSourceId",
            "in": "query",
            "description": "具体来源 ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "302": {
            "description": "媒体重定向",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "未登录"
          },
          "403": {
            "description": "权限不足"
          },
          "404": {
            "description": "来源不存在"
          },
          "502": {
            "description": "媒体地址获取失败"
          }
        }
      }
    },
    "/Items/Counts": {
      "get": {
        "tags": [
          "其他兼容接口"
        ],
        "summary": "统计媒体数量",
        "description": "",
        "operationId": "get__Items_Counts",
        "parameters": [],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "MovieCount": {
                      "type": "integer",
                      "format": "int64"
                    },
                    "SeriesCount": {
                      "type": "integer",
                      "format": "int64"
                    },
                    "EpisodeCount": {
                      "type": "integer",
                      "format": "int64"
                    },
                    "ItemCount": {
                      "type": "integer",
                      "format": "int64"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "会话无效或已过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限或 VIP 不满足",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "不存在、不可见或不属于当前用户",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "触发限流，请稍后重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "外部服务暂不可用或没有可用播放来源",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/Genres": {
      "get": {
        "tags": [
          "其他兼容接口"
        ],
        "summary": "获取类型",
        "description": "",
        "operationId": "get__Genres",
        "parameters": [
          {
            "name": "StartIndex",
            "in": "query",
            "description": "从0开始",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "Limit",
            "in": "query",
            "description": "每页最多200条",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "Id": {
                            "type": "string"
                          },
                          "Name": {
                            "type": "string"
                          },
                          "ImageTags": {
                            "type": "object"
                          }
                        }
                      }
                    },
                    "TotalRecordCount": {
                      "type": "integer",
                      "format": "int64"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "会话无效或已过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限或 VIP 不满足",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "不存在、不可见或不属于当前用户",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "触发限流，请稍后重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "外部服务暂不可用或没有可用播放来源",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/Studios": {
      "get": {
        "tags": [
          "其他兼容接口"
        ],
        "summary": "获取制作方",
        "description": "",
        "operationId": "get__Studios",
        "parameters": [
          {
            "name": "StartIndex",
            "in": "query",
            "description": "从0开始",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "Limit",
            "in": "query",
            "description": "每页最多200条",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "Id": {
                            "type": "string"
                          },
                          "Name": {
                            "type": "string"
                          },
                          "ImageTags": {
                            "type": "object"
                          }
                        }
                      }
                    },
                    "TotalRecordCount": {
                      "type": "integer",
                      "format": "int64"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "会话无效或已过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限或 VIP 不满足",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "不存在、不可见或不属于当前用户",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "触发限流，请稍后重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "外部服务暂不可用或没有可用播放来源",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/Items/{id}/Similar": {
      "get": {
        "tags": [
          "其他兼容接口"
        ],
        "summary": "获取相似媒体",
        "description": "",
        "operationId": "get__Items_id_Similar",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "媒体 ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemList"
                }
              }
            }
          },
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "会话无效或已过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限或 VIP 不满足",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "不存在、不可见或不属于当前用户",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "触发限流，请稍后重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "外部服务暂不可用或没有可用播放来源",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/Videos/{id}/AdditionalParts": {
      "get": {
        "tags": [
          "其他兼容接口"
        ],
        "summary": "获取附加片段（空）",
        "description": "当前返回空数组。",
        "operationId": "get__Videos_id_AdditionalParts",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "媒体 ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Item"
                  }
                }
              }
            }
          },
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "会话无效或已过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限或 VIP 不满足",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "不存在、不可见或不属于当前用户",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "触发限流，请稍后重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "外部服务暂不可用或没有可用播放来源",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/Users/{uid}/PlaybackHistory": {
      "get": {
        "tags": [
          "Drivemby 扩展"
        ],
        "summary": "获取播放历史",
        "description": "每次实际播放会话一条记录，按 StartedAt、Id 倒序。优先使用 NextCursor 续页，不要同时使用 Cursor 和 StartIndex。与后台历史共用数据；不等同于继续观看或已看清单。",
        "operationId": "get__Users_uid_PlaybackHistory",
        "parameters": [
          {
            "name": "uid",
            "in": "path",
            "required": true,
            "description": "当前用户 ID，必须与 Token 对应",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "StartIndex",
            "in": "query",
            "description": "从0开始",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "Limit",
            "in": "query",
            "description": "每页最多200条",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "Cursor",
            "in": "query",
            "description": "上页 NextCursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "SearchTerm",
            "in": "query",
            "description": "按作品名搜索",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ItemId",
            "in": "query",
            "description": "限定媒体 ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HistoryList"
                }
              }
            }
          },
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "会话无效或已过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限或 VIP 不满足",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "不存在、不可见或不属于当前用户",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "触发限流，请稍后重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "外部服务暂不可用或没有可用播放来源",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/Users/{uid}/PlaybackHistory/{historyId}": {
      "delete": {
        "tags": [
          "Drivemby 扩展"
        ],
        "summary": "删除一条播放历史",
        "description": "仅删除历史，保留收藏、待看、已看及续播进度。已删除会话的迟到上报不会重新创建记录。",
        "operationId": "delete__Users_uid_PlaybackHistory_historyId_",
        "parameters": [
          {
            "name": "uid",
            "in": "path",
            "required": true,
            "description": "当前用户 ID，必须与 Token 对应",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "historyId",
            "in": "path",
            "required": true,
            "description": "图片类型",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "会话无效或已过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限或 VIP 不满足",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "不存在、不可见或不属于当前用户",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "触发限流，请稍后重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "外部服务暂不可用或没有可用播放来源",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/Users/{uid}/PlaybackHistory/Clear": {
      "post": {
        "tags": [
          "Drivemby 扩展"
        ],
        "summary": "清空截止时间前的播放历史",
        "description": "仅清空当前账号的历史；Before 是包含边界的截止时间。",
        "operationId": "post__Users_uid_PlaybackHistory_Clear",
        "parameters": [
          {
            "name": "uid",
            "in": "path",
            "required": true,
            "description": "当前用户 ID，必须与 Token 对应",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "deleted": {
                      "type": "integer",
                      "format": "int64"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "会话无效或已过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限或 VIP 不满足",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "不存在、不可见或不属于当前用户",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "触发限流，请稍后重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "外部服务暂不可用或没有可用播放来源",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "Before": {
                    "type": "string",
                    "format": "date-time",
                    "example": "2026-09-23T00:00:00Z"
                  }
                },
                "required": [
                  "Before"
                ]
              }
            }
          }
        }
      }
    },
    "/me/emby-connections": {
      "post": {
        "tags": [
          "后台管理"
        ],
        "summary": "创建服务连接密码",
        "description": "需控制台登录 Token。默认6位数字，也可指定6至128位密码；每个账号最多10个有效密码。",
        "operationId": "post__me_emby_connections",
        "parameters": [],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "password": {
                      "type": "string",
                      "description": "仅本次返回，请保存"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "会话无效或已过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限或 VIP 不满足",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "不存在、不可见或不属于当前用户",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "触发限流，请稍后重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "外部服务暂不可用或没有可用播放来源",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "/api",
            "description": "控制台管理 API"
          }
        ],
        "security": [
          {
            "ConsoleBearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "password": {
                    "type": "string",
                    "format": "password",
                    "minLength": 6,
                    "maxLength": 128,
                    "description": "选填；省略自动生成6位数字。仅保存加盐派生哈希，不保存明文。"
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "后台管理"
        ],
        "summary": "查看连接密码与设备",
        "description": "不返回密码或哈希。",
        "operationId": "get__me_emby_connections",
        "parameters": [],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "serverUrl": {
                      "type": "string"
                    },
                    "username": {
                      "type": "string"
                    },
                    "credentials": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "会话无效或已过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限或 VIP 不满足",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "不存在、不可见或不属于当前用户",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "触发限流，请稍后重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "外部服务暂不可用或没有可用播放来源",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "/api",
            "description": "控制台管理 API"
          }
        ],
        "security": [
          {
            "ConsoleBearer": []
          }
        ]
      }
    },
    "/me/emby-connections/{id}": {
      "patch": {
        "tags": [
          "后台管理"
        ],
        "summary": "修改服务连接密码",
        "description": "需控制台 Token，只能操作自己的有效连接。旧密码失效并注销关联设备会话。留空对象生成新的6位数字密码。",
        "operationId": "patch__me_emby_connections_id_",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "媒体 ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "password": {
                      "type": "string",
                      "description": "仅本次返回，请保存"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "会话无效或已过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限或 VIP 不满足",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "不存在、不可见或不属于当前用户",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "触发限流，请稍后重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "外部服务暂不可用或没有可用播放来源",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "/api",
            "description": "控制台管理 API"
          }
        ],
        "security": [
          {
            "ConsoleBearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "password": {
                    "type": "string",
                    "format": "password",
                    "minLength": 6,
                    "maxLength": 128,
                    "description": "选填；省略自动生成6位数字。仅保存加盐派生哈希，不保存明文。"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "后台管理"
        ],
        "summary": "撤销连接密码",
        "description": "撤销关联设备会话。",
        "operationId": "delete__me_emby_connections_id_",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "媒体 ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "会话无效或已过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限或 VIP 不满足",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "不存在、不可见或不属于当前用户",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "触发限流，请稍后重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "外部服务暂不可用或没有可用播放来源",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "/api",
            "description": "控制台管理 API"
          }
        ],
        "security": [
          {
            "ConsoleBearer": []
          }
        ]
      }
    },
    "/watch/history": {
      "get": {
        "tags": [
          "后台管理"
        ],
        "summary": "后台播放历史",
        "description": "需控制台 Token，与 PlaybackHistory 使用同一份记录。",
        "operationId": "get__watch_history",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "description": "上页 nextCursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "每页数量",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "作品名搜索",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true,
                        "description": "使用 camelCase 字段，如 id、itemId、itemName、startedAt、positionTicks、durationTicks"
                      }
                    },
                    "total": {
                      "type": "integer",
                      "format": "int64"
                    },
                    "nextCursor": {
                      "type": "string",
                      "nullable": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "会话无效或已过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限或 VIP 不满足",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "不存在、不可见或不属于当前用户",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "触发限流，请稍后重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "外部服务暂不可用或没有可用播放来源",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "/api",
            "description": "控制台管理 API"
          }
        ],
        "security": [
          {
            "ConsoleBearer": []
          }
        ]
      }
    },
    "/watch/history/{id}": {
      "delete": {
        "tags": [
          "后台管理"
        ],
        "summary": "后台删除历史记录",
        "description": "保留其他观看与清单状态。",
        "operationId": "delete__watch_history_id_",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "媒体 ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "会话无效或已过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限或 VIP 不满足",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "不存在、不可见或不属于当前用户",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "触发限流，请稍后重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "外部服务暂不可用或没有可用播放来源",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "/api",
            "description": "控制台管理 API"
          }
        ],
        "security": [
          {
            "ConsoleBearer": []
          }
        ]
      }
    },
    "/watch/history/clear": {
      "post": {
        "tags": [
          "后台管理"
        ],
        "summary": "后台清空播放历史",
        "description": "before 使用小写字段名。",
        "operationId": "post__watch_history_clear",
        "parameters": [],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "deleted": {
                      "type": "integer",
                      "format": "int64"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "会话无效或已过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限或 VIP 不满足",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "不存在、不可见或不属于当前用户",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "触发限流，请稍后重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "外部服务暂不可用或没有可用播放来源",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "/api",
            "description": "控制台管理 API"
          }
        ],
        "security": [
          {
            "ConsoleBearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "before": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "before"
                ]
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ConsoleBearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "控制台登录会话；不能使用 Emby Token。"
      },
      "EmbyToken": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Emby-Token",
        "description": "AuthenticateByName 返回的 AccessToken；与 Bearer 二选一。"
      },
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Emby 会话 Token，不是服务连接密码。"
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "description": "错误码",
                "example": "invalid_params"
              },
              "message": {
                "type": "string",
                "description": "错误说明",
                "example": "分页参数无效"
              }
            }
          }
        }
      },
      "User": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "当前用户 ID"
          },
          "Name": {
            "type": "string",
            "description": "绑定邮箱",
            "example": "you@example.com"
          },
          "ServerId": {
            "type": "string"
          },
          "PrimaryImageTag": {
            "type": "string",
            "description": "默认 Logo 内容哈希"
          },
          "HasPassword": {
            "type": "boolean",
            "description": "已配置密码"
          },
          "HasConfiguredPassword": {
            "type": "boolean",
            "description": "已配置密码"
          },
          "Configuration": {
            "type": "object",
            "additionalProperties": true
          },
          "Policy": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "UserData": {
        "type": "object",
        "properties": {
          "Key": {
            "type": "string",
            "description": "作品 ID"
          },
          "IsFavorite": {
            "type": "boolean",
            "description": "收藏状态"
          },
          "IsWatchlisted": {
            "type": "boolean",
            "description": "Drivemby 扩展：独立待看状态"
          },
          "Played": {
            "type": "boolean",
            "description": "已看状态"
          },
          "PlaybackPositionTicks": {
            "type": "integer",
            "format": "int64",
            "description": "播放时间单位：10,000,000 ticks = 1 秒。",
            "example": 600000000,
            "minimum": 0
          },
          "PlayCount": {
            "type": "integer",
            "format": "int64",
            "description": "播放次数",
            "example": 1
          },
          "LastPlayedDate": {
            "type": "string",
            "description": "最后观看时间；尚未观看时不提供",
            "example": "2026-09-23T00:00:00Z",
            "format": "date-time"
          },
          "PlayedPercentage": {
            "type": "number",
            "minimum": 0,
            "maximum": 100,
            "description": "已知总时长时返回百分比；未知时省略",
            "example": 5
          }
        }
      },
      "Image": {
        "type": "object",
        "properties": {
          "ImageType": {
            "type": "string",
            "enum": [
              "Primary",
              "Backdrop",
              "Logo"
            ]
          },
          "ImageIndex": {
            "type": "integer",
            "format": "int64",
            "description": "同一类型内索引",
            "example": 0
          },
          "ImageTag": {
            "type": "string",
            "description": "图片版本标签"
          },
          "Path": {
            "type": "string",
            "description": "图片路径"
          },
          "Url": {
            "type": "string",
            "description": "可访问图片地址；本地图片可为站内相对地址"
          },
          "Width": {
            "type": "integer",
            "format": "int64",
            "description": "TMDB 图片宽度",
            "example": 1000
          },
          "Height": {
            "type": "integer",
            "format": "int64",
            "description": "TMDB 图片高度",
            "example": 1500
          },
          "Language": {
            "type": "string",
            "description": "TMDB 语言标记",
            "nullable": true
          },
          "IsTextless": {
            "type": "boolean",
            "description": "依据 TMDB 语言标记识别无字图片"
          }
        }
      },
      "MediaSource": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "播放来源 ID"
          },
          "Name": {
            "type": "string",
            "description": "文件名",
            "example": "Example.S01E01.mp4"
          },
          "Type": {
            "type": "string",
            "example": "Default"
          },
          "Protocol": {
            "type": "string",
            "example": "Http"
          },
          "IsRemote": {
            "type": "boolean",
            "description": "远程文件"
          },
          "Container": {
            "type": "string",
            "example": "mp4"
          },
          "Size": {
            "type": "integer",
            "format": "int64",
            "description": "文件字节数"
          },
          "Path": {
            "type": "string",
            "description": "仅 PlaybackInfo 提供最终可播放地址"
          },
          "DirectStreamUrl": {
            "type": "string",
            "description": "仅 PlaybackInfo 提供最终可播放地址"
          },
          "RequiredHttpHeaders": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "播放时必须附带的请求头，例如 User-Agent"
          },
          "SupportsDirectPlay": {
            "type": "boolean",
            "description": "支持直接播放"
          },
          "SupportsDirectStream": {
            "type": "boolean",
            "description": "支持直连"
          },
          "SupportsTranscoding": {
            "type": "boolean",
            "description": "当前始终 false，不提供转码"
          },
          "MediaStreams": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          }
        }
      },
      "PlaybackInfo": {
        "type": "object",
        "properties": {
          "PlaySessionId": {
            "type": "string",
            "description": "播放上报需要的会话 ID"
          },
          "MediaSources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MediaSource"
            }
          }
        }
      },
      "PlaybackRequest": {
        "type": "object",
        "properties": {
          "UserId": {
            "type": "string",
            "description": "当前用户 ID"
          },
          "MediaSourceId": {
            "type": "string",
            "description": "可选，选择具体来源"
          },
          "PlaybackUserAgent": {
            "type": "string",
            "description": "实际播放请求的 User-Agent；未提供时使用本次请求 UA"
          }
        }
      },
      "PlayEvent": {
        "type": "object",
        "properties": {
          "ItemId": {
            "type": "string",
            "description": "作品或单集 ID"
          },
          "PlaySessionId": {
            "type": "string",
            "description": "PlaybackInfo 返回的会话 ID",
            "minLength": 32,
            "maxLength": 32
          },
          "MediaSourceId": {
            "type": "string",
            "description": "所选来源 ID；建议始终提供"
          },
          "PositionTicks": {
            "type": "integer",
            "format": "int64",
            "description": "播放时间单位：10,000,000 ticks = 1 秒。",
            "example": 600000000,
            "minimum": 0
          },
          "IsPaused": {
            "type": "boolean",
            "description": "是否暂停"
          }
        },
        "required": [
          "ItemId",
          "PlaySessionId"
        ]
      },
      "ServerInfo": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string"
          },
          "ServerName": {
            "type": "string",
            "example": "Drivemby"
          },
          "Version": {
            "type": "string",
            "description": "Emby 兼容版本"
          },
          "OperatingSystem": {
            "type": "string"
          },
          "LocalAddress": {
            "type": "string",
            "nullable": true
          },
          "WanAddress": {
            "type": "string"
          },
          "ProductName": {
            "type": "string"
          },
          "StartupWizardCompleted": {
            "type": "boolean",
            "description": "初始化完成"
          }
        }
      },
      "Item": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "媒体 ID"
          },
          "Name": {
            "type": "string",
            "description": "作品名称"
          },
          "Type": {
            "type": "string",
            "enum": [
              "CollectionFolder",
              "Movie",
              "BoxSet",
              "Series",
              "Season",
              "Episode",
              "Video",
              "Folder"
            ]
          },
          "IsFolder": {
            "type": "boolean",
            "description": "是否可包含子条目"
          },
          "ServerId": {
            "type": "string"
          },
          "ParentId": {
            "type": "string"
          },
          "CollectionType": {
            "type": "string",
            "enum": [
              "movies",
              "tvshows",
              "boxsets",
              "folders"
            ],
            "description": "分类媒体库类型"
          },
          "SortName": {
            "type": "string"
          },
          "Overview": {
            "type": "string",
            "description": "简介"
          },
          "ProductionYear": {
            "type": "integer",
            "format": "int64",
            "description": "年份",
            "example": 2025
          },
          "PremiereDate": {
            "type": "string",
            "format": "date-time"
          },
          "DateCreated": {
            "type": "string",
            "format": "date-time"
          },
          "RunTimeTicks": {
            "type": "integer",
            "format": "int64",
            "description": "播放时间单位：10,000,000 ticks = 1 秒。",
            "example": 600000000,
            "minimum": 0
          },
          "ProviderIds": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "example": {
              "Tmdb": "157744"
            }
          },
          "Genres": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "Studios": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "Id": {
                  "type": "string"
                },
                "Name": {
                  "type": "string"
                }
              }
            }
          },
          "ImageTags": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "BackdropImageTags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "SeriesId": {
            "type": "string"
          },
          "SeriesName": {
            "type": "string"
          },
          "SeasonId": {
            "type": "string"
          },
          "SeasonName": {
            "type": "string"
          },
          "ParentIndexNumber": {
            "type": "integer",
            "format": "int64",
            "description": "集所属季号",
            "example": 1
          },
          "IndexNumber": {
            "type": "integer",
            "format": "int64",
            "description": "季号或集号",
            "example": 1
          },
          "IndexNumberEnd": {
            "type": "integer",
            "format": "int64",
            "description": "多集合并文件的结束集号"
          },
          "ChildCount": {
            "type": "integer",
            "format": "int64"
          },
          "ParentLogoItemId": {
            "type": "string"
          },
          "ParentLogoImageTag": {
            "type": "string"
          },
          "ParentBackdropItemId": {
            "type": "string"
          },
          "ParentBackdropImageTags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "SeriesPrimaryImageTag": {
            "type": "string"
          },
          "UserData": {
            "$ref": "#/components/schemas/UserData"
          },
          "MediaSources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MediaSource"
            }
          },
          "Images": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Image"
            },
            "description": "Drivemby 扩展：仅详情接口返回完整图片候选；无需额外图片列表接口"
          }
        }
      },
      "ItemList": {
        "type": "object",
        "properties": {
          "Items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Item"
            }
          },
          "TotalRecordCount": {
            "type": "integer",
            "format": "int64",
            "description": "筛选后总条数，不是当前页条数",
            "example": 120
          }
        }
      },
      "HistoryEntry": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "历史记录 ID，删除时使用此 ID"
          },
          "ItemId": {
            "type": "string",
            "description": "媒体 ID；媒体删除后仍保留历史"
          },
          "Name": {
            "type": "string",
            "description": "播放时保存的作品名"
          },
          "MediaSourceId": {
            "type": "string",
            "nullable": true
          },
          "SourceName": {
            "type": "string",
            "description": "文件名",
            "nullable": true
          },
          "Client": {
            "type": "string",
            "nullable": true
          },
          "DeviceName": {
            "type": "string",
            "nullable": true
          },
          "StartedAt": {
            "type": "string",
            "format": "date-time"
          },
          "StoppedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "PlaybackPositionTicks": {
            "type": "integer",
            "format": "int64",
            "description": "播放时间单位：10,000,000 ticks = 1 秒。",
            "example": 600000000,
            "minimum": 0
          },
          "RunTimeTicks": {
            "type": "integer",
            "format": "int64",
            "description": "播放时间单位：10,000,000 ticks = 1 秒。",
            "example": 600000000,
            "minimum": 0,
            "nullable": true
          },
          "Completed": {
            "type": "boolean",
            "description": "本次播放是否完成"
          },
          "PlayedPercentage": {
            "type": "number",
            "description": "有可信时长时返回"
          }
        }
      },
      "HistoryList": {
        "type": "object",
        "properties": {
          "Items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HistoryEntry"
            }
          },
          "TotalRecordCount": {
            "type": "integer",
            "format": "int64",
            "description": "符合搜索的历史总数"
          },
          "NextCursor": {
            "type": "string",
            "description": "下一页游标；无更多时为 null",
            "nullable": true
          }
        }
      }
    }
  }
}