Posted: Sat Jan 30, 2021 7:56 Post subject: MiniDLNA - rebuild database on startup
How can I force a clear&rebuild of the mindlna database on every startup of the router?
I've already tried various settings of the miniDLNA options without any success.
The problme I face, that every startup my router scans the media folders and adds the entries to the database, so after several reboots (I normally shut down the router in the night) the database is full of the same entries.
My setup:
Router: DLlink DIR890-L
250 GB SSD attached on USB3 Port
jiffs enabled (1GB)
ddwrt: DD-WRT v3.0-r43171 std (05/16/20)
Joined: 26 Mar 2013 Posts: 1856 Location: Hung Hom, Hong Kong
Posted: Sun Jan 31, 2021 14:02 Post subject: Re: MiniDLNA - rebuild database on startup
PowerPoldi wrote:
How can I force a clear&rebuild of the mindlna database on every startup of the router?
I've already tried various settings of the miniDLNA options without any success.
The problme I face, that every startup my router scans the media folders and adds the entries to the database, so after several reboots (I normally shut down the router in the night) the database is full of the same entries.
I found that MiniDLNA always re-scan media folders on reboot. The process is very slow and you have to wait patiently. I don't think it cares about the "Keep Metadata on Storage" setting.
total 9512
-rw-r--r-- 1 root root 5046272 Jan 31 21:57 files.db
-rw-r--r-- 1 root root 4694016 Dec 10 17:46 files.db.old
I think you can first disable MiniDLNA via WEBUI, then manually delete those cache files in /jffs/minidlna, if and only if you think the "Clean Database now" in the MiniDLNA WEBUI was not working. _________________ Router: Asus RT-N18U (rev. A1)
Drink, Blink, Stretch! Live long and prosper! May the Force and farces be with you!
@egc:
Was thinking about that proposal, but when I'll turn off the router at night, I'll turn off mains-power at the wall outlet. In this situation the router will have not chance of executing a "shutdown script"...
I'm trying to delet the files.db (located in /jffs/minidlna/) at startup but I don't know if the jffs mounts before the minidlna service is started.
@mwchang
cleaning and rebuilding the database via the web-gui works fine. The question is, how to run/start this procedure automatically on startup without needing to log into the web-gui and starting it manually.
The rebuild takes about 2...3 minutes in my case, so the time it takes is no problem for me.
Since the "is-mounted.sh" script is not implemented in the build im running, I've fiddled around with the timings. Here's what I've come up, and which seems to work for my needs. Ofcourse, this is just an early evaluation, so I'll keep watching in the near future.
My start-up script under "Administration --> Commands" looks like this: