Make SmartPlaylists read-only

This commit is contained in:
Deluan
2021-10-22 21:11:44 -04:00
committed by Deluan Quintão
parent d169f54e7d
commit 2e2a647e67
9 changed files with 54 additions and 26 deletions
+6
View File
@@ -185,6 +185,12 @@ func (r *playlistRepository) refreshSmartPlaylist(pls *model.Playlist) bool {
return false
}
// Never refresh other users' playlists
usr := loggedUser(r.ctx)
if pls.Owner != usr.UserName {
return false
}
log.Debug(r.ctx, "Refreshing smart playlist", "playlist", pls.Name, "id", pls.ID)
start := time.Now()