Documentation
¶
Overview ¶
Package scrape 为整理进媒体库的电影与剧集写 Kodi 格式的 NFO(Emby、Jellyfin、Plex 的 NFO 插件都认), 并下载海报、背景、季海报与集截图。数据来自 TMDB。
Index ¶
- func EpisodeNFO(show tmdb.Result, season, episode, end int, s *tmdb.Season) ([]byte, error)
- func MovieNFO(r tmdb.Result) ([]byte, error)
- func SeasonNFO(number int, s *tmdb.Season) ([]byte, error)
- func SeasonPosterName(n int) string
- func TVShowNFO(r tmdb.Result) ([]byte, error)
- type Images
- type Report
- type Writer
- func (w Writer) Episode(ctx context.Context, videoPath string, show tmdb.Result, ...) Report
- func (w Writer) Movie(ctx context.Context, videoPath string, ownDir bool, r tmdb.Result) Report
- func (w Writer) Season(ctx context.Context, showDir, seasonDir string, number int, s *tmdb.Season) Report
- func (w Writer) Show(ctx context.Context, showDir string, r tmdb.Result) Report
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EpisodeNFO ¶
EpisodeNFO 是一个剧集文件的 NFO(<episodedetails>)。一个文件里有多集(episode 到 end)时每集写一段, Kodi 按多集文件处理。季详情里没有的集只写季号与集号,标题用「第 N 集」。
func SeasonPosterName ¶
SeasonPosterName 是季海报放在剧集目录里的文件名:season01-poster.jpg,第 0 季是 season-specials-poster.jpg。
Types ¶
type Writer ¶
Writer 写 NFO 与图片。Overwrite 为假时已经存在的文件不动。
func (Writer) Episode ¶
func (w Writer) Episode(ctx context.Context, videoPath string, show tmdb.Result, season, episode, end int, s *tmdb.Season) Report
Episode 为一个剧集文件写 <文件名>.nfo 与 <文件名>-thumb.jpg(第一集的截图)。
func (Writer) Movie ¶
Movie 为一个电影文件写 <文件名>.nfo;电影有自己的目录(ownDir)时再写 poster.jpg 与 fanart.jpg, 放在库目录根下时写成 <文件名>-poster.jpg 与 <文件名>-fanart.jpg。
Click to show internal directories.
Click to hide internal directories.