🎧 Your Personal Streaming Service
Go airsonicmadsonicmedia-servermusicmusic-servernavidromeopensubsonicraspberry-piself-hostedstreamerstreaming-apistreaming-audiosubsonicsubsonic-server
Support Windows paths
Deluan2d1d992e1732
diff --git a/persistence/mediafile_repository.go b/persistence/mediafile_repository.goindex 1f2b935c9..c4d2c4444 100644--- a/persistence/mediafile_repository.go+++ b/persistence/mediafile_repository.go@@ -96,7 +96,7 @@ func (r mediaFileRepository) FindByPath(path string) (model.MediaFiles, error) {// FindPathsRecursively returns a list of all subfolders of basePath, recursivelyfunc (r mediaFileRepository) FindPathsRecursively(basePath string) ([]string, error) {// Query based on https://stackoverflow.com/a/38330814/653632- sel := r.newSelect().Columns("distinct rtrim(path, replace(path, '/', ''))").+ sel := r.newSelect().Columns(fmt.Sprintf("distinct rtrim(path, replace(path, '%s', ''))", string(os.PathSeparator))).Where(Like{"path": filepath.Join(basePath, "%")})var res []stringerr := r.queryAll(sel, &res)