[Script] WGET Script to rescan MediaFolders

Madsonic Mashup Mod is a fork of the Subsonic 4.7 Server Build 3090 with some Subsonic Data schema modifications!

Moderator: moderators

[Script] WGET Script to rescan MediaFolders

Postby MadEvil » Thu Dec 06, 2012 6:42 pm

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
Madsonic Developer
User avatar
MadEvil
 
Posts: 354
Joined: Wed Nov 09, 2011 8:35 pm
Location: Vienna

Re: [Script] WGET Script to rescan MediaFolders

Postby tsquillario » Mon Dec 10, 2012 11:05 pm

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).
Jamstash Developer
Chrome App - https://chrome.google.com/webstore/detail/jccdpflnecheidefpofmlblgebobbloc
Beta Site - http://beta.jamstash.com
GitHub Project - https://github.com/tsquillario/Jamstash
User avatar
tsquillario
 
Posts: 206
Joined: Thu Jun 30, 2011 5:10 pm
Location: State College, PA

Re: [Script] WGET Script to rescan MediaFolders

Postby boognish43 » Thu Apr 11, 2013 4:18 pm

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 :)
boognish43
 
Posts: 66
Joined: Sat Jan 09, 2010 3:13 pm

Re: [Script] WGET Script to rescan MediaFolders

Postby MadEvil » Thu Apr 11, 2013 9:01 pm

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
Madsonic Developer
User avatar
MadEvil
 
Posts: 354
Joined: Wed Nov 09, 2011 8:35 pm
Location: Vienna


Return to Madsonic

Who is online

Users browsing this forum: No registered users and 23 guests