Skip to content

Commit

Permalink
fix: Fix Saved Search Restore (xbapps#1541)
Browse files Browse the repository at this point in the history
  • Loading branch information
toshski authored Dec 30, 2023
1 parent f28ba59 commit b3325a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/tasks/content.go
Original file line number Diff line number Diff line change
Expand Up @@ -1138,7 +1138,7 @@ func RestorePlaylist(playlists []models.Playlist, overwrite bool, db *gorm.DB) {
addedCnt := 0
for _, playlist := range playlists {
var found models.Playlist
db.Where(&models.Playlist{Name: playlist.Name}).First(&found)
db.Where(&models.Playlist{Name: playlist.Name, PlaylistType: playlist.PlaylistType}).First(&found)

if found.ID == 0 { // id = 0 is a new record
playlist.ID = 0 // dont use the id from json
Expand Down

0 comments on commit b3325a6

Please sign in to comment.