* ReadyNAS-specific change to remove any leftover scanning flag files when we start.
This commit is contained in:
@ -610,6 +610,7 @@ main(int argc, char * * argv)
|
|||||||
|
|
||||||
#ifdef READYNAS
|
#ifdef READYNAS
|
||||||
DPRINTF(E_WARN, L_GENERAL, "Starting ReadyDLNA...\n");
|
DPRINTF(E_WARN, L_GENERAL, "Starting ReadyDLNA...\n");
|
||||||
|
unlink("/ramfs/.upnp-av_scan");
|
||||||
#else
|
#else
|
||||||
DPRINTF(E_WARN, L_GENERAL, "Starting MiniDLNA...\n");
|
DPRINTF(E_WARN, L_GENERAL, "Starting MiniDLNA...\n");
|
||||||
#endif
|
#endif
|
||||||
|
10
scanner.c
10
scanner.c
@ -787,11 +787,6 @@ ScanDirectory(const char * dir, const char * parent, enum media_types type)
|
|||||||
if( !parent )
|
if( !parent )
|
||||||
{
|
{
|
||||||
startID = get_next_available_id("OBJECTS", BROWSEDIR_ID);
|
startID = get_next_available_id("OBJECTS", BROWSEDIR_ID);
|
||||||
#ifdef READYNAS
|
|
||||||
FILE * flag = fopen("/ramfs/.upnp-av_scan", "w");
|
|
||||||
if( flag )
|
|
||||||
fclose(flag);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i=0; i < n; i++) {
|
for (i=0; i < n; i++) {
|
||||||
@ -831,6 +826,11 @@ start_scanner()
|
|||||||
if (setpriority(PRIO_PROCESS, 0, 15) == -1)
|
if (setpriority(PRIO_PROCESS, 0, 15) == -1)
|
||||||
DPRINTF(E_WARN, L_INOTIFY, "Failed to reduce scanner thread priority\n");
|
DPRINTF(E_WARN, L_INOTIFY, "Failed to reduce scanner thread priority\n");
|
||||||
|
|
||||||
|
#ifdef READYNAS
|
||||||
|
FILE * flag = fopen("/ramfs/.upnp-av_scan", "w");
|
||||||
|
if( flag )
|
||||||
|
fclose(flag);
|
||||||
|
#endif
|
||||||
scanning = 1;
|
scanning = 1;
|
||||||
freopen("/dev/null", "a", stderr);
|
freopen("/dev/null", "a", stderr);
|
||||||
while( media_path )
|
while( media_path )
|
||||||
|
Reference in New Issue
Block a user