Question about minidlna command line

(Replaces the existing UPnP-AV server support) Enables playback of videos, music and pictures from DLNA/UPnP AV network media players. Also adds TiVo HMO support.

Question about minidlna command line

Postby telnetdoogie » Wed May 27, 2009 6:37 pm

Is there a way to stop / start the minidlna service from the command line?

Also, is there a way to tell minidlna to do a rescan of folders from the command line?

I've been doing a kill, followed by a delete of the files.db, followed by executing minidlna, which seems to work; I was wondering though if there's a more elegant way to have it re-scan folders or re-read the config file.

Thanks!
telnetdoogie
ReadyNAS Newbie
 
Posts: 38
Joined: Fri Feb 06, 2009 12:09 am
ReadyNAS: Duo

Re: Question about minidlna command line

Postby Skywalker » Wed May 27, 2009 6:58 pm

No, currently there's no more elegant way to force a rescan. Ideally, you should only have to do a full rescan once, and inotify should pick up any changes after that.
User avatar
Skywalker
Jedi Council
 
Posts: 2947
Joined: Fri Nov 19, 2004 10:47 am
Location: Fremont, CA
ReadyNAS: NV

Re: Question about minidlna command line

Postby telnetdoogie » Fri May 29, 2009 6:55 am

OK. Cool. I have no problem with there not being a way - for this device it doesn't make much sense anyway. - I just couldn't stand not knowing :)
telnetdoogie
ReadyNAS Newbie
 
Posts: 38
Joined: Fri Feb 06, 2009 12:09 am
ReadyNAS: Duo

Re: Question about minidlna command line

Postby Segran » Sat Jul 14, 2012 7:12 am

inotify is not included in the NV+ V2, so to me this is still an issue. Now I have to turn off and turn on to make a re-scan.
Segran
ReadyNAS Newbie
 
Posts: 3
Joined: Mon Jun 11, 2012 12:48 pm
ReadyNAS: NV+ v2

Re: Question about minidlna command line

Postby mdgm » Sat Jul 14, 2012 7:18 am

This should work (don't know if there's a better way):
Code: Select all
start-stop-daemon -q -o -K -n minidlna -R 5
sleep 10
rm -f /var/cache/minidlna/*
sleep 10
start-stop-daemon -q -S --exec /usr/sbin/minidlna


Please don't revive threads that have been dead for a long time. Best to start a new thread in future.
Useful links: My ReadyNAS Gear|FAQ|Hardware Compatibility List|Docs: Setup Guide, Manual|Downloads|Unofficial Tips|GPL|MDGM on Twitter|MDGM's Unofficial Guides
NB: A ReadyNas is not an excuse not to have a backup. Fire, theft, multiple disk failures, other hardware failure, floods, user negligence etc. can all result in loss of data.
How we users can contact NETGEAR Technical Support | Australia: 1300 361 254 / Other Numbers|Online Submission
Unofficial Guide for Moving from Sparc ReadyNAS to x86 ReadyNAS|Using Gmail with the ReadyNAS|XRAID Volume Size Calculator
User avatar
mdgm
ReadyNAS Enthusiast
 
Posts: 28611
Joined: Tue Feb 17, 2009 9:34 pm
Location: Down Under
ReadyNAS: RN312

Re: Question about minidlna command line

Postby audetto » Sat Jul 14, 2012 2:06 pm

mdgm wrote:This should work (don't know if there's a better way):
Code: Select all
start-stop-daemon -q -o -K -n minidlna -R 5
sleep 10
rm -f /var/cache/minidlna/*
sleep 10
start-stop-daemon -q -S --exec /usr/sbin/minidlna



Finally someone answers this question. Thank you!
Is this what is behind the button in the Frontview web page?
I tried to follow the html, but I got lost.

So basically, minidlna will recreate the db when it starts if it is not there.
Makes sense.

Would still be good to have some unofficial approval from the Jedis! Cant believe it is such a secret thing.
audetto
ReadyNAS User
 
Posts: 79
Joined: Mon Apr 30, 2007 3:42 pm

Re: Question about minidlna command line

Postby mdgm » Sat Jul 14, 2012 4:50 pm

I don't know what the button in Frontview/Dashboard does but it's probably pretty similar.

The start-stop-daeamon commands above are the same as what is used in an official add-on. I did have an add-on available to do this on the ARM units which some found helpful before there was an option added in the Dashboard to do it.
Useful links: My ReadyNAS Gear|FAQ|Hardware Compatibility List|Docs: Setup Guide, Manual|Downloads|Unofficial Tips|GPL|MDGM on Twitter|MDGM's Unofficial Guides
NB: A ReadyNas is not an excuse not to have a backup. Fire, theft, multiple disk failures, other hardware failure, floods, user negligence etc. can all result in loss of data.
How we users can contact NETGEAR Technical Support | Australia: 1300 361 254 / Other Numbers|Online Submission
Unofficial Guide for Moving from Sparc ReadyNAS to x86 ReadyNAS|Using Gmail with the ReadyNAS|XRAID Volume Size Calculator
User avatar
mdgm
ReadyNAS Enthusiast
 
Posts: 28611
Joined: Tue Feb 17, 2009 9:34 pm
Location: Down Under
ReadyNAS: RN312

Re: Question about minidlna command line

Postby DeltaTee » Tue Aug 14, 2012 3:52 am

Thanks for this information. I have been looking for it for years.
DeltaTee
ReadyNAS User
 
Posts: 57
Joined: Sat Jun 24, 2006 7:28 am
Location: Indianapolis, IN
ReadyNAS: NV

Re: Question about minidlna command line

Postby Belcik » Fri Sep 21, 2012 10:20 pm

/usr/sbin/minidlna -h

and afterwards: /usr/sbin/minidlna -R

Should work, at least this is how is described in code:

Code: Select all
      case 'R':
         snprintf(buf, sizeof(buf), "rm -rf %s/files.db %s/art_cache", db_path, db_path);
         if( system(buf) != 0 )
            DPRINTF(E_WARN, L_GENERAL, "Failed to clean old file cache.\n");
         break;
Belcik
ReadyNAS Newbie
 
Posts: 1
Joined: Fri Sep 21, 2012 10:17 pm
ReadyNAS: Duo

Re: Question about minidlna command line

Postby audetto » Wed Oct 03, 2012 2:01 pm

Do I need to stop the running minidlna first or I just do

minidlna -R

and there are no conflicts with the instances already running?
audetto
ReadyNAS User
 
Posts: 79
Joined: Mon Apr 30, 2007 3:42 pm


Return to ReadyDLNA



Who is online

Users browsing this forum: RN_Dan and 2 guests