scoring

package
v1.2.0-beta.4 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateMovieScore

func CalculateMovieScore(movie integrations.Movie, cfg *config.Config) float64

CalculateMovieScore calculates a score for a movie based on configurable weights Returns a score between 0.0 and 1.0

func CalculateShowScore

func CalculateShowScore(show integrations.Show, cfg *config.Config) float64

CalculateShowScore calculates a score for a TV show based on configurable weights Returns a score between 0.0 and 1.0

Types

type ContentScore

type ContentScore struct {
	MediaType string // "movie" or "show"
	JobName   string // Source job name (trending_movies, popular_shows, etc.)
	Title     string
	Year      int
	TMDBID    int
	TVDBID    int
	IMDBID    string
	Score     float64
	Rank      int // Will be set after sorting

	// Original data for adding to Radarr/Sonarr
	MovieData *integrations.Movie
	ShowData  *integrations.Show
}

ContentScore represents a scored item with its source job

type Weights

type Weights struct {
	Rating     float64
	Popularity float64
	Recency    float64
}

Weights represents scoring weights configuration

func GetDefaultWeights

func GetDefaultWeights() Weights

GetDefaultWeights returns the default scoring weights

func GetWeightsFromConfig

func GetWeightsFromConfig(cfg *config.Config) Weights

GetWeightsFromConfig returns scoring weights from config, or defaults if not configured

Jump to

Keyboard shortcuts

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