Page 1 of 1

[Script] Script to rescan MediaFolders

Posted: 10 Dec 2012, 04:41
by Madsonic
Hi,

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

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 Madsonic ::
:::::::::::::::::::::

:: 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

Posted: 22 Jan 2013, 15:37
by boognish43
First post.. great job with madsonic!!

I went back to 4.6 after trying 4.7 since I wasnt able to see my media right when it was added.
I am playing around with Madsonic which looks incredible!!!! I see that when I add a new album i still need to refresh on the browser version before I can see it in the mobile app. I believe this script will solve this solution for me..is this correct?
Thanks for all your hard work!

Re: [Script] WGET Script to rescan MediaFolders

Posted: 14 Mar 2013, 02:55
by Madsonic
boognish43 wrote:First post.. great job with madsonic!!

I went back to 4.6 after trying 4.7 since I wasnt able to see my media right when it was added.
I am playing around with Madsonic which looks incredible!!!! I see that when I add a new album i still need to refresh on the browser version before I can see it in the mobile app. I believe this script will solve this solution for me..is this correct?
Thanks for all your hard work!
Since Build 3336 you can use instead the NEW REST APIs: startRescan, scanstatus

EXAMPLE:

Code: Select all

http://localhost:4040/rest/startRescan.view?u=admin&p=admin&v=1.9.0&c=WebScript

http://localhost:4040/rest/scanstatus.view?u=admin&p=admin&v=1.9.0&c=WebScript
RESULT:

Code: Select all

<subsonic-response xmlns="http://subsonic.org/restapi" status="ok" version="1.9.0">
<Scan>
<Status started="true" count="1052"></Status>
</Scan>
</subsonic-response>

Code: Select all

<subsonic-response xmlns="http://subsonic.org/restapi" status="ok" version="1.9.0">
<Scan>
<Status started="false"></Status>
</Scan>
</subsonic-response>
Best regards

Re: [Script] Script to rescan MediaFolders

Posted: 07 Jun 2014, 11:42
by osef
Hello,

how to do this on linux please ?

Cordially.

Re: [Script] Script to rescan MediaFolders

Posted: 11 Jun 2014, 10:27
by rZn
osef wrote:Hello,

how to do this on linux please ?

Cordially.
Just use these two in a browser

http://localhost:4040/rest/startRescan. ... =WebScript

http://localhost:4040/rest/scanstatus.v ... =WebScript

rZneX

Re: [Script] Script to rescan MediaFolders

Posted: 15 Aug 2015, 16:01
by addseo1115
Just use these two in a browser.