utils

package
v0.0.0-...-4973d3c Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2024 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FillImdb

func FillImdb()

FillImdb refreshes the IMDB database by calling the init_imdb executable. It inserts a record into the job history table, executes the IMDB update, reloads the IMDB database, and updates the job history record when done.

func InitialFillMovies

func InitialFillMovies()

InitialFillMovies performs the initial database fill for movies. It refreshes the unmatched and files caches, inserts job history records, calls importnewmoviessingle to import new movies from the configured lists, calls newFilesMap to scan for new files, and clears caches when done.

func InitialFillSeries

func InitialFillSeries()

InitialFillSeries performs the initial database fill for TV series. It refreshes the unmatched and files caches, inserts job history records, calls importnewseriessingle to import new episodes from the configured lists, calls getNewFilesMap to scan for new files, and clears caches when done.

func MoviesAllJobs

func MoviesAllJobs(job string, force bool)

MoviesAllJobs runs the specified job for all movie media types. It iterates through the global config.SettingsMedia, checks for movie media types by prefix, and calls SingleJobs on each matching one. The job and force params are passed through to SingleJobs.

func RefreshMovie

func RefreshMovie(cfgp *config.MediaTypeConfig, id string)

RefreshMovie refreshes the data for the given movie by looking up its ID and calling refreshmovies. It takes the media config and the movie ID string. It converts the ID to an int and calls refreshmovies to refresh that single movie.

func RefreshSerie

func RefreshSerie(cfgp *config.MediaTypeConfig, id string)

RefreshSerie refreshes the database data for a single series. It accepts a MediaTypeConfig and the series ID as a string. It converts the ID to an int, and calls refreshseries to refresh that single series, passing the config, a limit of 1 row, a query to select the series data, and the series ID as a query arg.

func Refreshcache

func Refreshcache(useseries bool)

Refreshcache refreshes various database caches used for performance. It refreshes the history cache, media cache, media titles cache, unmatched cache, and files cache. The useseries parameter determines if it should refresh for series or movies.

func SeriesAllJobs

func SeriesAllJobs(job string, force bool)

SeriesAllJobs runs the specified job for all configured media types that use series. It loops through each configured media type, and calls SingleJobs to run the job if the media type uses series.

func SingleJobs

func SingleJobs(job, cfgpstr, listname string, force bool)

SingleJobs runs a single maintenance job for the given media config and list. It handles running jobs like getting new files, checking for missing files, refreshing data, searching for upgrades, etc. Jobs are determined by the job string and dispatched to internal functions. List can be empty to run for all lists.

Types

This section is empty.

Jump to

Keyboard shortcuts

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