Documentation ¶
Index ¶
- func AlbumIDOrEmptyStr(track *mediaprovider.Track) string
- func FilterMapSlice[T any, U any](ts []T, f func(T) (U, bool)) []U
- func FilterSlice[T any](ss []T, test func(T) bool) []T
- func FindMediaItemByID(id string, items []mediaprovider.MediaItem) mediaprovider.MediaItem
- func FindTrackByID(id string, tracks []*mediaprovider.Track) *mediaprovider.Track
- func MapSlice[T any, U any](ts []T, f func(T) U) []U
- func MediaItemIDOrEmptyStr(item mediaprovider.MediaItem) string
- func ReorderItems[T any](items []T, idxToMove []int, insertIdx int) []T
- func Reversed[T any](ts []T) []T
- func ToSet[T comparable](ts []T) map[T]struct{}
- func TracksToIDs(tracks []*mediaprovider.Track) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AlbumIDOrEmptyStr ¶ added in v0.10.0
func AlbumIDOrEmptyStr(track *mediaprovider.Track) string
func FilterMapSlice ¶ added in v0.10.0
func FilterSlice ¶
func FindMediaItemByID ¶ added in v0.11.0
func FindMediaItemByID(id string, items []mediaprovider.MediaItem) mediaprovider.MediaItem
func FindTrackByID ¶
func FindTrackByID(id string, tracks []*mediaprovider.Track) *mediaprovider.Track
func MediaItemIDOrEmptyStr ¶ added in v0.11.0
func MediaItemIDOrEmptyStr(item mediaprovider.MediaItem) string
func ReorderItems ¶ added in v0.11.0
Reorder items and return a new track slice. idxToMove must contain only valid indexes into tracks, and no repeats
func ToSet ¶ added in v0.3.1
func ToSet[T comparable](ts []T) map[T]struct{}
func TracksToIDs ¶
func TracksToIDs(tracks []*mediaprovider.Track) []string
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.