[Script] Script to rescan MediaFolders

Scripts for Madsonic
User avatar
Madsonic
Administrator
Administrator
Posts: 960
Joined: 07 Dec 2012, 03:58
Has thanked: 1146 times
Been thanked: 447 times

[Script] Script to rescan MediaFolders

Unread post by Madsonic » 10 Dec 2012, 04:41

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
Attachments
rescan-script.zip
(1.71 MiB) Downloaded 530 times
These users thanked the author Madsonic for the post:
admin

boognish43
Posts: 1
Joined: 22 Jan 2013, 15:31
Has thanked: 0
Been thanked: 1 time

Re: [Script] WGET Script to rescan MediaFolders

Unread post by boognish43 » 22 Jan 2013, 15:37

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!
These users thanked the author boognish43 for the post:
Madsonic

User avatar
Madsonic
Administrator
Administrator
Posts: 960
Joined: 07 Dec 2012, 03:58
Has thanked: 1146 times
Been thanked: 447 times

Re: [Script] WGET Script to rescan MediaFolders

Unread post by Madsonic » 14 Mar 2013, 02:55

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

osef
Posts: 1
Joined: 25 May 2014, 11:20
Has thanked: 0
Been thanked: 0

Re: [Script] Script to rescan MediaFolders

Unread post by osef » 07 Jun 2014, 11:42

Hello,

how to do this on linux please ?

Cordially.

rZn
Posts: 4
Joined: 07 Feb 2013, 04:33
Has thanked: 8 times
Been thanked: 3 times

Re: [Script] Script to rescan MediaFolders

Unread post by rZn » 11 Jun 2014, 10:27

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
These users thanked the author rZn for the post:
rick

addseo1115
Has thanked: 0
Been thanked: 0

Re: [Script] Script to rescan MediaFolders

Unread post by addseo1115 » 15 Aug 2015, 16:01

Just use these two in a browser.

Post Reply