Documentation
¶
Index ¶
- func CleanHeader(header http.Header) http.Header
- func Fetch(uri, method string, header http.Header, body map[string]any) model.HttpRes[*jsons.Item]
- func FetchFsGet(path string, header http.Header) model.HttpRes[*jsons.Item]
- func FetchFsList(path string, header http.Header) model.HttpRes[*jsons.Item]
- func FetchFsOther(path string, header http.Header) model.HttpRes[*jsons.Item]
- func FetchResource(fi FetchInfo) model.HttpRes[Resource]
- func PathDecode(encPath string) string
- func PathEncode(rawPath string) string
- func SubLangDisplayName(lang string) string
- type FetchInfo
- type Resource
- type SubtitleInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanHeader ¶ added in v1.7.5
CleanHeader 清理请求头
func FetchResource ¶
FetchResource 请求 alist 资源 url 直链
func PathEncode ¶ added in v1.7.3
PathEncode 将 alist 的资源原始路径进行编码, 防止路径在传输过程中出现错误
func SubLangDisplayName ¶ added in v1.7.0
SubLangDisplayName 将 lang 转换成对应名称
Types ¶
type FetchInfo ¶
type FetchInfo struct { Path string // alist 资源绝对路径 UseTranscode bool // 是否请求转码资源 (只支持视频资源) Format string // 要请求的转码资源格式, 如: FHD TryRawIfTranscodeFail bool // 如果请求转码资源失败, 是否尝试请求原画资源 Header http.Header // 自定义的请求头 }
FetchInfo 请求 alist 资源需要的参数信息
type Resource ¶
type Resource struct { Url string // 资源远程路径 Subtitles []SubtitleInfo // 字幕信息 }
Resource alist 资源信息封装
type SubtitleInfo ¶
SubtitleInfo 资源内嵌的字幕信息
Click to show internal directories.
Click to hide internal directories.