Remove orphan tracks from playlists after they are removed from library

This commit is contained in:
Deluan
2020-05-18 20:32:01 -04:00
parent 0e4f7036eb
commit c2d1e9df9f
7 changed files with 46 additions and 8 deletions
+1 -1
View File
@@ -180,7 +180,7 @@ func getMinYear(years string) int {
return 0
}
func (r *albumRepository) PurgeEmpty() error {
func (r *albumRepository) purgeEmpty() error {
del := Delete(r.tableName).Where("id not in (select distinct(album_id) from media_file)")
c, err := r.executeSQL(del)
if err == nil {