Documentation ¶
Index ¶
- Constants
- func Base64(file string) (string, error)
- func FailFile(file, dirPath string, cfg *ConfigStruct)
- func GetCode(filename, filter string) string
- func GetFileSize(file string) (size int64, err error)
- func GetMonth(date string) string
- func GetNumberPath(m MediaNfo, cfg *ConfigStruct) string
- func GetRunPath() (dir string, err error)
- func GetYear(date string) string
- func MoveFile(oldPath, newPath string) error
- func PosterFanArt(srcPhoto, newPhoto string, cfg *ConfigStruct) error
- func WalkDir(dirPath, success, fail string) (files []string, err error)
- func WriteConfig() error
- func WriteFile(file string, data []byte) error
- type BaseStruct
- type ConfigStruct
- type MediaActor
- type MediaInner
- type MediaNfo
- type MediaStruct
- type PathStruct
- type SiteStruct
Constants ¶
View Source
const VERSION = "1.0.3"
VERSION 当前程序版本号
Variables ¶
This section is empty.
Functions ¶
func GetNumberPath ¶
func GetNumberPath(m MediaNfo, cfg *ConfigStruct) string
GetNumberPath 获取正确的保存路径
func PosterFanArt ¶
func PosterFanArt(srcPhoto, newPhoto string, cfg *ConfigStruct) error
PosterFanArt 图片裁剪
Types ¶
type ConfigStruct ¶
type ConfigStruct struct { Base BaseStruct // 基础配置 Path PathStruct // 路径配置 Media MediaStruct // 媒体库配置 Site SiteStruct // 免翻地址配置 }
ConfigStruct 配置结构
type MediaActor ¶
MediaActor 演员结构
type MediaNfo ¶
type MediaNfo struct { XMLName xml.Name `xml:"movie"` Title MediaInner `xml:"title"` SortTitle string `xml:"sorttitle"` Number string `xml:"num"` Studio MediaInner `xml:"studio"` Maker MediaInner `xml:"maker"` Director MediaInner `xml:"director"` Release string `xml:"release"` Premiered string `xml:"premiered"` Year string `xml:"year"` Plot MediaInner `xml:"plot"` Outline MediaInner `xml:"outline"` RunTime string `xml:"runtime"` Mpaa string `xml:"mpaa"` Country string `xml:"country"` Poster string `xml:"poster"` Thumb string `xml:"thumb"` FanArt string `xml:"fanart"` Actor []MediaActor `xml:"actor"` Tag []MediaInner `xml:"tag"` Genre []MediaInner `xml:"genre"` Set string `xml:"set"` Label string `xml:"label"` Cover string `xml:"cover"` WebSite string `xml:"website"` Month string `xml:"-"` DirPath string `xml:"-"` }
MediaNfo Nfo结构
type MediaStruct ¶
type MediaStruct struct { Library string // 媒体库类型 URL string // Emby访问地址 API string // Emby API Key SecretID string // 腾讯云 SecretId SecretKey string // 腾讯云 SecretKey }
MediaStruct 媒体库配置结构
Click to show internal directories.
Click to hide internal directories.