Icecast Streaming Media Server Forum Index Icecast Streaming Media Server
Icecast is a Xiph Foundation Project
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Metadata Warning

 
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server
View previous topic :: View next topic  
Author Message
Murrawhip



Joined: 21 Dec 2010
Posts: 58

PostPosted: Thu Dec 08, 2011 5:59 am    Post subject: Metadata Warning Reply with quote

Hi,

I update my metadata on Icecast manually through a PHP script.
Lately on one of my stations I've been receiving this:


[2011-12-07 21:57:02] INFO admin/command_metadata Metadata song on /CKBX set to "Jason Blaine - Flirtin' With Me"
[2011-12-07 21:57:02] WARN Invalid expression
[2011-12-07 21:57:02] WARN runtime error
[2011-12-07 21:57:02] WARN Evaluating user parameter song failed


Should I be escaping that apostrophe maybe?
Back to top
View user's profile Send private message Visit poster's website
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Thu Dec 08, 2011 6:21 pm    Post subject: Reply with quote

I suspect so. Those particular warning messages are coming from libxml2/libxslt.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Murrawhip



Joined: 21 Dec 2010
Posts: 58

PostPosted: Fri Dec 09, 2011 2:10 pm    Post subject: Reply with quote

So now I'm confused.
I'm using a script that a lot of people seem to use for updating metadata with PHP.

It encodes with rawurlencode, though I've seen a couple people use urlencode instead.

Code:

$songinfo = $artist . " - " . $title;
   $currentsonguri = rawurlencode($songinfo);
   fwrite($icesocket,"GET /admin/metadata.xsl?song=".$currentsonguri."&mount=/" . $row1[2] . "&mode=updinfo HTTP/1.0\n");
etc.


The error only occurs when there's an apostrophe in $songinfo. Both urlencode and rawurlencode change apostrophes into %27. Any clue on what I should be doing differently?
Back to top
View user's profile Send private message Visit poster's website
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Fri Dec 09, 2011 7:38 pm    Post subject: Reply with quote

I think it's the xsl translation that is throwing that up, drop the .xsl from the request unless you are really parsing the response

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Fri Dec 09, 2011 8:00 pm    Post subject: Reply with quote

confirmed, internally the args are passed for xsl translation but xslt is using the quotes in a reserved manner. The metadata update should be occurring, it's just that the xsl response is cut short because of the way parameters are applied to the xsl when a ' is in there. I have a fix for that ready to go in the update.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
subRebel style by ktauber