[PROBLEM] DLNA database needs to be rebuilt every boot. - Printable Version +- Moode Forum (https://moodeaudio.org/forum) +-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3) +--- Forum: Support (https://moodeaudio.org/forum/forumdisplay.php?fid=7) +--- Thread: [PROBLEM] DLNA database needs to be rebuilt every boot. (/showthread.php?tid=4837) |
DLNA database needs to be rebuilt every boot. - DRONE7 - 04-16-2022 Using a MoOde RPi as a DLNA server but have to rebuild the miniDLNA database every boot otherwise the clients (upplay>gmediarender) fail to find it. Expected behaviour would be the database would be stored between boots or, if the DLNA renderer is set on then at the least the database should be rebuilt automatically at boot. Having to manually set the rebuild each time is not useful. RE: DLNA database needs to be rebuilt every boot. - Tim Curtis - 04-16-2022 I don't use it but I recall that miniDLNA sometimes would automatically rebuild after reboot. It may have to do with the fact that it's started before NAS source is mounted during moOde startup. Maybe it needs to have the source mounted before it starts?? One test would be to turn it off in UI before rebooting then turn on afterwords and see if it does an automatic rebuild. RE: DLNA database needs to be rebuilt every boot. - Tim Curtis - 04-16-2022 Actually what I proposed won't work because when miniDLNA is stopped in UI its cache is also cleared which includes its database. /var/cache/minidlna/ RE: DLNA database needs to be rebuilt every boot. - DRONE7 - 04-18-2022 Quote:It may have to do with the fact that it's started before NAS source is mounted during moOde startup. Maybe it needs to have the source mounted before it starts?? Yes..that describes the problem perfectly... cache is not kept between boots and miniDLNA starts ahead of the NAS in boot order. Is there any downside to keeping the cache ? or linking its update to the library update ? Is there a code line that could be commented that would cancel the cache clearing..? just to try and see after a cold start if the clients would find the server. RE: DLNA database needs to be rebuilt every boot. - TheOldPresbyope - 04-18-2022 (04-18-2022, 03:34 AM)DRONE7 Wrote:Quote:It may have to do with the fact that it's started before NAS source is mounted during moOde startup. Maybe it needs to have the source mounted before it starts?? "Is there any downside to keeping the cache ?" Dunno but... A quick grep of 'minidlna' on the contents or /var/www flagged worker.php as the likely culprit. For clarity I've repeated the grep on just it: Code: pi@m8pi3a:/var/www/command $ grep -n minidlna worker.php This is PHP code. You can comment out lines 2074 and 2079 by prepending the double solidus (//). Good luck! Regards, Kent RE: DLNA database needs to be rebuilt every boot. - Tim Curtis - 04-18-2022 My earlier post may have been a bit confusing but miniDLNA cache is only cleared by moOde as follows: 1. Turning it off in the UI 2. Clicking "REBUILD" miniDLNA database in UI Otherwise moOde doesn't touch the DLNA cache and so if miniDLNA is left On the cache should be left alone after reboot. If it's not then it must be some code in monoDLNA itself thats automatically rebuilding the database when it starts after a reboot. Why I don't know. RE: DLNA database needs to be rebuilt every boot. - Tim Curtis - 04-18-2022 I moved the code block in worker.php that does the source mounts to a position before the code block that starts the renderers and UPnP/DLNA services and this time after a reboot miniDLNA did not automatically do a database rebuild. I'll include the change in upcoming r810 release but if you want to try it do the following: 1. Edit /var/www/command/worker.php 2. Move the code block below Code: // 3. to just above where Feature availability section starts, like below Code: // Ignore CUE files RE: DLNA database needs to be rebuilt every boot. - TheOldPresbyope - 04-18-2022 i note that /etc/init.d/minidlna includes '-r' (for rescan) as a flag in the startup of minidlnad. In the comment header of the same file it makes the point that network, local filesystem and remote filesystem are all required for start. Just sayin' Regards, Kent RE: DLNA database needs to be rebuilt every boot. - Tim Curtis - 04-18-2022 miniDLNA is started by /lib/systemd/system/minidlna.service but I see that it also specifies -r (lowercase) The help indicates that -r (rescan) is different than -R (rebuild) Code: pi@moode:~ $ minidlnad --help |