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 

Metatag/data update via Python

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



Joined: 14 Nov 2009
Posts: 32

PostPosted: Wed Jul 23, 2014 1:50 am    Post subject: Metatag/data update via Python Reply with quote

I use darkce as my encoder for my setup, thus it has no means to send the data needed for my particular streams for the metadata..just FYI, it is not song data, so it changes quite frequently.....

So I have a python program which will WORK, but ONLY AS THE ADMIN user.

Other programs non python, non darkice, can do this and they don't have the admin user info...so what gives.

Icecast 2.3.3

Example:

Code:



metadata ="This is a test for alerts!"

urlBase = "http://" + icecastServerAddress + "/admin/metadata?mount=/" + icecastMountpoint + "&mode=updinfo&song="

metadataFormatted = metadata.replace(" ","+") #add "+" instead of " " for icecast2
requestToSend = (urlBase) +(metadataFormatted)
r = requests.get((requestToSend), auth=(icecastUser,icecastPass))
status = r.status_code


if status == 200:
    print "Icecast Update OK"
else:
    print "Icecast Update Error", status
           


IF I USE ADMIN credentials WORKS

IF I use "source" as the user name and the source password I get A SUCCESS ON UPDATE.. BUT the UPDATE NEVER SHOWS!

Code:


Using the admin crendetials:
$ ./metaUP.py
Wed Jul 23 01:42:24 2014
Icecast Update OK

Using "source" as username and the source password:

@marilyn:~/caster/tags$ ./metaUP.py
Wed Jul 23 01:42:49 2014
Icecast Update OK

BUT THE TAGS NEVER CHANGE EVEN WITH DIFFERENT DATA.
@marilyn:~/caster/tags$


For my feeds that is fine if they have the ADMIN crendtials, as I know them.... Razz BUT I am not giving that to everyone just to get metadata...
Back to top
View user's profile Send private message
dm8tbr



Joined: 09 Feb 2013
Posts: 45
Location: icecast.org

PostPosted: Sun Sep 28, 2014 12:55 pm    Post subject: security feature Reply with quote

This is due to a security feature that was introduced in Icecast 2.3.3.

We had frequent problem reports from users that a not connected source client would try to connect to an already busy mount point, fail to connect, but still update the metadata. Both the connected and the not connected client would fight over the metadata. This is brokenness mainly associated with streaming legacy codecs like mp3.

We have thus limited metadata updates to the same originating IP as the source client connection. This will cover most of the above mentioned problem.

So this is perfectly intended behaviour. Metadata should be only ever updated by the source client. Doing this through other means can lead to problems and is not supported.
Back to top
View user's profile Send private message 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