rec91402
Joined: 14 Nov 2009 Posts: 32
|
Posted: Wed Jul 23, 2014 1:50 am Post subject: Metatag/data update via Python |
|
|
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.... BUT I am not giving that to everyone just to get metadata... |
|
dm8tbr
Joined: 09 Feb 2013 Posts: 45 Location: icecast.org
|
Posted: Sun Sep 28, 2014 12:55 pm Post subject: security feature |
|
|
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. |
|