mopidy/mopidy

Extra spaces in File backend's media_dirs setting are not ignored

Geschlossen

#1.965 geöffnet am 13.01.2021

 (13 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Python (702 Forks)batch import
A-filegood first issue

Repository-Metriken

Stars
 (7.854 Sterne)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

Originally reported at https://discourse.mopidy.com/t/problems-accessing-files-via-nfs/4637/7

The following config results in the warning:

WARNING [MainThread] mopidy.file.library /music/Network/flac is not a directory.

[file]
media_dirs = /music/Network/flac | NAS

This happens because we don't strip whitespace from each item so we end up trying to use the non-existent path "/music/Network/flac ". This problem is not obvious from the warning message.

We should strip whitespace and we should probably also use .as_uri() when displaying the path, this would have made it more obvious:

WARNING [MainThread] mopidy.file.library file:///music/Network/flac%20 is not a directory.

Contributor Guide