Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SanitizeFilename ¶
SanitizeFilename removes or replaces characters that are invalid in filenames This is a standalone function for use by callers
func SanitizeFolderPath ¶
SanitizeFolderPath sanitizes a folder name by replacing invalid filesystem characters
Types ¶
type Context ¶
type Context struct {
// Basic identifiers
ID string
ContentID string
// Title information
Title string
OriginalTitle string // Japanese/original language title
// Date information
ReleaseDate *time.Time
Runtime int // in minutes
// People
Director string
Actresses []string // Array of actress names
FirstName string // For single actress context
LastName string // For single actress context
// Production info
Maker string // Studio/Maker
Label string
Series string
// Categories
Genres []string
// Media info
OriginalFilename string
VideoFilePath string // Path to video file for mediainfo extraction
// Indexing (for screenshots, multi-part, etc.)
Index int
// Multi-part file information
PartNumber int // Part number (1, 2, 3, etc.) - 0 means single file
PartSuffix string // Original part suffix detected from filename (e.g., "-pt1", "-A")
IsMultiPart bool // Whether this is a multi-part file
// Additional metadata
Rating float64
Description string
CoverURL string
TrailerURL string
// Output configuration
GroupActress bool // Replace multiple actresses with "@Group"
// contains filtered or unexported fields
}
Context holds all data available for template execution
func NewContextFromMovie ¶
NewContextFromMovie creates a template context from a Movie model
func NewContextFromScraperResult ¶
func NewContextFromScraperResult(result *models.ScraperResult) *Context
NewContextFromScraperResult creates a template context from a ScraperResult
func (*Context) GetMediaInfo ¶
GetMediaInfo lazy-loads and caches video metadata
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine is a template processor for format strings
func (*Engine) TruncateTitle ¶
TruncateTitle smartly truncates a title to maxLen characters
func (*Engine) TruncateTitleBytes ¶
TruncateTitleBytes smartly truncates a title to fit within maxBytes (byte length) This is needed because file paths have byte length limits, not rune count limits