From f5893ea5ea4d47a82212b47e85a15d9defdc5eff Mon Sep 17 00:00:00 2001 From: xxxserxxx <60757196+xxxserxxx@users.noreply.github.com> Date: Wed, 1 May 2024 10:32:51 -0500 Subject: [PATCH] feat(playlist): assume playlists in the root dir without a user dir belong to admin (#499) --- playlist/playlist.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playlist/playlist.go b/playlist/playlist.go index b229619c..e51dbc16 100644 --- a/playlist/playlist.go +++ b/playlist/playlist.go @@ -99,7 +99,7 @@ func (s *Store) Read(relPath string) (*Playlist, error) { playlist.UserID, err = userIDFromPath(relPath) if err != nil { - return nil, fmt.Errorf("convert id to str: %w", err) + playlist.UserID = 1 } playlist.Name = strings.TrimSuffix(filepath.Base(relPath), filepath.Ext(relPath))