Old 3rd August 2015, 16:12   #1
Avian
Junior Member
 
Join Date: Aug 2015
Posts: 9
Getting metadata XML w/o using password

Hi gang,

I'm creating a radio station mobile app and I'm trying to grab some metadata from a v2.4.7.256 SC server to use for additional information about the song. Of course, I could use a URL with my shoutcast admin password to get the xml metadata from page 5 from the private pages, but that is a major security risk to just send that password in a URL over a mobile device.

Is there anyway to grab that metadata without invoking the admin password? Or any other trick I should use?

Thanks in advance!

A
Avian is offline   Reply With Quote
Old 3rd August 2015, 16:32   #2
neralex
Major Dude
 
Join Date: Mar 2011
Posts: 553
IP:PORT/stats?sid=1
IP:PORT/nextsongs?sid=1

http://wiki.winamp.com/wiki/SHOUTcas...2_XML_Reponses
neralex is offline   Reply With Quote
Old 3rd August 2015, 16:32   #3
meun5
Junior Member
 
Join Date: Jan 2015
Posts: 13
That depends on the information you are trying to obtain. There is a publicly accessable /statistics page that provides basic information about the stream.
meun5 is offline   Reply With Quote
Old 3rd August 2015, 16:55   #4
Avian
Junior Member
 
Join Date: Aug 2015
Posts: 9
The data I'm trying to obtain are custom XML tags (<extension> and <TXXX>, via SAM Broadcaster encoders) that appear to be only accessible via the "metadata" page (/admin.cgi?sid=1&mode=viewxml&page=5). I haven't seen them listed in other pages.

There's nothing particularly problematic with having this information behind the admin password - I'd love to just make it public if it was up to me. At least certainly these tags.
Avian is offline   Reply With Quote
Old 3rd August 2015, 17:34   #5
neralex
Major Dude
 
Join Date: Mar 2011
Posts: 553
Why don't you parse only your needed data on the server side and echo the data to get a html output? Then you could use a jquery or ajax request to grab your data into your app.

Try a look on this jquery plugin, maybe it helps: https://github.com/Wavestreaming/jquery-shoutcast
neralex is offline   Reply With Quote
Old 3rd August 2015, 17:49   #6
Avian
Junior Member
 
Join Date: Aug 2015
Posts: 9
Yes, this is our forced direction at this point. Very inelegant, plus it has the added downside of having a 3rd party agent involved in doing this. It also might slow things a bit and cause a lag in retrieving and displaying the data after a song change.
Avian is offline   Reply With Quote
Old 3rd August 2015, 21:02   #7
DrO
 
Join Date: Sep 2003
Posts: 27,873
as no one else to my knowledge has asked for it and there's not been an internal need to expose the extended data, all that's provided is as you've noted (page = 5). that can only be accessed either via the 'pass' parameter or by using HTTP basic auth.

I'll see if we can get something added in for the next DNAS release, since it's generally non-critical data so should be ok to expose like the /currentsong and other options do e.g. as a /currentmetadata?sid=x option.
DrO is offline   Reply With Quote
Old 4th August 2015, 01:02   #8
Avian
Junior Member
 
Join Date: Aug 2015
Posts: 9
Thanks DrO. That will extend the XML's usefulness for different applications!
Avian is offline   Reply With Quote
Old 4th August 2015, 01:27   #9
DrO
 
Join Date: Sep 2003
Posts: 27,873
it'll support XML and JSON responses (as all of the API methods from the 2.x DNAS aims to provide unless not able to do so due to legacy aspects).

though you'll have to wait for the next DNAS release to be able to make use of it (which will be released when it's ready - that's the only ETA I can provide you) and it'll give the same response as you're seeing with the admin locked option (so you can at least get things working and then just swap the url for the final version).
DrO is offline   Reply With Quote
Old 4th August 2015, 13:10   #10
Avian
Junior Member
 
Join Date: Aug 2015
Posts: 9
Thanks DrO for being so responsive. That's all we need!

Just out of curiosity, generally speaking, how often are new builds being released these days?
Avian is offline   Reply With Quote
Old 4th August 2015, 13:19   #11
DrO
 
Join Date: Sep 2003
Posts: 27,873
~3-4 months has been the average between releases since the sale happened. we're just a bit over that at the moment so it may (tentatively) be released by the end of the month due to the scope of changes that have needed to be made.
DrO is offline   Reply With Quote
Old 5th August 2015, 15:21   #12
Avian
Junior Member
 
Join Date: Aug 2015
Posts: 9
DrO - thanks again. If I may extend my request in that it would be excellent to also have the metadata as part of the track history on the server (or at least as an option). That way, when you get the song history XML, you have access to the metadata fields for those songs as well.

Thanks again!
Avian is offline   Reply With Quote
Old 5th August 2015, 15:28   #13
DrO
 
Join Date: Sep 2003
Posts: 27,873
noted, will probably need a bit of re-working to try to get it to do that as it's not something that is currently tracked (only the current values are).
DrO is offline   Reply With Quote
Old 12th May 2018, 07:09   #14
REY619
Junior Member
 
Join Date: Feb 2010
Posts: 27
Bumping this to know was this implemented? I am in the same situation and need to fetch XML data that is behind the admin password.
Any help would be appreciated.
Thanks.
REY619 is offline   Reply With Quote
Reply
Go Back   Winamp & SHOUTcast Forums > SHOUTcast > SHOUTcast Technical Support

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump