mopidy/mopidy

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

クローズ

#1,965 opened on 2021/01/13

 (13 件のコメント) (0 件のリアクション) (0 人の担当者)Python (702 件のフォーク)batch import
A-filegood first issue

Repository metrics

Stars
 (7,854 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

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.

コントリビューターガイド