A solution for Twonky Server 7.x nas startup scanning

General discussion about the media server. Feature requests. Hints, tips and tricks.
User avatar
phibertron
Posts: 1566
Joined: Sun Jan 30, 2011 5:52 pm
AV Hardware: Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

A solution for Twonky Server 7.x nas startup scanning

Postby phibertron » Sun Aug 26, 2012 3:36 am

After doing some testing with twonky server 7.x on my wd mbl
I found a solution that should be acceptable for most people
that are looking for a way to do this

By adding -scantime 0 -forceinitialscan 0 to the startup string of twonky
doing this stops the startup scanning
By adding wget -o /dev/null "http ://127.0.0.1:9000/rpc/set_option?scantime=-1"
to the startup script after server startup
media detection is re-enabled, so that adding new media will be detected

I added some sleep time before issueing the wget command
5 seconds seems to be good, 10 is a safe bet
if it is done too quckly it might not get set as the server isnt fully running yet

I modified the default twonky.sh for 7.0.9
and changed the following to get this to work on my nas

Code: Select all

    fi
    echo -n "Starting $TWONKYSRV ... "
    "$TWONKYSRV"
    rc_status -v
  fi
  start_support_daemon "${WEBDAV_DAEMON}" "${WORKDIR}"
  start_support_daemon "${PROXY_DAEMON}" "${WORKDIR}"
;;


To this by adding -scantime 0 -forceinitialscan 0 and wget

Code: Select all

    fi
    echo -n "Starting ${DAEMON} ... "
    "$TWONKYSRV" -scantime 0 -forceinitialscan 0
    rc_status -v
  fi
  start_support_daemon "${WEBDAV_DAEMON}" "${WORKDIR}"
  start_support_daemon "${PROXY_DAEMON}" "${WORKDIR}"
  ( sleep 5; wget -o /dev/null "http://127.0.0.1:9000/rpc/set_option?scantime=-1" )
;;


The above works as intended, no startup scanning
and any media added post twonky server startup
will be automatically added

There are two things to be aware of

1.
any media added while twonky server is not running
will not be detected, and you will have to do a rescan
this shouldnt be a problem at all is it is set to run at startup on most nas's

2.
doing a server restart from the twonky gui or an rpc call
will not invoke the wget that sets scantime to -1
so it will go back to 0
since you are already at the twonky web gui
you could change it to -1 once the server has been restarted
you have to do it after the server restart, as it uses the startup switches on restart

however if you do it from the shell "./twonky stop" and then "./twonky start"
then it that is the same as startup
and will get changed to -1 with the wget command
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

User avatar
Briain
Posts: 478
Joined: Thu Jan 03, 2008 8:07 pm
AV Hardware: Linn Klimax DS
Linn Majik DS-I
Linn Sneaky DS
WDTV Live Hib
Sonos 80
Location: Edinburgh, Scotland

Re: A solution for Twonky Server 7.x nas startup scanning

Postby Briain » Sat Sep 01, 2012 9:39 pm

Hi phibertron

That's an absolutely excellent piece of R&D work!! :)

I wonder if the same trick would work with Twonky 6.0? I'll try it out when I get some time as my friend's D-Link DNS323 takes nearly 1 hour to do the post boot Twonky refresh, so any way to stop it would be a really fabulous enhancement for his situation.

Bri

User avatar
phibertron
Posts: 1566
Joined: Sun Jan 30, 2011 5:52 pm
AV Hardware: Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: A solution for Twonky Server 7.x nas startup scanning

Postby phibertron » Sat Sep 01, 2012 9:52 pm

Thanks Brian

I 'm pretty sure that -forceinitialscan doesnt exist in 6.x
The big question will be is if it doesnt,
does doing -scantime 0 do the same thing on 6.x as it does on 7.x

ill do a quick test on a windows version of 6.x
and if it does work there, ill test on the wd mbl
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

User avatar
phibertron
Posts: 1566
Joined: Sun Jan 30, 2011 5:52 pm
AV Hardware: Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: A solution for Twonky Server 7.x nas startup scanning

Postby phibertron » Sat Sep 01, 2012 11:35 pm

I havent test it on the nas yet
but here is what I have discovered so far on windows
in regards to 6.x

If I start twonkyserver with -scantime 0
It appears to be working, dont have a large enough media base on it to see the impact
but from the config gui, under server status
if you restert the server in another browser,
you can see the server status happen as it boots in the other browser
it does seem to scan some mediafusion stuff and twonky uploads
but does not appear to be rescanning the media, which is good so far

I went on to test whether ot not setting scantime with an rpc call will work

http:127.0.0.1:900/rpc/set_option?scantime=-1
it does return -1 in the browser, but...
after doing that I do a get to check it

http:127.0.0.1:900/rpc/get_option?scantime
it is returning 0
which is not good

I mucked around with that for a bit
even tired to initiate a /rpc/set_all
but that doesnt/wont work because scantime is being seen as 0
and thus gets written to the twonkyserver.ini

However, the following works, why, not sure yet
from the config gui, go to sharing and change scantime to -1
and then click save settings at the top of the page
why it works there, and not via an rpc call is the question

I suspect that it has to do with the forced -scantime 0 at startup behavior in 6.x
as other settings that are not foced change in realtime
but if it isnt to much trouble for the user of the nas,
he can start his nas with the forced -scantime 0,
and from the config gui change scantime from 0 to -1
and hit save changes when he wants to add new media
not a perfect solution, but better than waiting an hour for rescan to finish
and or not detecting new media
(note the save changes, says not att changes take effect till restart, there is no need to restart)
just make sure that it is at -1 before adding new media
as if not the only way to get it detected would be to remove the "newer" media
set it to -1 and the add it back
or worse.. a rescan of content

If I can think of anything more, will let you know
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

User avatar
Briain
Posts: 478
Joined: Thu Jan 03, 2008 8:07 pm
AV Hardware: Linn Klimax DS
Linn Majik DS-I
Linn Sneaky DS
WDTV Live Hib
Sonos 80
Location: Edinburgh, Scotland

Re: A solution for Twonky Server 7.x nas startup scanning

Postby Briain » Tue Sep 04, 2012 2:53 pm

Hi

Thanks for checking that out. I'm just having a look at the Qnap version of the start/stop script (twonkymedia6.sh) and it is a little different to the stock one. I tried appending the start line (as shown below), but it had no effect; it still rescans when you restart it. I will have a think about why it doesn't work (maybe I'm missing something obvious; Linux start scripts are not anywhere near my field of expertise as I'm more familiar with microwave radio links and big dishes)! :)

Code: Select all

   echo -n "Starting UPnP MediaServer: ($TWONKYSRV) "
   
   _contentdir=`/sbin/getcfg "" contentdir -d "/Qmultimedia" -f ${DEFAULT_INIFILE}`
   [ "${MULTIMEDIA_SHARE}" = "${_contentdir}" ] || /bin/sed -i 's/^contentdir.*$/'"contentdir=+A|\/${MULTIMEDIA_SHARE}"'/' ${DEFAULT_INIFILE}
   
   if [ ! -f ${INIFILE} ]; then
      /bin/cp ${DEFAULT_INIFILE} ${INIFILE}
   fi

   $TWONKYSRV -inifile "${INIFILE}" -scantime 0 -enableweb 2 -powersavemode 1 -logfile ${LOG_FILE} 2>/dev/null 1>/dev/null &
      rc_status -v
      /bin/sleep 2
    fi
  ;;


NB For anyone else reading this (who has a Qnap) I've removed all the multicast bits that precede the $TWONKYSERV line (in the above example; they're still there in my actual start file).

User avatar
phibertron
Posts: 1566
Joined: Sun Jan 30, 2011 5:52 pm
AV Hardware: Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: A solution for Twonky Server 7.x nas startup scanning

Postby phibertron » Tue Sep 04, 2012 3:27 pm

To clarify, when you say restart you mean stoping and starting the script right?
As the restart of the server from the web gui is different, with different results

looking at the script, you put the -scantime in the right place
I wonder if at all, if the -inifile "${INIFILE}" has part in this
not sure that if scantime is not 0 in the inifile even though -scantime is being passed at command line
which one if at all is getting overridden or not looked at

There is also the possibility, that it might not be possible at all
I havent tested a nas build of 6.x, I did a test on 6.0.39 windows build, with a small media library
will try and get around to trying on a nas build with a larger library

PS
I worked on avionics and radar systems back in my hardware days
radio waves are fun to play with =)
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

User avatar
Briain
Posts: 478
Joined: Thu Jan 03, 2008 8:07 pm
AV Hardware: Linn Klimax DS
Linn Majik DS-I
Linn Sneaky DS
WDTV Live Hib
Sonos 80
Location: Edinburgh, Scotland

Re: A solution for Twonky Server 7.x nas startup scanning

Postby Briain » Wed Sep 05, 2012 1:19 am

Hi

Yes, I used .../TwonkyMedia/twonkymedia6.sh restart

Qnap have an ini file located in /etc/config (from memory) and that's normally used by the version of Twonky that comes 'embedded' with the NAS firmware. They also make an optional 'packaged' versions of Twonky (called QPKG's) which enable you to update Twonky without having to await a new NAS firmware release. These are installed in a different location, and the start script also ensures the embedded version is not started when there is also a QPKG version installed (so it's a little different to the normal script). Both versions point to the same ini file such that the same settings (share paths, rescan time, etc) will be kept when updating to the QPKG (and indeed maintained when removing the QPKG and reverting to the embedded version), so again, that adds another variable. I'll have to double check this tomorrow as there are a good few ini files and symlinks in a Qnap, so it could well be that I've missed something subtlety different about the start process.

In my tests, the rescan was set to 0 via the web interface, so that would be in the 'shared' ini file (that's how I normally set Twonky; I usually kick a rescan off manually via an rpc) so the conditions all sound correct. My hunch is that it might just not work with Twonky 6, but if I don't find it tomorrow, I will install the Windows version (when I get some free time) and test it with that; pointing to the large media collection on my NAS. If I can make any progress with the Windows version (to prove if the concept works), I'll then more carefully look at the Qnap NAS installation and try to figure out if I've overlooked anything. I'll let you know how I get on with all my tests.

Bri

PS I do like my wireless waves; particularly the very small ones!! I used to work in the microwave radio department of a large comms company. I then worked in the commercial side (solutions) and ended up dealing with anything that had any form of radio content. I'm also one of these radio amateurs, but I've not practiced that for years. Now that I'm self employed (semi-retired) I plan to get back into the radio ham stuff, but as you might have guessed, I plan to be heading more towards the several centimetre wavelengths than the hundreds of meter ones! :)

User avatar
phibertron
Posts: 1566
Joined: Sun Jan 30, 2011 5:52 pm
AV Hardware: Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: A solution for Twonky Server 7.x nas startup scanning

Postby phibertron » Sun Sep 09, 2012 1:10 am

Was looking at something else and ran across a post about nicrestart

# Watch changes in machine's network conf (1: yes, 0: no)
nicrestart=0

if nicrestart is 1 that if the server goes to sleep mode
when it wakes up twonky server would in essence do a restart
which in the case of nas that was already beat up from a startup scan
it would be doing yet another startup scan

I havent put to this the test to find out yet,
but I assume that it is the correct behavior,
in that if nicrestart=1, then being awoken from sleep
might also reactivate the nic, which twonky would see, and then restart/rescan
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

ksmueller
Posts: 8
Joined: Mon Jan 25, 2010 1:47 pm
AV Hardware: UPnP servers: Twonky Media Server on NAS
UPnP client: Terratec Noxon 2 Audio

Re: A solution for Twonky Server 7.x nas startup scanning

Postby ksmueller » Tue Jul 22, 2014 1:48 pm

Does not work on qnap version 7.2.70.0. I have added the two command line parameters in TwonkyMedia/twonkymedia6.sh:

Code: Select all

$TWONKYSRV -scantime 0 -forceinitialscan 0 -inifile "${INIFILE}" -enableweb 2 -powersavemode 1 -logfile ${LOG_FILE} -suppressmenu mediafeeds 2>/dev/null 1>/dev/null &


The parameters are recognized according to logfile:

Code: Select all

...
13:05:07:236  [Startup] - LOG_SYSTEM: server_main_impl : Executable file: /share/HDA_DATA/.qpkg/TwonkyMedia/twonkyserver
13:05:07:237  [Startup] - LOG_SYSTEM: server_main_impl : Command Line Parameters: 14
13:05:07:237  [Startup] - LOG_SYSTEM: server_main_impl : cmdline 1:-scantime
13:05:07:237  [Startup] - LOG_SYSTEM: server_main_impl : cmdline 2:0
13:05:07:237  [Startup] - LOG_SYSTEM: server_main_impl : cmdline 3:-forceinitialscan
13:05:07:237  [Startup] - LOG_SYSTEM: server_main_impl : cmdline 4:0
13:05:07:237  [Startup] - LOG_SYSTEM: server_main_impl : cmdline 5:-inifile
13:05:07:237  [Startup] - LOG_SYSTEM: server_main_impl : cmdline 6:/etc/config/twonkyvision-mediaserver6.ini
...


But the scanning takes place on every start. :x

Also tried nicrestart=0 and both parameters are set in inifile the same as command line:

Code: Select all

# Force a database update at startup (skipped by default with scantime=0)
forceinitialscan=0

[...]

# -1 for evented, 0 for disabled, positive value for rescan time in minutes
scantime=0


Any suggestions for help?
TwonkyMedia 7.2.70.0 on QNAP TS-112
Renderer Terratec Noxon 2 audio

User avatar
phibertron
Posts: 1566
Joined: Sun Jan 30, 2011 5:52 pm
AV Hardware: Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: A solution for Twonky Server 7.x nas startup scanning

Postby phibertron » Tue Jul 22, 2014 5:13 pm

I know the qpkg contains a bunch of ini files for twonky
when you looked at the ini file you looked at
was it this one "cmdline 6:/etc/config/twonkyvision-mediaserver6.ini"

I havent touched on this topic in a few years
but I will see what the windows and debian for my wd nas do
and let you know
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

ksmueller
Posts: 8
Joined: Mon Jan 25, 2010 1:47 pm
AV Hardware: UPnP servers: Twonky Media Server on NAS
UPnP client: Terratec Noxon 2 Audio

Re: A solution for Twonky Server 7.x nas startup scanning

Postby ksmueller » Tue Jul 22, 2014 6:13 pm

Yes you are right.
I looked at /etc/config/twonkyvision-mediaserver6.ini

I am pretty sure that this is the right one because it changes with the configuration from webserver and it is handed over in the startscript with commandline parameter "-inifile ..".

Really would like to get a solution. Thanks for your help.
TwonkyMedia 7.2.70.0 on QNAP TS-112
Renderer Terratec Noxon 2 audio

User avatar
phibertron
Posts: 1566
Joined: Sun Jan 30, 2011 5:52 pm
AV Hardware: Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: A solution for Twonky Server 7.x nas startup scanning

Postby phibertron » Wed Jul 23, 2014 5:06 pm

I haven't tested on my nas yet

though I did do a test on a windows vm using 7.2.8
my previous results still appear to work as intended

when you did your tests on the nas
what approach did you use to stop and start the service?
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

User avatar
phibertron
Posts: 1566
Joined: Sun Jan 30, 2011 5:52 pm
AV Hardware: Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: A solution for Twonky Server 7.x nas startup scanning

Postby phibertron » Fri Jul 25, 2014 12:14 am

I tested using twonky-powerpc-glibc-2.2.5-7.2.8.zip on my WD MBL
and it worked as expected

I suspect that its either a qnap nas specific issue
or something to do with the way its being started stopped and or restarted
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

ksmueller
Posts: 8
Joined: Mon Jan 25, 2010 1:47 pm
AV Hardware: UPnP servers: Twonky Media Server on NAS
UPnP client: Terratec Noxon 2 Audio

Re: A solution for Twonky Server 7.x nas startup scanning

Postby ksmueller » Fri Jul 25, 2014 4:32 pm

To answer your questions:
Twonky is started via a shell script "twonkymedia6.sh" in the Twonky installation folder, which is located in my Qnap 1bay NAS without RAID in /share/HDA_DATA/.qpkg/TwonkyMedia

This script is called on system start or when Twonky is enabled in the administration Desktop called QTS because
it is referenced as SHELL in the qpkg.conf file:

Code: Select all

Shell = /share/HDA_DATA/.qpkg/TwonkyMedia/twonkymedia6.sh



This script I modified with the parameters "-scantime 0 -forceinitialscan 0".
To test it I have as well called it manually from shell with parameter "stop" and then "start". The result is the same: Twonky scanns on start.

I have also temporarily removed the stdout and err redirection to /dev/null to see the output. But I think this delivers no clue:

Code: Select all

Starting UPnP MediaServer: (/share/HDA_DATA/.qpkg/TwonkyMedia/twonkystarter) AppleDouble,AppleDB,AppleDesktop,TemporaryItems,.@__thumb,@Recycle
Detaching from parent

Twonky Version 7.2.7

For image conversion and scaling the TwonkyServer utilizes ImageMagick. For details on the license please see /share/HDA_DATA/.qpkg/TwonkyMedia/cgi-bin/convert-readme.txt
No personal TLS certificate found in /var/twonky/twonkyserver/tls.pem! Will use built-in keys (this is insecure)! You have been warned ...


Is there a command line description or manual? I would like to know what the other parameters are for?
E.g: -enableweb 2 -powersavemode 1 -logfile ${LOG_FILE} -suppressmenu mediafeeds
TwonkyMedia 7.2.70.0 on QNAP TS-112
Renderer Terratec Noxon 2 audio

User avatar
phibertron
Posts: 1566
Joined: Sun Jan 30, 2011 5:52 pm
AV Hardware: Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: A solution for Twonky Server 7.x nas startup scanning

Postby phibertron » Fri Jul 25, 2014 5:00 pm

you noted that you are doing this

/share/HDA_DATA/.qpkg/TwonkyMedia/twonkymedia6.sh stop
/share/HDA_DATA/.qpkg/TwonkyMedia/twonkymedia6.sh start

but I wonder if twonky is also being started or stopped by the qnap
from somewhere else, like it is on other nas's

I know its possible to run apps from other places
but usually, things meant to auto start are in /etc/init.d/
and on the qnap possibly /opt/etc/init.d/

There is no manual, just info gleaned from readme files and comments in various files
In the past I attempted to create an archive of things I noticed, below are a few examples
most of the switches that can be used to start twonky, not all of them,
of the ones that are in the twonkyserver.ini file
or you could get them current ones by using this http rpc call x.x.x.x:9000/rpc/get_all

TwonkyServer INI Configuration Settings
viewtopic.php?f=2&t=9497

How to manage Twonky Server with URL RPC GET SET commands
viewtopic.php?f=2&t=9364

adding those switches to the twonkystarter command line launch
will override settings in the twonkyserver.ini or any of the built in default settings

The issue you are seeing is one of two things
1. either the script you are using isn't the right one
2. there is an issue with the twonky builds for the qnap that wont override the startup scan

note:
I did find it odd that the ini is located here
/etc/config/twonkyvision-mediaserver6.ini
but the possible startup file is located here
/share/HDA_DATA/.qpkg/TwonkyMedia/twonkymedia6.sh
.
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

User avatar
phibertron
Posts: 1566
Joined: Sun Jan 30, 2011 5:52 pm
AV Hardware: Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: A solution for Twonky Server 7.x nas startup scanning

Postby phibertron » Fri Jul 25, 2014 5:18 pm

I googled qnap /etc/init.d twonky
and discovered this

http://forum.qnap.com/viewtopic.php?p=290584

which tells me that /etc/init.d/twonkymedia6.sh might exist on your nas
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

ksmueller
Posts: 8
Joined: Mon Jan 25, 2010 1:47 pm
AV Hardware: UPnP servers: Twonky Media Server on NAS
UPnP client: Terratec Noxon 2 Audio

Re: A solution for Twonky Server 7.x nas startup scanning

Postby ksmueller » Sun Jul 27, 2014 9:52 am

Hi phibertron,

the script in /etc/init.d is only a symlink to /share/HDA_DATA/.qpkg/TwonkyMedia/twonkymedia6.sh

Code: Select all

[/etc/init.d] # ls -al twonkymedia6.sh
lrwxrwxrwx    1 admin    administ        49 Jul 27 09:41 twonkymedia6.sh -> /share/HDA_DATA/.qpkg/TwonkyMedia/twonkymedia6.sh*


Not having installed optware the folder /opt/etc/init.d/ does not exist..

As a manual start of twonky via twonkymedia6.sh triggers scanning as well I tend to believe your assumption that the twonky bulid for qnap behaves differently.
I have to live with that or install a newer release than my qnap package (which is 7.2.70.0 the latest from from Qnap ) on my own.

Thanks for your support.
TwonkyMedia 7.2.70.0 on QNAP TS-112
Renderer Terratec Noxon 2 audio

User avatar
phibertron
Posts: 1566
Joined: Sun Jan 30, 2011 5:52 pm
AV Hardware: Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: A solution for Twonky Server 7.x nas startup scanning

Postby phibertron » Mon Jul 28, 2014 5:48 pm

thanks for looking at that, didn't know they linked it
If I can think of anything to try I'll pass it along
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

User avatar
phibertron
Posts: 1566
Joined: Sun Jan 30, 2011 5:52 pm
AV Hardware: Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: A solution for Twonky Server 7.x nas startup scanning

Postby phibertron » Tue Jul 29, 2014 8:16 pm

Just a thought, what is "clearcacheonrestart" set to?

Code: Select all

http://x.x.x.x:900/rpc/get_option?clearcacheonrestart
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

ksmueller
Posts: 8
Joined: Mon Jan 25, 2010 1:47 pm
AV Hardware: UPnP servers: Twonky Media Server on NAS
UPnP client: Terratec Noxon 2 Audio

Re: A solution for Twonky Server 7.x nas startup scanning

Postby ksmueller » Wed Jul 30, 2014 1:09 pm

I get a blank page in return to the url query . Does this mean the parameter is undefined?
Other parameteres (e.g. nicrestart) deliver expected values.

I added a clearcacheonrestart 0 to the start command. Now I get a 0. But startup sacanning does still take place.
TwonkyMedia 7.2.70.0 on QNAP TS-112
Renderer Terratec Noxon 2 audio

User avatar
phibertron
Posts: 1566
Joined: Sun Jan 30, 2011 5:52 pm
AV Hardware: Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: A solution for Twonky Server 7.x nas startup scanning

Postby phibertron » Wed Jul 30, 2014 2:43 pm

ksmueller wrote:I get a blank page in return to the url query . Does this mean the parameter is undefined?
Other parameteres (e.g. nicrestart) deliver expected values.


Yup it means the value was undefined, as in it had no value assinged

ksmueller wrote:I added a clearcacheonrestart 0 to the start command. Now I get a 0. But startup sacanning does still take place.


The reason for asking was this
If clearcacheonrestart was set 1, I can see why the rescan would take place on startup,
even with the other settings in place to make it not scan
but say one then set it to 0, if a full scan had not taken place
its possible that it would take to restarts for the effect to kick in of no rescan
but since it had no value to begin with, I don't think this is the case
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

dragosdia
Posts: 1
Joined: Tue Jan 05, 2016 4:11 pm
AV Hardware: My Book World 2 - Version: Twonky 7.0.9 Special

Re: A solution for Twonky Server 7.x nas startup scanning

Postby dragosdia » Tue Jan 05, 2016 4:16 pm

Hi,

I have tried your suggestion but the scan still happens at every startup/restart.

I have a WD My Book World 2 with Version: Twonky 7.0.9 Special. Just to tell you, I am the worst linux programmer ever :)

The twonky folder is located in /usr/local/twonky and i have a startup script in /etc/init.d called S97twonkyserver

I replaced the code in /usr/local/twonky/twonky.sh and restarted using ssh.. same problem rescan triggers.

I tried adding the parameters in the S97twonkyserver but same problem.

Could you please give me some more details on how to make this work ? I have more than 100K pictures and scanning takes more than 1 hour.

Thank you,
Dragos

r4gjx9dsl
Posts: 1
Joined: Wed Jul 05, 2017 9:39 am
AV Hardware: Twonky

Re: A solution for Twonky Server 7.x nas startup scanning

Postby r4gjx9dsl » Wed Jul 05, 2017 9:48 am

Is there any working solution concerning deactivating the startup scanning from an external USB harddrive? (Twonky 7.xx or 8.xx)


Return to “TwonkyServer”

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 2 guests

cron