task

package
v0.0.0-...-64e8138 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanupInvalidSongFiles

func CleanupInvalidSongFiles(db *gorm.DB, songSvc service.SongService) (int64, error)

CleanupInvalidSongFiles removes SongFile records where the actual file does not exist on disk.

func EnsureFilesDuration

func EnsureFilesDuration(db *gorm.DB, songSvc service.SongService)

func ReindexAll

func ReindexAll(db *gorm.DB, searchSvc *service.SearchService)

func RemoveOrphans

func RemoveOrphans(db *gorm.DB) (map[string]int64, error)

RemoveOrphans removes: 1. Songs that have no SongFiles OR no Artists OR have empty/null title 2. Albums that have no Songs OR have empty/null title 3. Artists that have no Songs OR have empty/null name 4. Broken song_artists links (songs or artists that don't exist) 5. Broken playlist_songs links (playlists or songs that don't exist) Returns the count of deleted entities for each type. RemoveOrphans removes: 1. Songs that have no SongFiles OR no Artists OR have empty/null title 2. Albums that have no Songs OR have empty/null title 3. Artists that have no Songs OR have empty/null name 4. Broken song_artists links (songs or artists that don't exist) 5. Broken playlist_songs links (playlists or songs that don't exist) 6. Broken song_files (songs that don't exist) 7. Broken identifiers (songs, albums, or artists that don't exist) Returns a map of deleted entity counts.

Types

This section is empty.

Jump to

Keyboard shortcuts

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