Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is the minidlna database not being refreshed?

Tags:

dlna

I am developing a MiniDLNA server to stream media over WiFi. Existing files are shown properly. However, when I add new files to media folders the changes are not updated across MiniDLNA clients. I have also tried to restart the server but it does not reflect the changes.

I changed inotify_interval = 60 but it's still not updating files.db which is the MiniDLNA media list database. If I delete this database and restart the server it shows the changes.

Does anyone know what the problem might be?

like image 798
Dipen Avatar asked Mar 03 '11 11:03

Dipen


People also ask

Does minidlna update the database if the media file is hardlink?

That might output some error message. I have recently discovered that minidlna doesn't update the database if the media file is a hardlink. If you want these files to show up in the database, a full rescan is necessary.

How do I get minidlna to find files that have been added?

In terms of getting minidlna to find files that have been added, there are two options: The first is equivalent to removing the file files.db and consists in restarting minidlna while passing the -R argument, which forces a full rescan and builds the database from scratch.

How do I rebuild a minidlna database?

The first is equivalent to removing the file files.db and consists in restarting minidlna while passing the -R argument, which forces a full rescan and builds the database from scratch. Since version 1.2.0 there's now also the -r argument which performs a rebuild action.

Why won't minidlna recognize a file I rename?

If you move or rename a file inside the same file system the file will keep it's inode, and minidlna will not recognize it. Try moving the file to another file system, and then back again. AzP already provided most of the information, but some of it is incorrect. First of all, there is no such option inotify_interval.


1 Answers

In summary, the most reliable way to have MiniDLNA rescan all media files is by issuing the following set of commands:

$ sudo minidlnad -R $ sudo service minidlna restart 

Client-side script to rescan server

However, every so often MiniDLNA will be running on a server. Here is a client-side script to request a rescan on such a server:

#!/usr/bin/env bash ssh -t server.on.lan 'sudo minidlnad -R && sudo service minidlna restart' 
like image 73
Serge Stroobandt Avatar answered Sep 22 '22 03:09

Serge Stroobandt