I am new to mopidy and have limited linux experience. I managed to get most of mopidy running without too much difficulty. Now I am trying to browse/play music from a network folder. The folder is on a Synology NAS. I did not manage to mount the folder using SMB, but it works with NFS. After putting it into fstab, it is mounted at startup and I can access it manually using ssh on the Raspberry Pi that runs mopidy.
My config-file has a single line in the [file] section:
<
media_dirs = /music/Network/flac/ | NAS
/>
“/music/Network/flac/” is the folder that the network folder is mounted in.
I am using musicbox webclient, mopidy mobile (android) and remotedy (android) for testing.
I know that mopidy uses the “mopidy” user profile and guess that it may have something to do with access rights to the shared folder. Hence, I created a user group “music” on the raspberry pi that has the users “pi” and “mopidy”. Then I changed ownership of the /music/Network/flac/ directory to this group using chown. Still, I am not sure, if that worked properly. How do I check, if mopidy has the required access rights?
On the Synology NAS I configured “map all users to admin” for the NFS shared folder.
On the Raspberry Pi, I added mopidy to the group “users”.
Unfortunately, this did not work. I still do not see the /music/Network/flac folder on the clients I used for testing. I do see my spotify account, which works fine.
I did some further reading on user rights. I checked the folders and files under /music/Network/flac/. All of them have “-rwxrwxrwx”. Obviously, every user has full access rights, including mopidy. It appears that rights are not the issue. Still I do not see any music files.
Can you try and access the files and then have a look in the Mopidy log for any errors: sudo journalctl -u mopidy --boot. Can you also ensure you have edited the correct log file by displaying the effective config with sudo mopidyctl config.
There seems to be an error in the config file. I received the following output in the log:
Jan 09 00:04:27 raspberrypi mopidy[686]: WARNING [MainThread] mopidy.file.library /music/Network/flac/ is not a directory. Please create the directory or update the file/media_dirs config value.
My mopidy.conf says
[file]
media_dirs = /music/Network/flac/ | NAS
I mounted the shared folder in /etc/fstab as follows:
I had a play around, seems we really don’t like those spaces you added. It should be:
[file]
media_dirs = /music/Network/flac/|NAS
This is a bug, we should either silently handle this or provide a more helpful error message. Even adding some quotes around the path would have made the problem obvious.
Note that if you only have one entry for this list you won’t get an extra directory level containing a folder named “NAS” as for a single directory it’s not necessary. But if you had multiple entries e.g.
[file]
media_dirs =
/music/Network/flac/|NAS
/some/other/path|My Other Music
Then you’d find the browsing directory for Files has an extra level:
- Browse
- Files
- NAS
- <contents of directory /music/Network/flac>
- My Other Music
- <contents of directory /some/other/path>