Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Problem: DLNA database needs to be rebuilt every boot.
#7
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:
//
workerLog('worker: --');
workerLog('worker: -- Music sources');
workerLog('worker: --');
//

// List USB sources
$usbdrives = sysCmd('ls /media');
if ($usbdrives[0] == '') {
    workerLog('worker: USB sources (none attached)');
}
else {
    foreach ($usbdrives as $usbdrive) {
        workerLog('worker: USB source ' . '(' . $usbdrive . ')');
    }
}

// Mount NAS and UPnP sources
$result = sourceMount('mountall');
workerLog('worker: NAS and UPnP sources (' . $result . ')');


3. to just above where Feature availability section starts, like below

Code:
// Ignore CUE files
setCuefilesIgnore($_SESSION['cuefiles_ignore']);
workerLog('worker: MPD ignore CUE files (' . ($_SESSION['cuefiles_ignore'] == '1' ? 'yes' : 'no') . ')');

//
workerLog('worker: --');
workerLog('worker: -- Music sources');
workerLog('worker: --');
//

// List USB sources
$usbdrives = sysCmd('ls /media');
if ($usbdrives[0] == '') {
    workerLog('worker: USB sources (none attached)');
}
else {
    foreach ($usbdrives as $usbdrive) {
        workerLog('worker: USB source ' . '(' . $usbdrive . ')');
    }
}

// Mount NAS and UPnP sources
$result = sourceMount('mountall');
workerLog('worker: NAS and UPnP sources (' . $result . ')');

//
workerLog('worker: --');
workerLog('worker: -- Feature availability');
workerLog('worker: --');
//
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply


Messages In This Thread
RE: DLNA database needs to be rebuilt every boot. - by Tim Curtis - 04-18-2022, 12:53 PM

Forum Jump: