presets

package
v0.13.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 presets provides built-in TRaSH-compatible custom format definitions that users can import with a single click. Preset data is embedded at compile time using //go:embed.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Preset

type Preset struct {
	ID          string `json:"id"`            // stable identifier (filename without extension)
	Name        string `json:"name"`          // display name from the JSON
	Category    string `json:"category"`      // grouping: "HD Bluray", "WEB", "Audio", "HDR", "Unwanted"
	Description string `json:"description"`   // one-line explanation
	Score       int    `json:"default_score"` // recommended score from trash_scores.default
	Data        []byte `json:"-"`             // raw TRaSH-format JSON (omitted from API list)
}

Preset describes a built-in custom format that can be imported.

func Get

func Get(id string) (Preset, bool)

Get returns a preset by its stable ID. Returns false if not found.

func List

func List() []Preset

List returns all available presets sorted by category then name.

Jump to

Keyboard shortcuts

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