[Script] Script to rescan MediaFolders

Scripts for Madsonic

[Script] Script to rescan MediaFolders

Unread postby Madevil » 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 436 times
User avatar
Madevil
Administrator
Administrator
 
Posts: 911
Joined: 07 Dec 2012, 03:58
Has thanked: 1323 times
Been thanked: 951 times

Re: [Script] WGET Script to rescan MediaFolders

Unread postby 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!
boognish43
 
Posts: 1
Joined: 22 Jan 2013, 15:31
Has thanked: 0 time
Been thanked: 1 time

Re: [Script] WGET Script to rescan MediaFolders

Unread postby Madevil » 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
User avatar
Madevil
Administrator
Administrator
 
Posts: 911
Joined: 07 Dec 2012, 03:58
Has thanked: 1323 times
Been thanked: 951 times

Re: [Script] Script to rescan MediaFolders

Unread postby osef » 07 Jun 2014, 11:42

Hello,

how to do this on linux please ?

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

Re: [Script] Script to rescan MediaFolders

Unread postby rZn » 11 Jun 2014, 10:27

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

Re: [Script] Script to rescan MediaFolders

Unread postby addseo1115 » 15 Aug 2015, 16:01

Just use these two in a browser.
addseo1115
 


Return to Scripts

Who is online

Users browsing this forum: No registered users and 1 guest

cron