Page 1 of 1

[Script] WGET Script to rescan MediaFolders

PostPosted: Thu Dec 06, 2012 6:42 pm
by MadEvil
Hi,

some People want to trigger this more often as you can set in subsonic.

i write a short windows script to trigger this action.

i used a special wget version which can handle self signed certificates if you use SSL.

Code: Select all
:::::::::::::::::::::
:: Rescan Subsonic ::
:::::::::::::::::::::

:: rescan Subsonic MediaFolders
:: edit username/password/serverlink to your need

set username=admin
set password=admin
set serverlink=http://127.0.0.1

:::::::::::::::::::::

set wgetsettings=--spider --no-check-certificate --cookies=on --keep-session-cookies --save-cookies=%temp%\cookie.txt

wget %wgetsettings% --user-agent=Mozilla "%serverlink%/login.view?user=%username%&password=%password%"
wget %wgetsettings% --load-cookies=%temp%\cookie.txt --referer="%serverlink%" "%serverlink%/musicFolderSettings.view?scanNow"

best regards

Re: [Script] WGET Script to rescan MediaFolders

PostPosted: Mon Dec 10, 2012 11:05 pm
by tsquillario
Any idea how you would add other URL parameters to this?

musicFolderSettings.view?scanNow&u=user&p=pass

I tried setting scanNow=true and scanNow=1 and neither worked. I'm basically trying to call this via an ajax request (MiniSub).

Re: [Script] WGET Script to rescan MediaFolders

PostPosted: Thu Apr 11, 2013 4:18 pm
by boognish43
This looks like what I need. I have multiple people adding music to my server and since I upgraded to 4.7 I am getting texts of why their music wasnt loaded.
Could you explain to someone who has zero knowledge how to use scripts on what I need to do to make this work?

Thank you soo much for all of your hard work..both posters above me :)

Re: [Script] WGET Script to rescan MediaFolders

PostPosted: Thu Apr 11, 2013 9:01 pm
by MadEvil
boognish43 wrote:This looks like what I need. I have multiple people adding music to my server and since I upgraded to 4.7 I am getting texts of why their music wasnt loaded.
Could you explain to someone who has zero knowledge how to use scripts on what I need to do to make this work?

Thank you soo much for all of your hard work..both posters above me :)


Hi there,

i have a better solution for you! You can do this with the Madsonic-Mod REST API

Look at this Thread on the Madsonic-Forum --> http://forum.madsonic.org/viewtopic.php?f=29&t=10#p737

or you use the WGET Script, you only need to replace Username, Password and Server-address.

Best regards