fix(server): import absolute paths in m3u (#3756)

* fix(server): import playlists with absolute paths

Signed-off-by: Deluan <deluan@navidrome.org>

* fix(server): optimize playlist import

Signed-off-by: Deluan <deluan@navidrome.org>

* fix(server): add test with multiple libraries

Signed-off-by: Deluan <deluan@navidrome.org>

* fix(server): refactor

Signed-off-by: Deluan <deluan@navidrome.org>

---------

Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
Deluan Quintão 2025-02-26 19:26:38 -08:00 committed by GitHub
parent 3892f70c35
commit 0c4c223127
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 129 additions and 62 deletions

View file

@ -2,7 +2,6 @@ package tests
import (
"context"
"io/fs"
"os"
"path/filepath"
@ -18,7 +17,7 @@ func TempFileName(t testingT, prefix, suffix string) string {
return filepath.Join(t.TempDir(), prefix+id.NewRandom()+suffix)
}
func TempFile(t testingT, prefix, suffix string) (fs.File, string, error) {
func TempFile(t testingT, prefix, suffix string) (*os.File, string, error) {
name := TempFileName(t, prefix, suffix)
f, err := os.Create(name)
return f, name, err