Old 21st January 2015, 19:22   #1
DJAnonimo
Junior Member
 
Join Date: Jan 2015
Posts: 8
Shoutcastv2 - v1 protocol - Http title update

Hi,

I'm using a http query method to update now playing title.

code:
...admin.cgi?pass=passwd&mode=updinfo&song=Title


The problem is that I want to remove the title in some situations and also I want to set it to "-".
If I do
code:
&song=-
the server says that is invalid input. Before when I was using Edcast for streamit worked and it was setting the "-" as title.

I tried with URL encoding like
code:
&song=%2D
but no luck. But for example the char is accepted when not alone. For example
code:
&song=-TEST
works.

What do I need to query to get the title empty or "-" ?

Thank You in advance!
DJAnonimo is offline   Reply With Quote
Old 21st January 2015, 22:21   #2
DrO
 
Join Date: Sep 2003
Posts: 27,873
the DNAS version being used is...?

as the DNAS (depending on the version) will filter out title updates which are deemed to be nonsense in-order to provide better data to the listeners and also for what the SHOUTcast platform wants to provide via it's API.

also please check where you're posting, i've now moved this into the SHOUTcast sub-forum instead of where it was posted (in the Winamp sub-forum).
DrO is offline   Reply With Quote
Old 22nd January 2015, 05:11   #3
DJAnonimo
Junior Member
 
Join Date: Jan 2015
Posts: 8
Version: SHOUTcast DNAS/posix(linux x64) v2.4.2.16

Ok filtring data but there must be a way to clear the now playing filed...

Thank You
DJAnonimo is offline   Reply With Quote
Old 22nd January 2015, 10:34   #4
DrO
 
Join Date: Sep 2003
Posts: 27,873
you just need to use &song= and provide no value and that should then clear the title.
DrO is offline   Reply With Quote
Old 22nd January 2015, 13:49   #5
DJAnonimo
Junior Member
 
Join Date: Jan 2015
Posts: 8
DrO. Well it's logical but &song= do not have any effect.
DJAnonimo is offline   Reply With Quote
Old 22nd January 2015, 16:21   #6
DrO
 
Join Date: Sep 2003
Posts: 27,873
then there's probably a bug in the build (i've only tried it against a current internal build rather than build 167).

the only other option is to try sending an empty xml title update and see if that works e.g.
code:
&song=<?xml version="1.0" encoding="UTF-8" ?><metadata><TIT2></TIT2></metadata>
DrO is offline   Reply With Quote
Old 22nd January 2015, 21:24   #7
DJAnonimo
Junior Member
 
Join Date: Jan 2015
Posts: 8
XML method works, empty the title and also showing "-" char!

Thank You so much!
DJAnonimo is offline   Reply With Quote
Old 22nd January 2015, 21:35   #8
DrO
 
Join Date: Sep 2003
Posts: 27,873
well that's good that method works but that's a bug if that method is allowing through the dash only.

why are you even needing to set the title like that ? as it doesn't make for a very nice client experience (if anything, clearing the title is better as clients which can show the in-stream metadata tend to revert to the station name if there's no title).
DrO is offline   Reply With Quote
Old 22nd January 2015, 21:48   #9
DJAnonimo
Junior Member
 
Join Date: Jan 2015
Posts: 8
Well, I set the "-" sign to every track that is not a song, like ads and radio shows.
DJAnonimo is offline   Reply With Quote
Old 22nd January 2015, 21:56   #10
DrO
 
Join Date: Sep 2003
Posts: 27,873
personally i'd clear the song title completely for such cases then so any applicable clients will revert to the station name rather than just showing as a dash (which makes it look like something has gone wrong imho).
DrO is offline   Reply With Quote
Old 22nd January 2015, 22:01   #11
DJAnonimo
Junior Member
 
Join Date: Jan 2015
Posts: 8
Yea, I will change it, dont remember why I started this way. Maybe a problem with Edcast.
But I have another problem with "&" now. If there is a & it does not update, also tried with "%26" but nothing.
DJAnonimo is offline   Reply With Quote
Old 24th January 2015, 11:34   #12
DrO
 
Join Date: Sep 2003
Posts: 27,873
via which method - the plain text or the xml version ?
DrO is offline   Reply With Quote
Old 24th January 2015, 16:20   #13
DJAnonimo
Junior Member
 
Join Date: Jan 2015
Posts: 8
Via text pain works url encoding "%26".
With xml version is not possible to send it in any way.
DJAnonimo is offline   Reply With Quote
Old 24th January 2015, 20:21   #14
DrO
 
Join Date: Sep 2003
Posts: 27,873
it needs to be specified as &amp;

this is because it needs to be correctly encoded as xml treats < > & ' and " as special characters.
DrO is offline   Reply With Quote
Old 24th January 2015, 23:05   #15
DJAnonimo
Junior Member
 
Join Date: Jan 2015
Posts: 8
Good!

Thank you very much. Finally everything works well.
DJAnonimo is offline   Reply With Quote
Old 8th February 2015, 01:20   #16
DrO
 
Join Date: Sep 2003
Posts: 27,873
i've now replicated the non-xml title clearing issue and that has been fixed for the next DNAS release. there's a few other things that will also need to be fixed, mainly with the xml handling, but catching the non-xml title issue is at least sorted now.
DrO 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