MCPcopy Index your code

hub / github.com/AkimioJR/MediaWarp / functions

Functions213 in github.com/AkimioJR/MediaWarp

↓ 35 callersMethodSet
(path string, value any)
utils/json.go:48
↓ 31 callersMethodString
()
constants/strm.go:11
↓ 23 callersMethodWrite
(data []byte)
internal/middleware/cache.go:54
↓ 20 callersFunctionDebugf
(format string, args ...any)
internal/logging/logger.go:73
↓ 20 callersFunctionWarning
服务日志 Warning 级别日志
internal/logging/logger.go:91
↓ 15 callersMethodAdd
(value T)
utils/set.go:15
↓ 15 callersFunctionWarningf
(format string, args ...any)
internal/logging/logger.go:95
↓ 14 callersFunctionInfo
服务日志 Info 级别日志
internal/logging/logger.go:80
↓ 13 callersMethodGet
(path string)
utils/json.go:66
↓ 10 callersFunctionDebug
服务日志 Debug 级别日志
internal/logging/logger.go:69
↓ 9 callersFunctionInfof
(format string, args ...any)
internal/logging/logger.go:84
↓ 8 callersMethodDelete
(path string)
utils/json.go:57
↓ 7 callersFunctionresponseModifyCreater
响应修改创建器 将需要修改上游响应的处理器包装成一个 gin.HandlerFunc 处理器
internal/handler/utils.go:26
↓ 5 callersFunctionAccessDebugf
(ctx *gin.Context, format string, args ...any)
internal/logging/logger.go:54
↓ 5 callersMethodFormat
实现Format方法
internal/logging/format.go:46
↓ 5 callersMethodReverseProxy
转发请求至上游服务器
internal/handler/emby.go:111
↓ 5 callersFunctionrecgonizeStrmFileType
不区分大小写地获取查询参数值 从 url.Values 中查找指定键名的值,忽略大小写 func getQueryValueCaseInsensitive(query url.Values, key string) string { keyLower := strings.ToLower(key
internal/handler/utils.go:64
↓ 4 callersFunctionCostomDir
静态资源文件目录 用户自定义静态文件存放地址
internal/config/config.go:78
↓ 4 callersFunctionGetHTTPClient
全局客户端单例 获取全局 HTTP 客户端(线程安全)
utils/http.go:56
↓ 4 callersMethodItemsServiceQueryItem
ItemsService Items
internal/service/emby/emby.go:41
↓ 4 callersFunctionformatAccessLog
(ctx *gin.Context, level logrus.Level, msg string)
internal/logging/format.go:77
↓ 3 callersMethodContains
删除元素
utils/set.go:18
↓ 3 callersMethodFsGet
获取某个文件/目录信息
internal/service/alist/alist.go:206
↓ 3 callersMethodGetBaseURLString
获取Emby连接地址 包含协议、服务器域名(IP)、端口号 示例:return "http://emby.example.com:8096"
internal/service/emby/emby.go:30
↓ 3 callersFunctionIsSRT
判断字幕是否为 SRT 格式
utils/subtitle.go:34
↓ 3 callersFunctionLogDirWithDate
获取日志目录 带有日期 ./logs/2024-9-29
internal/config/config.go:61
↓ 3 callersFunctionNewJsonChainFromBytesWithCopy
(data []byte, opt *sjson.Options)
utils/json.go:30
↓ 3 callersFunctionResolveEmbyAPIKVPairs
从 URL 中查询参数中解析 Emby 的 API 键值对 以 xxx=xxx 的字符串形式返回
utils/string.go:94
↓ 3 callersMethodResult
()
utils/json.go:70
↓ 3 callersMethodString
()
constants/config.go:18
↓ 3 callersFunctionVersion
获取版本信息
internal/config/config.go:35
↓ 3 callersFunctionalistStrmHandler
(content string, alistAddr string, needTranscodeResourceInfo bool)
internal/handler/strm.go:89
↓ 3 callersFunctiongetHTTPStrmHandler
()
internal/handler/strm.go:22
↓ 2 callersFunctionAccessWarningf
(ctx *gin.Context, format string, args ...any)
internal/logging/logger.go:62
↓ 2 callersMethodBuildFileDownloadURL
BuildFileDownloadURL 构建 Alist 文件下载 URL。 生成格式:<endpoint>/d/<base_path>/<file_path>?sign=<sign>
internal/service/alist/alist.go:98
↓ 2 callersMethodColorBackground
(s string)
constants/color.go:25
↓ 2 callersMethodColorString
(s string)
constants/color.go:21
↓ 2 callersFunctionConfigDir
配置文件目录
internal/config/config.go:40
↓ 2 callersFunctionErrorf
(format string, args ...any)
internal/logging/logger.go:106
↓ 2 callersFunctionGetAlistClient
获取Alist客户端 从全局Map中获取Alist客户端
internal/service/alist.go:41
↓ 2 callersMethodGetImageCacheRegexp
获取正则路由表
internal/handler/server.go:16
↓ 2 callersFunctionGetMediaServer
获取媒体服务器接口
internal/handler/server.go:41
↓ 2 callersMethodGetMethod
()
internal/service/alist/request.go:14
↓ 2 callersMethodGetSubtitleCacheRegexp
获取图片缓存正则表达式
internal/handler/server.go:17
↓ 2 callersMethodLen
判断元素是否存在
utils/set.go:19
↓ 2 callersFunctionLogDir
获取日志目录 总日志目录 ./logs
internal/config/config.go:53
↓ 2 callersFunctionNewLoggerFileHook
(isService bool)
internal/logging/hook.go:18
↓ 2 callersMethodReverseProxy
转发请求至上游服务器
internal/handler/jellyfin.go:87
↓ 2 callersFunctionSRT2ASS
将 SRT 字幕转换成 ASS 字幕 srtText: SRT 格式字幕文本 style: ASS 字幕样式
utils/subtitle.go:44
↓ 2 callersFunctiongetCacheBaseFunc
(cachePool *bigcache.BigCache, cacheName string, reg string)
internal/middleware/cache.go:142
↓ 2 callersFunctiongetLogColor
(level logrus.Level)
internal/logging/format.go:60
↓ 2 callersFunctionparseMediaServerTypeStr
(s string)
constants/mediaserver.go:44
↓ 2 callersFunctionprocessAlistStrmPlaybackInfo
(jsonChain *utils.JsonChain, bsePath string, itemId string, id string, alistAddr string, directStreamURL *stri
internal/handler/playbackInfo.go:63
↓ 2 callersFunctionprocessHTTPStrmPlaybackInfo
(jsonChain *utils.JsonChain, bsePath string, itemId string, id string, directStreamURL *string)
internal/handler/playbackInfo.go:16
↓ 1 callersFunctionAccessLogPath
访问日志文件路径
internal/config/config.go:66
↓ 1 callersFunctionAccessLogf
访问日志 默认日志级别为 Info
internal/logging/logger.go:46
↓ 1 callersMethodAdd
(value T)
utils/set.go:33
↓ 1 callersFunctionCenter
将字符串居中
utils/string.go:21
↓ 1 callersFunctionClientFilter
客户端过滤器
internal/middleware/fliter.go:15
↓ 1 callersFunctionError
服务日志 Error 级别日志
internal/logging/logger.go:102
↓ 1 callersMethodExecute
Execute 执行中间件链
internal/router/middleware.go:28
↓ 1 callersMethodGetAPIKey
获取Emby的API Key
internal/service/emby/emby.go:35
↓ 1 callersMethodGetAPIKey
获取 Jellyfin 的API Key
internal/service/jellyfin/jellyfin.go:36
↓ 1 callersMethodGetAPIPath
()
internal/service/alist/request.go:15
↓ 1 callersMethodGetAPIPath
()
internal/service/alist/request.go:60
↓ 1 callersMethodGetAPIPath
()
internal/service/alist/request.go:82
↓ 1 callersMethodGetAPIPath
()
internal/service/alist/request.go:121
↓ 1 callersMethodGetCacheKey
()
internal/service/alist/request.go:17
↓ 1 callersFunctionGetEndpoint
获取服务器入口 包含协议、主机域名(IP)、端口号(标准端口号可省略) Example1: https://example1.com:8920 Example2: http://example2.com:5224
utils/string.go:82
↓ 1 callersMethodGetFsOther
(req *FsOtherRequest)
internal/service/alist/alist.go:235
↓ 1 callersMethodGetRegexpRouteRules
转发请求至上游服务器
internal/handler/server.go:15
↓ 1 callersMethodGetUsername
得到用户名 避免直接访问 username 字段
internal/service/alist/alist.go:87
↓ 1 callersMethodGetVideoPreviewData
(p, pwd string)
internal/service/alist/alist.go:243
↓ 1 callersFunctionImageCache
(ttl time.Duration, reg *regexp.Regexp)
internal/middleware/image.go:14
↓ 1 callersFunctionInit
()
internal/logging/logger.go:23
↓ 1 callersFunctionInit
初始化configManager
internal/config/config.go:90
↓ 1 callersFunctionInit
初始化媒体服务器处理器
internal/handler/server.go:24
↓ 1 callersFunctionInitAlistClient
初始化 Alist 客户端
internal/service/alist.go:18
↓ 1 callersFunctionInitRouter
()
internal/router/router.go:16
↓ 1 callersFunctionIsFile
判断路径是否为文件
utils/fs.go:32
↓ 1 callersMethodJson
()
internal/middleware/cache.go:22
↓ 1 callersMethodLen
()
utils/set.go:52
↓ 1 callersFunctionListenAddr
MediaWarp监听地址 监听所有网卡
internal/config/config.go:85
↓ 1 callersFunctionLogger
记录访问日志
internal/middleware/log.go:15
↓ 1 callersMethodMe
()
internal/service/alist/alist.go:214
↓ 1 callersMethodNeedAuth
()
internal/service/alist/request.go:16
↓ 1 callersFunctionNew
获取Emby实例
internal/service/emby/emby.go:87
↓ 1 callersFunctionNew
获得Client实例
internal/service/alist/alist.go:37
↓ 1 callersFunctionNew
获取 Jellyfin 实例
internal/service/jellyfin/jellyfin.go:73
↓ 1 callersFunctionNewEmbyServerHandler
初始化
internal/handler/emby.go:43
↓ 1 callersFunctionNewFNTVHandler
(addr string)
internal/handler/fntv.go:27
↓ 1 callersFunctionNewJellyfinHandler
(addr string, apiKey string)
internal/handler/jellyfin.go:36
↓ 1 callersFunctionNewMiddlewareChain
NewMiddlewareChain 创建新的中间件链
internal/router/middleware.go:15
↓ 1 callersFunctionParseCacheData
(data []byte)
internal/middleware/cache.go:36
↓ 1 callersFunctionRecovery
()
internal/middleware/recover.go:12
↓ 1 callersFunctionRemoveColorCodes
RemoveColorCodes 移除字符串中的 ANSI 颜色代码
utils/string.go:16
↓ 1 callersMethodReverseProxy
(http.ResponseWriter, *http.Request)
internal/handler/server.go:14
↓ 1 callersFunctionServiceLogPath
服务日志文件路径
internal/config/config.go:71
↓ 1 callersFunctionSetLevel
服务日志 设置日志级别
internal/logging/logger.go:113
↓ 1 callersFunctionSetRefererPolicy
设置Referer策略
internal/middleware/referer.go:10
next →1–100 of 213, ranked by callers