Manual non-destructive rescan
Brought to you by:
jmaggard
Adds support for manual non-destructive rescan through signals. To automate rescans, add to job scheduler or script. Usage:
minidlnad -P /path/to/pidfile -U
Note: Path for pidfile is needed when not using default pidfile. Ordering of options is important. Disable inotify in config file (inotify=no), otherwise manual rescans requests will be ignored.
This patch is based on another patch of mine, updated for git head. I don't need this feature and have not tested much. Needs more testing.
Doesn't work:
[2018/03/27 10:46:10] minidlna.c:173: warn: received signal 12, manual rescan
[2018/03/27 10:46:10] minidlna.c:356: warn: Creating new database at /mnt/usb/minidlna/files.db
Make sure you have completed the initial scan and database build. Otherwise, the database will be rebuilt.
Works for me:
Updated patch (v2), add support for use with inotify. Includes small fix to use patch with current git. Usage is the same as OP except inotify can be set to yes.
Briefly tested. If you have issues, post debug logs and how to duplicate the issue.
Apologies if I'm being dumb, but when I attempt to apply this patch to v1.2.1 source I get errors:
Any ideas why the errors, this patch should work with v1.2.1 right?
Last edit: nero120 2019-05-29
V2 is for git. Use the git version or use the first patch in OP for v1.2.1.
ok, it works
the problem was with folder which include BluRay Movie. when scan reach this folder, it never ended and database wasn't closed properly.
thank you
1.2.1 + manual-non-destructive-rescan.patch
rescan will not add subtitles (.srt file) when mkv file is already in database
The rescan feature works much like the scanner. minidlna only checks for subs when a video is added to db. A simple workaround is to touch a video file. minidlna will then readd the video to db and check for subs.
ok, but I can't use touch. Media directory is mounted read-only sshfs from other server over internet.
You can try this.
simple and works great, thank you
minidlnad -r
is not enough ?minidlnad -r / -R does nothing for me , see
https://sourceforge.net/p/minidlna/bugs/344/