Documentation
¶
Overview ¶
Package renamer applies naming format templates to produce filesystem-safe filenames for downloaded media files.
Index ¶
- Constants
- func ApplyEpisodeFormat(format string, series Series, episode Episode, quality Quality, ...) string
- func ApplyFolderFormat(format string, title string, year int) string
- func ApplyMovieFormat(format string, movie Movie, quality Quality, colon ColonReplacement) string
- func ApplySeasonFolderFormat(format string, seasonNumber int) string
- func CleanTitle(title string, colon ColonReplacement) string
- type ColonReplacement
- type Episode
- type Movie
- type Quality
- type Series
Constants ¶
const ( DefaultEpisodeFormat = "{Series Title} - S{Season:00}E{Episode:00} - {Episode Title} {Quality Full}" DefaultSeriesFolderFormat = "{Series Title} ({Release Year})" DefaultSeasonFolderFormat = "Season {Season:00}" DefaultMovieFormat = "{Movie Title} ({Release Year}) {Quality Full}" DefaultMovieFolderFormat = "{Movie Title} ({Release Year})" )
Default format constants used when no explicit format is configured.
Variables ¶
This section is empty.
Functions ¶
func ApplyEpisodeFormat ¶
func ApplyEpisodeFormat(format string, series Series, episode Episode, quality Quality, colon ColonReplacement) string
ApplyEpisodeFormat returns the formatted filename (without extension).
func ApplyFolderFormat ¶
ApplyFolderFormat returns the series/movie root folder name.
func ApplyMovieFormat ¶
func ApplyMovieFormat(format string, movie Movie, quality Quality, colon ColonReplacement) string
ApplyMovieFormat returns the formatted filename (without extension).
func ApplySeasonFolderFormat ¶
ApplySeasonFolderFormat returns the season sub-folder name.
func CleanTitle ¶
func CleanTitle(title string, colon ColonReplacement) string
CleanTitle strips characters that are problematic on common filesystems.
Types ¶
type ColonReplacement ¶
type ColonReplacement string
ColonReplacement controls how colons in titles are handled when producing filesystem-safe filenames.
const ( ColonDelete ColonReplacement = "delete" ColonDash ColonReplacement = "dash" ColonSpaceDash ColonReplacement = "space-dash" )