minidlna multiple media_dirs?


I can’t seem to get minidlna to serve videos from multiple directories? According to the config file itself (/etc/sysconfig/minidlna) the configuration is as follows:

## Path:        Network/minidlna
## Description: Define media directories to be scanned
## Type:        string
## Default:     "/mnt"
## Config:      minidlna
# Here you can define your media directories you want scanned
# Set this to the directories you want scanned.
# * if you want to restrict a media_dir to specific content types, you
#   can prepend the types, followed by a comma, to the directory:
#   + "A" for audio  (eg. A,/home/jmaggard/Music)
#   + "V" for video  (eg. V,/home/jmaggard/Videos)
#   + "P" for images (eg. P,/home/jmaggard/Pictures)
#   + "PV" for pictures and video (eg. AV,/home/jmaggard/digital_camera)
# * if you want to scan multiple directories, you have to separate
#   the directories with a vertical bar:
#   eq. A,/home/jmaggard/Music | V,/home/jmaggard/Videos | P,/home/jmaggard/Pictures
# Note: the default is /mnt

I have tried:

media_dir=V,/home/Server/Shared/MoviesII | V,/home/Server/Shared/Downloads | V,/home/Server/Shared/SeriesI | V,/home/Server/Shared/SeriesII

result: nothing served.

media_dir=V,/home/Server/Shared/MoviesII | /home/Server/Shared/Downloads | /home/Server/Shared/SeriesI | /home/Server/Shared/SeriesII

result: nothing served.


Result: Only contents from the last folder are served.

Changing it to simply one media_dir line to any of the locations also works fine. Am I being dense and getting the format wrong or what’s going on?

I assume the first CODE block above is NOT the configuration itself, but a piece of a skeleton configuration that documents how to configure.

I read that, but I nowhere can find the


clause you use in your examples. Im I missing something here, or is there missing something in your description?

Is “Server” actually a user?

I am having exactly the same problem trying to get minidlna working. I am wondering if the OP has managed to fix this and if so how?

I have tried exactly what the OP did with the same results, the /etc/sysconfig/minidlna file seems to be the one to edit and add the media directories and this builds a minidlna.conf file in /var/lib/minidlna directory which is used by the service. If you specify three media_dir= entries only the last one is used, however if they are all on one line separated by a vertical bar none show up in the minidlna.conf.

There seems to be a significant lack of documentation for minidlna.


By trial and error I believe I have solved this. When specifying the multiple directories in the /etc/sysconfig/minidlna file the whole string following the = sign needs to be in quotes. Having done that and deleting the database and starting minidlna afresh it seems now to be working and finding all my files.