Thank you for your donation!


Problem: MPD music folder
#1
Hi All, by default the music folder for MPD library is /var/lib/mpd/music, and this folder is linked to the root folder of the hard drive plugged into USB port.

The path of my music folder into the USB hard drive is USB/Maxtor1/Multimedia/Musica, and in the disk there are other folders with different contents like:
.- USB/Maxtor1/Multimedia/Fotos
.- USB/Maxtor1/Multimeda/Videos

How can I link /var/lib/mpd/music to the USB/Maxtor1/Multimedia/Musica folder?

I tried changing mpd.conf file in this way:

music_directory "/var/lib/mpd/music/USB/Maxtor1/Multimedia/Musica" instead of music_directory "/var/lib/mpd/music", but every time I change the MPD configuration in the Moode Configuration menu a new mpd.conf file is generated and the configuration is overwritten and again I get music_directory "/var/lib/mpd/music"

So what can I do?

Thanks a lot in advance
Best regards
Reply
#2
Hi,
Instead, you can add .mpdignore file to "USB/Maxtor1/Multimedia/Fotos and USB/Maxtor1/Multimeda/Videos folder, that way mpd will not try to scan those folders.

Code:
echo "*" > </path/to/directory/to/be/ignored/>.mpdignore
Reply
#3
(06-14-2019, 07:25 AM)TookaFace Wrote: Hi,
Instead, you can add .mpdignore file to "USB/Maxtor1/Multimedia/Fotos and USB/Maxtor1/Multimeda/Videos folder, that way mpd will not try to scan those folders.

Code:
echo "*" > </path/to/directory/to/be/ignored/>.mpdignore

Hi TookaFace, thank you, very simple!

Therefore I included an .mpdignore in every folder that I want to be skipped; but I do not know why, there are some folders that have been scanned by MPD instead of be ignored. Of course, I checked that .mpdignore file is in place

How can I fix it?

Thanks 

Best regards
Reply
#4
I'm not sure, here what i've done:

I have 3 folders on my usb key: music, foto, video.
I've added music files to foto and video folder and updated MPD database (files are scanned).

I run those commands:

Code:
 sudo sh -c 'echo "*" > /media/A5E4-9FA5/video/.mpdignore'
 sudo sh -c 'echo "*" > /media/A5E4-9FA5/foto/.mpdignore'


Then i updaded MPD database, and i could see in MPD logs that all files on video and foto were removed.
No need to add .mpdignore file in every folder, just to the root folder you don't want to be scan (with * in it).
Reply
#5
(06-15-2019, 08:23 AM)TookaFace Wrote: I'm not sure, here what i've done:

I have 3 folders on my usb key: music, foto, video.
I've added music files to foto and video folder and updated MPD database (files are scanned).

I run those commands:

Code:
 sudo sh -c 'echo "*" > /media/A5E4-9FA5/video/.mpdignore'
 sudo sh -c 'echo "*" > /media/A5E4-9FA5/foto/.mpdignore'


Then i updaded MPD database, and i could see in MPD logs that all files on video and foto were removed.
No need to add .mpdignore file in every folder, just to the root folder you don't want to be scan (with * in it).

Hi TookaFace, it is solved!!!! The problem was the wildcard into the .mpdignore files. I added the wildcard to all files and now it is working perfectly

Thanks a lot for your help

Best regards
Reply


Forum Jump: