1

I have Minidlna installed, configured and it's working almost perfectly. Whenever I download a video file from a website using IceWeasel and video is saved to my minidlna share folder that file isn't indexed. Manual refreshing doesn't work, Minidlna stop, force-reload, restart, minidlna -R doesn't work - the file is not being indexed. The only solution is to stop minidlna, put hash (#) the path to my minidlna share path in minidlna config, restart minidlna, stop it, remove # to my minidlna share path in minidlna config file, restart and it works. It's a lot to do to make it work. I have inotify set to yes, and it's properly configured in /etc/sysctl.conf. Don't know what else I could do.

zebik
  • 69
  • 1
  • 6
  • dirty workaround: add a crontab that does the force-reload and file edit, a structural fix could be to see if you run the latest stable release or just the latest git pull. This could explain unexpected behaviour. – Havnar Jan 12 '16 at 10:37
  • Good idea but if someone was watching something or listening to the music of minidlna resources than that would interrupt it. I just thought a script like below could be a way round it but I don't know how to create such script:
    1. Stop minidlna, 2. Put # to the path to minidlna share in minidlna config, 3. Start minidlna, 4. Remove # to the path to minidlna share in minidlna config, 6. Start minidlna. It might look little bit over complicated but I hope someone could help to create script for that purpose :)
    – zebik Jan 12 '16 at 14:51

1 Answers1

0

This is something I wrote from the top of my head at work, so it might contain syntax errors etc, but this can be a dirty workaround like I have mentioned in my comment.

Use at your own risk, it is advised to find a structural solution first

note:this script assumes the # is not in the config when you first start to use it, it's something rough as a proof of concept

#!/bin/bash
MY_PATH="media_dir=V,/mnt/ext/Media"

service minidlna stop
sed -i s^$MY_PATH^"#$MY_PATH"^ /etc/minidlna.conf

service minidlna start
sed -i s^"#$MY_PATH"^$MY_PATH^ /etc/minidlna.conf
Havnar
  • 1,617
  • 2
  • 16
  • 34