Documentation
¶
Index ¶
- Constants
- Variables
- func AddMyPublicKey(c *gin.Context)
- func AddOfflineDownload(c *gin.Context)
- func ArchiveDown(c *gin.Context)
- func ArchiveExtensions(c *gin.Context)
- func ArchiveInternalExtract(c *gin.Context)
- func ArchiveProxy(c *gin.Context)
- func BeginAuthnLogin(c *gin.Context)
- func BeginAuthnRegistration(c *gin.Context)
- func BuildIndex(c *gin.Context)
- func CanUserAccessItem(user *model.User, item *model.MediaItem) bool
- func CanUserAccessPath(user *model.User, reqPath string) bool
- func Cancel2FAById(c *gin.Context)
- func CancelTranscodeJob(c *gin.Context)
- func ClearIndex(c *gin.Context)
- func ClearMediaDB(c *gin.Context)
- func ClearMediaScanPathDB(c *gin.Context)
- func ClearMediaScrape(c *gin.Context)
- func ConvertSeed(c *gin.Context)
- func CreateMediaAppKey(c *gin.Context)
- func CreateMediaScanPath(c *gin.Context)
- func CreateMeta(c *gin.Context)
- func CreateSharing(c *gin.Context)
- func CreateStorage(c *gin.Context)
- func CreateUser(c *gin.Context)
- func CurrentUser(c *gin.Context)
- func DefaultSettings(c *gin.Context)
- func DelUserCache(c *gin.Context)
- func DeleteAuthnLogin(c *gin.Context)
- func DeleteInvalidMedia(c *gin.Context)
- func DeleteMediaAppKey(c *gin.Context)
- func DeleteMediaItemAdmin(c *gin.Context)
- func DeleteMediaScanPath(c *gin.Context)
- func DeleteMeta(c *gin.Context)
- func DeleteMyPublicKey(c *gin.Context)
- func DeletePublicKey(c *gin.Context)
- func DeleteSetting(c *gin.Context)
- func DeleteSharing(c *gin.Context)
- func DeleteStorage(c *gin.Context)
- func DeleteUser(c *gin.Context)
- func DiagnoseSeed(c *gin.Context)
- func DisableStorage(c *gin.Context)
- func Down(c *gin.Context)
- func EmbyAPI(c *gin.Context)
- func EnableStorage(c *gin.Context)
- func ExportMediaDB(c *gin.Context)
- func Favicon(c *gin.Context)
- func FinishAuthnLogin(c *gin.Context)
- func FinishAuthnRegistration(c *gin.Context)
- func FsArchiveDecompress(c *gin.Context)
- func FsArchiveList(c *gin.Context, req *ArchiveListReq, user *model.User)
- func FsArchiveListSplit(c *gin.Context)
- func FsArchiveMeta(c *gin.Context, req *ArchiveMetaReq, user *model.User)
- func FsArchiveMetaSplit(c *gin.Context)
- func FsBatchRename(c *gin.Context)
- func FsCopy(c *gin.Context)
- func FsDirs(c *gin.Context)
- func FsForm(c *gin.Context)
- func FsGet(c *gin.Context, req *FsGetReq, user *model.User)
- func FsGetDirectUploadInfo(c *gin.Context)
- func FsGetSplit(c *gin.Context)
- func FsList(c *gin.Context, req *ListReq, user *model.User)
- func FsListSplit(c *gin.Context)
- func FsMkdir(c *gin.Context)
- func FsMove(c *gin.Context)
- func FsOther(c *gin.Context)
- func FsRecursiveMove(c *gin.Context)
- func FsRegexRename(c *gin.Context)
- func FsRemove(c *gin.Context)
- func FsRemoveEmptyDirectory(c *gin.Context)
- func FsRename(c *gin.Context)
- func FsStream(c *gin.Context)
- func Generate2FA(c *gin.Context)
- func GenerateMediaStrm(c *gin.Context)
- func GenerateSeedForPaths(c *gin.Context)
- func GenerateTorrentForPath(c *gin.Context)
- func GetAuthnCredentials(c *gin.Context)
- func GetDriverInfo(c *gin.Context)
- func GetManualScanProgress(c *gin.Context)
- func GetMediaProgress(c *gin.Context)
- func GetMediaScanProgress(c *gin.Context)
- func GetMediaScrapeStats(c *gin.Context)
- func GetMediaStreamURL(c *gin.Context)
- func GetMediaStrm(c *gin.Context)
- func GetMediaUserDataBatch(c *gin.Context)
- func GetMeta(c *gin.Context)
- func GetOIDCClient(c *gin.Context, useCompatibility bool, redirectUri, method string) (*oauth2.Config, error)
- func GetProgress(c *gin.Context)
- func GetSetting(c *gin.Context)
- func GetSharing(c *gin.Context)
- func GetStorage(c *gin.Context)
- func GetUser(c *gin.Context)
- func ImportMediaDB(c *gin.Context)
- func InitSetup(c *gin.Context)
- func InitStatus(c *gin.Context)
- func Link(c *gin.Context)
- func ListDriverInfo(c *gin.Context)
- func ListDriverNames(c *gin.Context)
- func ListMediaAnnotationsAPI(c *gin.Context)
- func ListMediaAppKeys(c *gin.Context)
- func ListMediaConfigs(c *gin.Context)
- func ListMediaFavoritesAPI(c *gin.Context)
- func ListMediaItemsAdmin(c *gin.Context)
- func ListMediaResumeAPI(c *gin.Context)
- func ListMediaScanPaths(c *gin.Context)
- func ListMetas(c *gin.Context)
- func ListMyPublicKey(c *gin.Context)
- func ListPublicKeys(c *gin.Context)
- func ListSettings(c *gin.Context)
- func ListSharings(c *gin.Context)
- func ListStorages(c *gin.Context)
- func ListTranscodeJobs(c *gin.Context)
- func ListTranscodeWorkers(c *gin.Context)
- func ListUsers(c *gin.Context)
- func LoadAllStorages(c *gin.Context)
- func LogOut(c *gin.Context)
- func Login(c *gin.Context)
- func LoginHash(c *gin.Context)
- func LoginLdap(c *gin.Context)
- func LookUpAppKeyUser(key string) (*model.User, *model.MediaAppKey, bool)
- func MediaEmbyEnabled() bool
- func MediaEnabled() bool
- func MediaEpisodeFilePath(item *model.MediaItem, ep *model.EpisodeInfo) string
- func MediaItemFilePath(item *model.MediaItem) string
- func MediaStreamURL(c *gin.Context, item *model.MediaItem, ep *model.EpisodeInfo) string
- func MediaSubsonicEnabled() bool
- func MediaTypeEnabled(mediaType model.MediaType) bool
- func MediaTypeEnabledList() []model.MediaType
- func MultipartAbort(c *gin.Context)
- func MultipartChunk(c *gin.Context)
- func MultipartComplete(c *gin.Context)
- func MultipartInit(c *gin.Context)
- func MultipartStatus(c *gin.Context)
- func OIDCLoginCallback(c *gin.Context)
- func OfflineDownloadTools(c *gin.Context)
- func ParseSeed(c *gin.Context)
- func ParseTorrent(c *gin.Context)
- func Plist(c *gin.Context)
- func Proxy(c *gin.Context)
- func PublicGetAlbum(c *gin.Context)
- func PublicGetMedia(c *gin.Context)
- func PublicListAlbums(c *gin.Context)
- func PublicListFolders(c *gin.Context)
- func PublicListMedia(c *gin.Context)
- func PublicListScanPaths(c *gin.Context)
- func PublicMediaProxy(c *gin.Context)
- func PublicMediaStatus(c *gin.Context)
- func PublicMediaThumb(c *gin.Context)
- func PublicSettings(c *gin.Context)
- func QuickSaveSeed(c *gin.Context)
- func RequireMediaEnabled(c *gin.Context)
- func RequireMediaProtocol(enabled func() bool) gin.HandlerFunc
- func ResetToken(c *gin.Context)
- func Robots(c *gin.Context)
- func SSOLoginCallback(c *gin.Context)
- func SSOLoginRedirect(c *gin.Context)
- func SaveMediaConfig(c *gin.Context)
- func SaveMediaProgress(c *gin.Context)
- func SaveSettings(c *gin.Context)
- func Search(c *gin.Context)
- func SeedCapabilities(c *gin.Context)
- func Set115(c *gin.Context)
- func Set115Open(c *gin.Context)
- func Set123Open(c *gin.Context)
- func Set123Pan(c *gin.Context)
- func SetAria2(c *gin.Context)
- func SetEnableSharing(disable bool) func(ctx *gin.Context)
- func SetGuangYaPan(c *gin.Context)
- func SetMediaFavorite(c *gin.Context)
- func SetPikPak(c *gin.Context)
- func SetQbittorrent(c *gin.Context)
- func SetThunder(c *gin.Context)
- func SetThunderBrowser(c *gin.Context)
- func SetThunderX(c *gin.Context)
- func SetTransmission(c *gin.Context)
- func SetupTaskRoute(g *gin.RouterGroup)
- func SharingArchiveExtract(c *gin.Context)
- func SharingArchiveList(c *gin.Context, req *ArchiveListReq)
- func SharingArchiveMeta(c *gin.Context, req *ArchiveMetaReq)
- func SharingDown(c *gin.Context)
- func SharingGet(c *gin.Context, req *FsGetReq)
- func SharingList(c *gin.Context, req *ListReq)
- func SignedProxyURL(c *gin.Context, rawPath string) string
- func SignedStreamURL(c *gin.Context, rawPath string) string
- func SignedStreamURLWithBase(apiBase, rawPath string) string
- func StartManualScan(c *gin.Context)
- func StartMediaScan(c *gin.Context)
- func StartMediaScrape(c *gin.Context)
- func StopIndex(c *gin.Context)
- func StopManualScan(c *gin.Context)
- func SubsonicAPI(c *gin.Context)
- func SyncMediaAnnotationsAPI(c *gin.Context)
- func TCMaster(c *gin.Context)
- func TCPlaylist(c *gin.Context)
- func TCSegment(c *gin.Context)
- func TorrentRapidUpload(c *gin.Context)
- func TranscodePlay(c *gin.Context)
- func UpdateCurrent(c *gin.Context)
- func UpdateIndex(c *gin.Context)
- func UpdateMediaItemAdmin(c *gin.Context)
- func UpdateMediaScanPath(c *gin.Context)
- func UpdateMeta(c *gin.Context)
- func UpdateSeed(c *gin.Context)
- func UpdateSeedChannels(c *gin.Context)
- func UpdateSharing(c *gin.Context)
- func UpdateStorage(c *gin.Context)
- func UpdateUser(c *gin.Context)
- func UploadSeedAndParse(c *gin.Context)
- func UploadTorrentAndParse(c *gin.Context)
- func Verify2FA(c *gin.Context)
- func WorkerClaim(c *gin.Context)
- func WorkerHeartbeat(c *gin.Context)
- func WorkerJobFinish(c *gin.Context)
- func WorkerRegister(c *gin.Context)
- func WorkerSegmentUpload(c *gin.Context)
- type AddOfflineDownloadReq
- type ArchiveContentResp
- type ArchiveDecompressReq
- type ArchiveListReq
- type ArchiveMetaReq
- type ArchiveMetaResp
- type BatchRenameReq
- type CASInfoResp
- type CreateMediaScanPathReq
- type DirReq
- type DirResp
- type FsGetDirectUploadInfoReq
- type FsGetReq
- type FsGetResp
- type FsListResp
- type FsOtherReq
- type GenerateTorrentReq
- type InitSetupReq
- type ListReq
- type LoginReq
- type ManualScanReq
- type ManualScanResp
- type MediaExportData
- type MediaScrapeStatsResp
- type MediaStatus
- type MkdirOrLinkReq
- type MoveCopyReq
- type MultipartInitResp
- type ObjResp
- type ParseTorrentReq
- type ParseTorrentResp
- type RecursiveMoveReq
- type RegexRenameReq
- type RemoveEmptyDirectoryReq
- type RemoveReq
- type RenameReq
- type SSHKeyAddReq
- type SaveMediaConfigReq
- type ScanMediaReq
- type ScrapeMediaReq
- type SearchReq
- type SearchResp
- type SeedCapabilityReq
- type SeedConvertReq
- type SeedDataReq
- type SeedGenerateReq
- type SeedHashMatrix
- type SeedHashSelection
- type SeedQuickSaveReq
- type SeedRecalcFile
- type SeedUpdateChannelsReq
- type SeedUpdateReq
- type Set115OpenReq
- type Set115Req
- type Set123OpenReq
- type Set123PanReq
- type SetAria2Req
- type SetGuangYaPanReq
- type SetPikPakReq
- type SetQbittorrentReq
- type SetThunderBrowserReq
- type SetThunderReq
- type SetThunderXReq
- type SetTransmissionReq
- type SharingResp
- type StorageResp
- type TaskInfo
- type TorrentFileInfo
- type TorrentRapidUploadReq
- type UpdateIndexReq
- type UpdateMediaItemReq
- type UpdateMediaScanPathReq
- type UpdateSharingReq
- type UserResp
- type Verify2FAReq
Constants ¶
const ( CANCEL = "cancel" OVERWRITE = "overwrite" SKIP = "skip" )
Variables ¶
var ( AccessCache = cache.NewMemCache[interface{}]() AccessCountDelay = 30 * time.Minute )
Functions ¶
func AddMyPublicKey ¶
func AddOfflineDownload ¶
func ArchiveDown ¶
func ArchiveExtensions ¶
func ArchiveInternalExtract ¶
func ArchiveProxy ¶
func BeginAuthnLogin ¶
func BeginAuthnRegistration ¶
func BuildIndex ¶
func CanUserAccessItem ¶ added in v4.2.8
CanUserAccessItem 判断用户是否可访问某个媒体条目(含所属媒体类型开关)
func CanUserAccessPath ¶ added in v4.2.8
CanUserAccessPath 判断用户是否有权访问指定 VFS 路径 规则与文件浏览保持一致:base_path 前缀 + 元信息(meta) 读权限 + 隐藏文件规则。
user 为 nil 一律拒绝(fail-closed):所有调用点都应经过 Auth / embyAuth 拿到用户, 缺失用户说明鉴权链路出了问题,不能默认放行;被禁用的访客同样拒绝。
func Cancel2FAById ¶
func CancelTranscodeJob ¶ added in v4.2.8
CancelTranscodeJob POST /api/admin/transcode/cancel
func ClearIndex ¶
func ClearMediaScanPathDB ¶ added in v4.2.8
ClearMediaScanPathDB 清空指定扫描路径的媒体数据
func ClearMediaScrape ¶ added in v4.2.8
ClearMediaScrape 清空刮削数据(保留扫描记录,但清空所有刮削结果字段) 参数:media_type 可选,留空表示所有类型;item_id 暂不支持(统一为类型/全部)
func ConvertSeed ¶ added in v4.2.8
ConvertSeed converts between OSS, standard torrent+x-openlist and CAS containers.
func CreateMediaAppKey ¶ added in v4.2.8
CreateMediaAppKey 创建应用密钥(明文只在创建时返回一次)
func CreateMediaScanPath ¶ added in v4.2.8
CreateMediaScanPath 创建扫描路径
func CreateMeta ¶
func CreateSharing ¶ added in v4.1.2
func CreateStorage ¶
func CreateUser ¶
func CurrentUser ¶
CurrentUser get current user by token if token is empty, return guest user
func DefaultSettings ¶ added in v4.0.9
func DelUserCache ¶
func DeleteAuthnLogin ¶
func DeleteInvalidMedia ¶ added in v4.2.8
DeleteInvalidMedia 删除已失效的媒体条目(即对应文件 / 文件夹在存储中已不存在) 参数:media_type 可选,留空表示扫描所有类型 返回:检测总数、被删除条目数
func DeleteMediaAppKey ¶ added in v4.2.8
DeleteMediaAppKey 删除应用密钥
func DeleteMediaItemAdmin ¶ added in v4.2.8
DeleteMediaItemAdmin 后台删除媒体条目
func DeleteMediaScanPath ¶ added in v4.2.8
DeleteMediaScanPath 删除扫描路径
func DeleteMeta ¶
func DeleteMyPublicKey ¶
func DeletePublicKey ¶
func DeleteSetting ¶
func DeleteSharing ¶ added in v4.1.2
func DeleteStorage ¶
func DeleteUser ¶
func DiagnoseSeed ¶ added in v4.2.8
DiagnoseSeed reports conversion requirements for every supported container.
func DisableStorage ¶
func EnableStorage ¶
func ExportMediaDB ¶ added in v4.2.8
ExportMediaDB 导出媒体数据 query: media_type(可选,为空表示全部类型), scan_path_id(可选,单路径导出) 返回 JSON 文件下载流
func FinishAuthnLogin ¶
func FinishAuthnRegistration ¶
func FsArchiveDecompress ¶
func FsArchiveList ¶
func FsArchiveList(c *gin.Context, req *ArchiveListReq, user *model.User)
func FsArchiveListSplit ¶ added in v4.1.2
func FsArchiveMeta ¶
func FsArchiveMeta(c *gin.Context, req *ArchiveMetaReq, user *model.User)
func FsArchiveMetaSplit ¶ added in v4.1.2
func FsBatchRename ¶
FsBatchRename performs batch rename (individual item permission checks skipped for performance).
func FsCopy ¶
FsCopy performs batch copy (individual item permission checks skipped for performance).
func FsGetDirectUploadInfo ¶ added in v4.1.7
FsGetDirectUploadInfo returns the direct upload info if supported by the driver If the driver does not support direct upload, returns null for upload_info
func FsGetSplit ¶ added in v4.1.2
func FsListSplit ¶ added in v4.1.2
func FsMove ¶
FsMove performs batch move (individual item permission checks skipped for performance).
func FsRecursiveMove ¶
FsRecursiveMove recursively moves files (individual item permission checks skipped for performance).
func FsRegexRename ¶
FsRegexRename renames files by regex (individual item permission checks skipped for performance).
func FsRemove ¶
FsRemove performs batch remove (individual item permission checks skipped for performance).
func FsRemoveEmptyDirectory ¶
FsRemoveEmptyDirectory recursively removes empty directories (individual item permission checks skipped for performance).
func Generate2FA ¶
func GenerateMediaStrm ¶ added in v4.2.8
GenerateMediaStrm 手动批量生成 STRM
func GenerateSeedForPaths ¶ added in v4.2.8
GenerateSeedForPaths reads each file once while calculating complete hashes. Requests exceeding the synchronous size limit are queued as a background task.
func GenerateTorrentForPath ¶ added in v4.2.2
GenerateTorrentForPath 为指定路径的文件生成 torrent 这是一个通用接口,适用于所有驱动 会获取文件内容计算哈希,然后生成 torrent
func GetAuthnCredentials ¶
func GetDriverInfo ¶
func GetManualScanProgress ¶ added in v4.1.8
func GetMediaProgress ¶ added in v4.2.8
GetMediaProgress 查询单个条目(或选集)的播放进度
func GetMediaScanProgress ¶ added in v4.2.8
GetMediaScanProgress 获取扫描进度
func GetMediaScrapeStats ¶ added in v4.2.8
GetMediaScrapeStats 获取刮削统计(进程级累计值,重启清零) 返回字段:
- total_scraped : 累计触发刮削次数
- hit_count : 命中(含强命中)次数
- low_confidence_count : 仅低置信度兜底命中次数
- no_match_count : 完全未命中次数
- total_attempts : 累计 TMDB 搜索请求次数
- total_search_millis : 累计搜索耗时(毫秒)
func GetMediaStreamURL ¶ added in v4.2.8
GetMediaStreamURL 返回条目(或其中一集)的签名直链,供本地播放器/外链使用
func GetMediaStrm ¶ added in v4.2.8
GetMediaStrm 动态生成单个条目的 .strm 内容(详情页下载)
func GetMediaUserDataBatch ¶ added in v4.2.8
GetMediaUserDataBatch 批量查询当前用户对条目的播放状态(收藏/进度/已看) GET /fs/media/userdata?ids=1,2,3
func GetOIDCClient ¶
func GetProgress ¶
func GetSetting ¶
func GetSharing ¶ added in v4.1.2
func GetStorage ¶
func ImportMediaDB ¶ added in v4.2.8
ImportMediaDB 导入媒体数据 支持两种调用方式:
- multipart/form-data:file 字段携带导出生成的 JSON 文件
- application/json:直接 POST 整个 MediaExportData 结构
可选 query 参数 scan_path_id:当导入"scan_path"范围数据时, 把所有条目重定向到该扫描路径ID(覆盖文件中原有的 scan_path_id)。
func InitStatus ¶ added in v4.2.7
InitStatus 返回系统是否已完成初始化(即是否已存在管理员账号)。 前端据此判断是否跳转到安装向导。
func Link ¶
Link return real link, just for proxy program, it may contain cookie, so just allowed for admin
func ListDriverInfo ¶
func ListDriverNames ¶
func ListMediaAnnotationsAPI ¶ added in v4.2.8
ListMediaAnnotationsAPI 列出当前用户对某个条目保存的批注 GET /fs/media/annotations?item_id=1
func ListMediaAppKeys ¶ added in v4.2.8
ListMediaAppKeys 列出当前管理员的媒体应用密钥
func ListMediaConfigs ¶ added in v4.2.8
ListMediaConfigs 获取所有媒体库配置
func ListMediaFavoritesAPI ¶ added in v4.2.8
ListMediaFavoritesAPI 列出当前用户收藏的媒体条目 GET /fs/media/favorites?media_type=video&page=1&page_size=20
func ListMediaItemsAdmin ¶ added in v4.2.8
ListMediaItemsAdmin 后台分页查询媒体条目
func ListMediaResumeAPI ¶ added in v4.2.8
ListMediaResumeAPI 继续观看列表
func ListMediaScanPaths ¶ added in v4.2.8
ListMediaScanPaths 获取指定媒体类型的扫描路径列表
func ListMyPublicKey ¶
func ListPublicKeys ¶
func ListSettings ¶
func ListSharings ¶ added in v4.1.2
func ListStorages ¶
func ListTranscodeJobs ¶ added in v4.2.8
ListTranscodeJobs GET /api/admin/transcode/jobs (admin)
func ListTranscodeWorkers ¶ added in v4.2.8
ListTranscodeWorkers GET /api/admin/transcode/workers (admin)
func LoadAllStorages ¶
func LookUpAppKeyUser ¶ added in v4.2.8
LookUpAppKeyUser 按明文应用密钥查找对应用户与密钥记录。 Emby 与 Subsonic 的所有密钥认证都走这里,避免两套实现产生行为差异。
func MediaEmbyEnabled ¶ added in v4.2.8
func MediaEmbyEnabled() bool
MediaEmbyEnabled Emby 兼容 API 是否可用(依赖总开关)
func MediaEpisodeFilePath ¶ added in v4.2.8
func MediaEpisodeFilePath(item *model.MediaItem, ep *model.EpisodeInfo) string
MediaEpisodeFilePath 拼接文件夹型条目的单集文件路径
func MediaItemFilePath ¶ added in v4.2.8
MediaItemFilePath 拼接媒体条目对应的实际文件路径
func MediaStreamURL ¶ added in v4.2.8
MediaStreamURL 返回媒体条目(或其中一集)的签名直链
func MediaSubsonicEnabled ¶ added in v4.2.8
func MediaSubsonicEnabled() bool
MediaSubsonicEnabled OpenSubsonic API 是否可用(依赖总开关)
func MediaTypeEnabled ¶ added in v4.2.8
MediaTypeEnabled 判断某媒体类型是否启用扫描
func MediaTypeEnabledList ¶ added in v4.2.8
MediaTypeEnabledList 返回已启用的媒体类型
func MultipartAbort ¶ added in v4.2.5
MultipartAbort cancels the pipeline and discards the session.
func MultipartChunk ¶ added in v4.2.5
MultipartChunk ingests one chunk. Chunks are idempotent and may be sent concurrently and out of order within the receiving window. code 429 = window full (flow control, retry after a short delay), code 409 = the same chunk is already in flight on another connection.
func MultipartComplete ¶ added in v4.2.5
MultipartComplete waits for the pipeline outcome and reports it, mirroring how /fs/put only responds once the driver upload finished.
func MultipartInit ¶ added in v4.2.5
MultipartInit creates (or resumes) a multipart upload session and starts its upload pipeline. Headers mirror FsStream (fsup.go).
func MultipartStatus ¶ added in v4.2.5
MultipartStatus looks a session up by upload_id, or by path+size so an interrupted client can discover a resumable session.
func OIDCLoginCallback ¶
func OfflineDownloadTools ¶
func ParseSeed ¶ added in v4.2.8
ParseSeed parses OSS, torrent or CAS data into one preview contract.
func ParseTorrent ¶ added in v4.2.2
ParseTorrent 解析 torrent 文件,返回文件列表等信息
func PublicGetAlbum ¶ added in v4.2.8
PublicGetAlbum 公开获取专辑详情及曲目
func PublicListAlbums ¶ added in v4.2.8
PublicListAlbums 公开专辑列表(音乐)
func PublicListFolders ¶ added in v4.2.8
PublicListFolders 公开文件夹列表(目录浏览模式)
func PublicListMedia ¶ added in v4.2.8
PublicListMedia 公开媒体列表(前端浏览用)
func PublicListScanPaths ¶ added in v4.2.8
PublicListScanPaths 公开获取扫描路径列表(前端筛选用)
func PublicMediaProxy ¶ added in v4.2.8
PublicMediaProxy 代理外部封面图(TMDB/豆瓣/Discogs),解决客户端直连被墙的问题。 用法:/api/public/media/proxy?url=https%3A%2F%2Fimage.tmdb.org%2F...
func PublicMediaStatus ¶ added in v4.2.8
PublicMediaStatus 公开的媒体库状态
func PublicMediaThumb ¶ added in v4.2.8
PublicMediaThumb 读取本地缩略图目录中的文件。 缩略图由刮削器写入本地磁盘(非 VFS),因此不能用 /d 读取。 用法:/api/public/media/thumb?path=/imgs/xxx.jpg
func PublicSettings ¶
func QuickSaveSeed ¶ added in v4.2.8
QuickSaveSeed imports selected files without downloading when the target supports it.
func RequireMediaEnabled ¶ added in v4.2.8
RequireMediaEnabled 媒体库关闭时统一返回 404,使其表现为"功能不存在"
func RequireMediaProtocol ¶ added in v4.2.8
func RequireMediaProtocol(enabled func() bool) gin.HandlerFunc
RequireMediaProtocol 校验指定协议开关
func ResetToken ¶
func SSOLoginCallback ¶
func SSOLoginRedirect ¶
func SaveMediaProgress ¶ added in v4.2.8
func SaveSettings ¶
func SeedCapabilities ¶ added in v4.2.8
SeedCapabilities reports whether files can use hashes, source URLs or require downloading.
func Set115Open ¶ added in v4.0.9
func Set123Open ¶ added in v4.1.5
func SetEnableSharing ¶ added in v4.1.2
func SetGuangYaPan ¶ added in v4.2.5
func SetMediaFavorite ¶ added in v4.2.8
func SetQbittorrent ¶
func SetThunder ¶
func SetThunderBrowser ¶
func SetThunderX ¶ added in v4.1.0
func SetTransmission ¶
func SetupTaskRoute ¶
func SetupTaskRoute(g *gin.RouterGroup)
func SharingArchiveExtract ¶ added in v4.1.2
func SharingArchiveList ¶ added in v4.1.2
func SharingArchiveList(c *gin.Context, req *ArchiveListReq)
func SharingArchiveMeta ¶ added in v4.1.2
func SharingArchiveMeta(c *gin.Context, req *ArchiveMetaReq)
func SharingDown ¶ added in v4.1.2
func SharingGet ¶ added in v4.1.2
func SharingList ¶ added in v4.1.2
func SignedProxyURL ¶ added in v4.2.8
SignedProxyURL 构造经服务端代理的签名链接(/p)
func SignedStreamURL ¶ added in v4.2.8
SignedStreamURL 构造带签名的 /d 直链(绝对地址,供 Emby/Subsonic/STRM 使用)
func SignedStreamURLWithBase ¶ added in v4.2.8
SignedStreamURLWithBase 使用指定站点前缀构造签名直链
func StartManualScan ¶ added in v4.1.8
func StopManualScan ¶ added in v4.1.8
func SubsonicAPI ¶ added in v4.2.8
SubsonicAPI OpenSubsonic API 入口(/@rest/*)
func SyncMediaAnnotationsAPI ¶ added in v4.2.8
SyncMediaAnnotationsAPI 增量保存批注:upserts 覆盖同一 remote_id,deletes 按 remote_id 删除。 查看器每次改动只会带上变化的那几条,不需要整份文档重传。 POST /fs/media/annotations
func TCPlaylist ¶ added in v4.2.8
TCPlaylist GET /tc/:job/:token/:profile/playlist.m3u8 等待首切片就绪后返回;阻塞最多 30s
func TCSegment ¶ added in v4.2.8
TCSegment GET /tc/:job/:token/:profile/seg-:seq.ts 切片就绪则直接返回;否则等待最多 60s
func TorrentRapidUpload ¶ added in v4.2.2
TorrentRapidUpload 从 torrent 文件中提取 CAS 信息尝试秒传到天翼云
func TranscodePlay ¶ added in v4.2.8
TranscodePlay 入口:POST /api/fs/transcode body: {path}
行为:
- 检查 transcode_enabled
- fs.Get 获取文件并跑 Decide
- 不需要转码 → 返回 {transcode:false, direct: true}
- 需要转码 → 创建 Job 入队,返回 {transcode:true, job_id, master_url}
func UpdateCurrent ¶
func UpdateIndex ¶
func UpdateMediaItemAdmin ¶ added in v4.2.8
UpdateMediaItemAdmin 后台更新媒体条目
func UpdateMediaScanPath ¶ added in v4.2.8
UpdateMediaScanPath 更新扫描路径
func UpdateMeta ¶
func UpdateSeed ¶ added in v4.2.8
UpdateSeed edits seed metadata and optionally recalculates hashes from server files.
func UpdateSeedChannels ¶ added in v4.2.8
UpdateSeedChannels updates public discovery metadata and keeps the requested container.
func UpdateSharing ¶ added in v4.1.2
func UpdateStorage ¶
func UpdateUser ¶
func UploadSeedAndParse ¶ added in v4.2.8
UploadSeedAndParse parses a multipart seed upload with the same limits as JSON parsing.
func UploadTorrentAndParse ¶ added in v4.2.2
UploadTorrentAndParse 通过文件上传方式解析 torrent
func WorkerClaim ¶ added in v4.2.8
WorkerClaim POST /api/transcode/worker/claim
func WorkerHeartbeat ¶ added in v4.2.8
WorkerHeartbeat POST /api/transcode/worker/heartbeat
func WorkerJobFinish ¶ added in v4.2.8
WorkerJobFinish POST /api/transcode/worker/job/finish
func WorkerRegister ¶ added in v4.2.8
WorkerRegister POST /api/transcode/worker/register
func WorkerSegmentUpload ¶ added in v4.2.8
WorkerSegmentUpload PUT /api/transcode/worker/segment?job=&profile=&seq=&duration=&final=
Types ¶
type AddOfflineDownloadReq ¶
type ArchiveContentResp ¶
type ArchiveContentResp struct {
ObjResp
Children []ArchiveContentResp `json:"children"`
}
type ArchiveDecompressReq ¶
type ArchiveDecompressReq struct {
SrcDir string `json:"src_dir" form:"src_dir"`
DstDir string `json:"dst_dir" form:"dst_dir"`
Names []string `json:"name" form:"name"`
ArchivePass string `json:"archive_pass" form:"archive_pass"`
InnerPath string `json:"inner_path" form:"inner_path"`
CacheFull bool `json:"cache_full" form:"cache_full"`
PutIntoNewDir bool `json:"put_into_new_dir" form:"put_into_new_dir"`
Overwrite bool `json:"overwrite" form:"overwrite"`
}
type ArchiveListReq ¶
type ArchiveListReq struct {
ArchiveMetaReq
model.PageReq
InnerPath string `json:"inner_path" form:"inner_path"`
}
type ArchiveMetaReq ¶
type ArchiveMetaResp ¶
type BatchRenameReq ¶
type CASInfoResp ¶ added in v4.2.2
type CASInfoResp struct {
FileMD5 string `json:"file_md5"`
SliceMD5 string `json:"slice_md5"`
SliceSize int64 `json:"slice_size"`
Cloud string `json:"cloud"`
}
CASInfoResp CAS 信息响应
type CreateMediaScanPathReq ¶ added in v4.2.8
type CreateMediaScanPathReq struct {
MediaType model.MediaType `json:"media_type" binding:"required"`
Name string `json:"name"`
Path string `json:"path" binding:"required"`
PathMerge bool `json:"path_merge"`
TypeTag string `json:"type_tag"`
ContentTags string `json:"content_tags"`
EnableScrape bool `json:"enable_scrape"`
}
CreateMediaScanPathReq 创建扫描路径请求
type FsGetDirectUploadInfoReq ¶ added in v4.1.7
type FsListResp ¶
type FsListResp struct {
Content []ObjResp `json:"content"`
Total int64 `json:"total"`
Readme string `json:"readme"`
Header string `json:"header"`
Write bool `json:"write"`
WriteContentBypass bool `json:"write_content_bypass"`
Provider string `json:"provider"`
DirectUploadTools []string `json:"direct_upload_tools,omitempty"`
}
type FsOtherReq ¶
type FsOtherReq struct {
model.FsOtherArgs
Password string `json:"password" form:"password"`
}
type GenerateTorrentReq ¶ added in v4.2.2
type GenerateTorrentReq struct {
// Path 文件在 OpenList 中的路径
Path string `json:"path" binding:"required"`
// WithCAS 是否注入 CAS 扩展信息(仅天翼云需要)
WithCAS bool `json:"with_cas"`
}
GenerateTorrentReq 为指定路径的文件生成 torrent 请求
type InitSetupReq ¶ added in v4.2.7
type InitSetupReq struct {
Username string `json:"username" binding:"required"`
Password string `json:"password" binding:"required"`
SiteTitle string `json:"site_title"`
}
InitSetupReq 系统初始化请求体
type ManualScanReq ¶ added in v4.1.8
type ManualScanResp ¶ added in v4.1.8
type MediaExportData ¶ added in v4.2.8
type MediaExportData struct {
Version int `json:"version"`
ExportAt time.Time `json:"export_at"`
Scope string `json:"scope"`
MediaType model.MediaType `json:"media_type,omitempty"`
ScanPaths []model.MediaScanPath `json:"scan_paths"`
Items []model.MediaItem `json:"items"`
}
MediaExportData 导出数据结构 包含版本号便于后续兼容性升级;导出粒度由 scope 字段说明:
- "all" :所有类型的全部数据
- "media_type" :单个媒体类型(video/music/image/book)的全部数据
- "scan_path" :单个扫描路径下的数据(仅 1 个路径 + 该路径下的条目)
type MediaScrapeStatsResp ¶ added in v4.2.8
MediaScrapeStatsResp 刮削统计响应 包含 TMDB 视频刮削的累计指标,用于运维观测与命中率评估
type MediaStatus ¶ added in v4.2.8
type MediaStatus struct {
Enabled bool `json:"enabled"`
Types []string `json:"types"`
EmbyEnabled bool `json:"emby_enabled"`
SubsonicEnabled bool `json:"subsonic_enabled"`
EmbyBaseURL string `json:"emby_base_url"`
SubsonicBaseURL string `json:"subsonic_base_url"`
StrmPath string `json:"strm_path"`
StrmOnScan bool `json:"strm_on_scan"`
StrmSameDir bool `json:"strm_same_dir"`
ThumbPath string `json:"thumb_path"`
Version string `json:"version"`
ProxyCover bool `json:"proxy_cover"`
}
MediaStatus 媒体库状态(前端据此决定是否渲染媒体库入口/侧栏)
type MkdirOrLinkReq ¶
type MkdirOrLinkReq struct {
Path string `json:"path" form:"path"`
}
type MoveCopyReq ¶
type MultipartInitResp ¶ added in v4.2.5
type MultipartInitResp struct {
multipart.SessionSnapshot
Resumed bool `json:"resumed"`
}
type ObjResp ¶
type ObjResp struct {
Name string `json:"name"`
Size int64 `json:"size"`
IsDir bool `json:"is_dir"`
Modified time.Time `json:"modified"`
Created time.Time `json:"created"`
Sign string `json:"sign"`
Thumb string `json:"thumb"`
Type int `json:"type"`
HashInfoStr string `json:"hashinfo"`
HashInfo map[*utils.HashType]string `json:"hash_info"`
MountDetails *model.StorageDetails `json:"mount_details,omitempty"`
}
type ParseTorrentReq ¶ added in v4.2.2
type ParseTorrentReq struct {
// TorrentData Base64 编码的 torrent 文件内容
TorrentData string `json:"torrent_data" binding:"required"`
}
ParseTorrentReq 解析 torrent 文件请求
type ParseTorrentResp ¶ added in v4.2.2
type ParseTorrentResp struct {
// Name 种子名称
Name string `json:"name"`
// TotalSize 总大小
TotalSize int64 `json:"total_size"`
// PieceLength 分片大小
PieceLength int64 `json:"piece_length"`
// PieceCount 分片数量
PieceCount int `json:"piece_count"`
// InfoHash info_hash(十六进制)
InfoHash string `json:"info_hash"`
// Files 文件列表(多文件模式)
Files []TorrentFileInfo `json:"files"`
// HasCAS 是否包含 CAS 扩展信息
HasCAS bool `json:"has_cas"`
// CAS CAS 扩展信息
CAS *CASInfoResp `json:"cas,omitempty"`
}
ParseTorrentResp 解析 torrent 文件响应
type RecursiveMoveReq ¶
type RegexRenameReq ¶
type RemoveEmptyDirectoryReq ¶
type RemoveEmptyDirectoryReq struct {
SrcDir string `json:"src_dir"`
}
type SSHKeyAddReq ¶
type SaveMediaConfigReq ¶ added in v4.2.8
type SaveMediaConfigReq struct {
MediaType model.MediaType `json:"media_type" binding:"required"`
Enabled bool `json:"enabled"`
ScraperConfig *string `json:"scraper_config"`
}
SaveMediaConfigReq 保存配置请求
type ScanMediaReq ¶ added in v4.2.8
type ScanMediaReq struct {
MediaType model.MediaType `json:"media_type" binding:"required"`
ScanPathID uint `json:"scan_path_id"` // 0 表示扫描全部路径
}
ScanMediaReq 扫描请求
type ScrapeMediaReq ¶ added in v4.2.8
type ScrapeMediaReq struct {
MediaType model.MediaType `json:"media_type" binding:"required"`
ItemID uint `json:"item_id"` // 0 表示刮削全部未刮削的
}
ScrapeMediaReq 刮削请求
type SearchResp ¶
type SearchResp struct {
model.SearchNode
Type int `json:"type"`
}
type SeedCapabilityReq ¶ added in v4.2.8
type SeedCapabilityReq struct {
SeedDataReq
Paths []string `json:"paths"`
Path string `json:"path"`
Override string `json:"policy"`
}
SeedCapabilityReq supports source preflight and destination import planning.
type SeedConvertReq ¶ added in v4.2.8
type SeedConvertReq struct {
SeedDataReq
TargetFormat string `json:"target_format"`
Path string `json:"path"`
}
SeedConvertReq requests a container conversion without changing metadata.
type SeedDataReq ¶ added in v4.2.8
type SeedDataReq struct {
SeedData string `json:"seed_data"`
Format string `json:"format"`
FileName string `json:"file_name"`
}
SeedDataReq carries a bounded base64-encoded seed document. SeedData is intentionally NOT bound with `required` here: some requests that embed SeedDataReq (e.g. SeedCapabilityReq preflight) accept `paths` instead of `seed_data`. Required-ness is enforced inside decodeSeedData for the handlers that actually consume a seed document.
type SeedGenerateReq ¶ added in v4.2.8
type SeedGenerateReq struct {
Paths []string `json:"paths" binding:"required"`
Format string `json:"format"`
Formats []string `json:"formats"`
Name string `json:"name"`
Comment string `json:"comment"`
FileComments map[string]string `json:"file_comments"`
HashMatrix SeedHashMatrix `json:"hash_matrix"`
PieceSize int64 `json:"piece_size"`
Trackers []string `json:"trackers"`
Channels []torrent.SeedChannel `json:"channels"`
OutputPath string `json:"output_path"`
SavePath string `json:"save_path"`
IncludeDirectSource bool `json:"include_direct_source"`
DirectFiles []string `json:"direct_files"`
}
SeedGenerateReq generates one or more seed containers for existing files.
type SeedHashMatrix ¶ added in v4.2.8
type SeedHashMatrix struct {
MD5 SeedHashSelection `json:"md5"`
SHA1 SeedHashSelection `json:"sha1"`
SHA256 SeedHashSelection `json:"sha256"`
}
SeedHashMatrix controls the optional hash metadata stored in a seed.
type SeedHashSelection ¶ added in v4.2.8
SeedHashSelection controls whole-file and piece hash inclusion.
type SeedQuickSaveReq ¶ added in v4.2.8
type SeedQuickSaveReq struct {
SeedDataReq
Path string `json:"path" binding:"required"`
Files []string `json:"files"`
SelectedFiles []int `json:"selected_files"`
Tool string `json:"tool"`
DeletePolicy string `json:"delete_policy"`
Overwrite bool `json:"overwrite"`
TransitPath string `json:"transit_path"`
UpdateChannel bool `json:"update_channel"`
Options map[string]any `json:"options"`
}
SeedQuickSaveReq imports selected seed files using rapid upload or an existing source URL.
type SeedRecalcFile ¶ added in v4.2.8
type SeedRecalcFile struct {
Path string `json:"path"` // seed file relative path
SourcePath string `json:"source_path"` // server-side readable file path
}
SeedRecalcFile maps one seed file to a server-side path for re-hashing.
type SeedUpdateChannelsReq ¶ added in v4.2.8
type SeedUpdateChannelsReq struct {
SeedDataReq
Channels []torrent.SeedChannel `json:"channels"`
}
SeedUpdateChannelsReq replaces only public channel metadata.
type SeedUpdateReq ¶ added in v4.2.8
type SeedUpdateReq struct {
SeedDataReq
Comment *string `json:"comment"`
Trackers []string `json:"trackers"`
Channels []torrent.SeedChannel `json:"channels"`
FileComments map[string]string `json:"file_comments"`
FileSources map[string][]torrent.SeedSource `json:"file_sources"`
RemoveFiles []string `json:"remove_files"`
Recalculate bool `json:"recalculate"`
RecalcFiles []SeedRecalcFile `json:"recalc_files"`
HashMatrix SeedHashMatrix `json:"hash_matrix"`
PieceSize int64 `json:"piece_size"`
OutputPath string `json:"output_path"`
SavePath string `json:"save_path"`
Options map[string]any `json:"options"`
}
SeedUpdateReq edits metadata and optionally recalculates hashes.
type Set115OpenReq ¶ added in v4.0.9
type Set115OpenReq struct {
TempDir string `json:"temp_dir" form:"temp_dir"`
}
type Set123OpenReq ¶ added in v4.1.5
type Set123PanReq ¶ added in v4.1.10
type Set123PanReq struct {
TempDir string `json:"temp_dir" form:"temp_dir"`
}
type SetAria2Req ¶
type SetGuangYaPanReq ¶ added in v4.2.5
type SetGuangYaPanReq struct {
TempDir string `json:"temp_dir" form:"temp_dir"`
}
type SetPikPakReq ¶
type SetPikPakReq struct {
TempDir string `json:"temp_dir" form:"temp_dir"`
}
type SetQbittorrentReq ¶
type SetThunderBrowserReq ¶
type SetThunderBrowserReq struct {
TempDir string `json:"temp_dir" form:"temp_dir"`
}
type SetThunderReq ¶
type SetThunderReq struct {
TempDir string `json:"temp_dir" form:"temp_dir"`
}
type SetThunderXReq ¶ added in v4.1.0
type SetThunderXReq struct {
TempDir string `json:"temp_dir" form:"temp_dir"`
}
type SetTransmissionReq ¶
type SharingResp ¶ added in v4.1.2
type StorageResp ¶ added in v4.1.4
type StorageResp struct {
model.Storage
MountDetails *model.StorageDetails `json:"mount_details,omitempty"`
}
type TaskInfo ¶
type TaskInfo struct {
ID string `json:"id"`
Name string `json:"name"`
Creator string `json:"creator"`
CreatorRole int `json:"creator_role"`
State tache.State `json:"state"`
Status string `json:"status"`
Progress float64 `json:"progress"`
StartTime *time.Time `json:"start_time"`
EndTime *time.Time `json:"end_time"`
TotalBytes int64 `json:"total_bytes"`
Error string `json:"error"`
}
type TorrentFileInfo ¶ added in v4.2.2
TorrentFileInfo torrent 中的文件信息
type TorrentRapidUploadReq ¶ added in v4.2.2
type TorrentRapidUploadReq struct {
// TorrentData Base64 编码的 torrent 文件内容
TorrentData string `json:"torrent_data" binding:"required"`
// Path 目标路径
Path string `json:"path" binding:"required"`
}
TorrentRapidUploadReq 从 torrent 秒传请求
type UpdateIndexReq ¶
type UpdateMediaItemReq ¶ added in v4.2.8
type UpdateMediaItemReq struct {
ID uint `json:"id" binding:"required"`
ScrapedName string `json:"scraped_name"`
Description string `json:"description"`
Cover string `json:"cover"`
ReleaseDate string `json:"release_date"`
Rating float32 `json:"rating"`
Genre string `json:"genre"`
Authors string `json:"authors"`
Plot string `json:"plot"`
Reviews string `json:"reviews"`
AlbumName string `json:"album_name"`
AlbumArtist string `json:"album_artist"`
Publisher string `json:"publisher"`
ISBN string `json:"isbn"`
Hidden bool `json:"hidden"`
}
UpdateMediaItemReq 更新媒体条目请求
type UpdateMediaScanPathReq ¶ added in v4.2.8
type UpdateMediaScanPathReq struct {
ID uint `json:"id" binding:"required"`
Name string `json:"name"`
Path string `json:"path"`
PathMerge bool `json:"path_merge"`
TypeTag string `json:"type_tag"`
ContentTags string `json:"content_tags"`
EnableScrape bool `json:"enable_scrape"`
}
UpdateMediaScanPathReq 更新扫描路径请求
type UpdateSharingReq ¶ added in v4.1.2
type UpdateSharingReq struct {
Files []string `json:"files"`
Expires *time.Time `json:"expires"`
Pwd string `json:"pwd"`
MaxAccessed int `json:"max_accessed"`
Disabled bool `json:"disabled"`
Remark string `json:"remark"`
Readme string `json:"readme"`
Header string `json:"header"`
model.Sort
CreatorName string `json:"creator"`
Accessed int `json:"accessed"`
ID string `json:"id"`
NewID string `json:"new_id"`
}
type Verify2FAReq ¶
Source Files
¶
- archive.go
- auth.go
- const.go
- direct_upload.go
- down.go
- driver.go
- emby.go
- emby_browse.go
- emby_play.go
- fsbatch.go
- fsmanage.go
- fsread.go
- fsup.go
- helper.go
- index.go
- ldap_login.go
- media.go
- media_extra.go
- media_gate.go
- media_image.go
- media_ratelimit.go
- media_reader.go
- media_user.go
- meta.go
- multipart.go
- offline_download.go
- scan.go
- search.go
- setting.go
- setup.go
- sharing.go
- sshkey.go
- ssologin.go
- storage.go
- subsonic.go
- subsonic_handlers.go
- task.go
- torrent.go
- transcode.go
- user.go
- webauthn.go