mediamanagement

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package mediamanagement provides access to global media management settings (episode naming formats, colon replacement, extra file importing, etc.).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service exposes read/write access to the single media_management row.

func NewService

func NewService(q db.Querier) *Service

NewService creates a new Service backed by the given Querier.

func (*Service) Get

func (s *Service) Get(ctx context.Context) (Settings, error)

Get returns the current media management settings.

func (*Service) Update

func (s *Service) Update(ctx context.Context, settings Settings) (Settings, error)

Update persists new settings and returns the saved values.

type Settings

type Settings struct {
	RenameEpisodes           bool
	StandardEpisodeFormat    string
	DailyEpisodeFormat       string
	AnimeEpisodeFormat       string
	SeriesFolderFormat       string
	SeasonFolderFormat       string
	ColonReplacement         string // "delete" | "dash" | "space-dash" | "smart"
	ImportExtraFiles         bool
	ExtraFileExtensions      []string // parsed from comma-separated DB string
	UnmonitorDeletedEpisodes bool
	// RecycleBinPath is where replaced and deleted episode files go; ""
	// deletes them permanently.
	RecycleBinPath string
	// RecycleBinCleanupDays: files older than this in the recycle bin are
	// deleted; 0 = never.
	RecycleBinCleanupDays int
}

Settings is the application-level view of the media_management table.

type ValidationError

type ValidationError struct{ Msg string }

ValidationError explains why settings can't be saved.

func (*ValidationError) Error

func (e *ValidationError) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL