From fec03d8780d98da7ae04fb4907bec56b4a4448af Mon Sep 17 00:00:00 2001 From: Deluan Date: Mon, 4 May 2026 17:58:26 -0400 Subject: [PATCH] fix(scanner): check user ID instead of IsAdmin for playlist import guard MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The condition `!u.IsAdmin && u.ID == ""` was wrong — with the synthetic admin fallback (IsAdmin: true, ID: ""), it evaluated to false and allowed playlist import with an empty OwnerID. The check should be just `u.ID == ""` to skip whenever there's no real user. --- scanner/phase_4_playlists.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scanner/phase_4_playlists.go b/scanner/phase_4_playlists.go index 94349720c..8e8b1ca7f 100644 --- a/scanner/phase_4_playlists.go +++ b/scanner/phase_4_playlists.go @@ -50,7 +50,7 @@ func (p *phasePlaylists) produce(put func(entry *model.Folder)) error { return nil } u, _ := request.UserFrom(p.ctx) - if !u.IsAdmin && u.ID == "" { + if u.ID == "" { log.Warn(p.ctx, "Playlists will not be imported, as there are no admin users yet, "+ "Please create an admin user first, and then update the playlists for them to be imported") return nil