feat(playlist): assume playlists in the root dir without a user dir belong to admin (#499)

This commit is contained in:
xxxserxxx
2024-05-01 10:32:51 -05:00
committed by GitHub
parent 559c9106b0
commit f5893ea5ea

View File

@@ -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))