collection

package
v0.0.0-...-d47f4a9 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSQLForFilter

func GetSQLForFilter(args FilterParams) *squirrel.SelectBuilder

GetItemIDsForFilter returns an array of ids for the collection

func ItemIdsFromRows

func ItemIdsFromRows(rows *sql.Rows) []common.Identifier

Types

type Entry

type Entry struct {
	ID         string
	Collection common.ItemCollection
	Sort       int
}

Entry contains the ID and collection of a CollectionItem

func GetBaseCollectionEntries

func GetBaseCollectionEntries(
	ctx context.Context,
	db *sql.DB,
	loaders *loaders.BatchLoaders,
	personalizedLoaders *loaders.PersonalizedLoaders,
	collectionId int,
	langPreferences common.LanguagePreferences,
	roles []string,
	randomSeed null.Int,

) ([]Entry, error)

GetBaseCollectionEntries returns entries for the specified collection, without any special filtering

Note: The collection config might specify advanced filtering, like continue watching or my list, which is not handled here

type FilterParams

type FilterParams struct {
	Roles               []string
	LanguagePreferences common.LanguagePreferences
	Filter              common.Filter
	NoLimit             bool
	RandomSeed          null.Int
}

Jump to

Keyboard shortcuts

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