Hi everyone,
I'd like to request help regarding a special switch, which would change the
metadata in case an input.http comes live. Currently we're using the
input.http to make live DJ streams connect over the basic playlist that is
playing. What I'm aiming for is that i have vdj = input.http("
http://localhost:8088/") which is a shoutcast stream, so when this comes
live and the stream switches I want the metadata to say some specific text,
not the metadata from the songs played on the shoutcast server.
The switch:
> radio = fallback(track_sensitive=false, [vdj,radio])
Also would it be possible to have metadata update with a "Special text -
Artist - Title" ? If anyone could help me script this would be great.
Here's where I currently am and figured out. We already have a specific
metadata, with the following code, but I'm not sure how I need to change it
for the new purpose:
def map( m )
> # Get filename from file path
> dollar = string.extract(pattern="([^/]*)\..*$", m["filename"])
> filename = dollar["1"]
> log( label="radioclave", level=5, "artist="^m["artist"] )
> log( label="radioclave", level=5, "album="^m["album"] )
> log( label="radioclave", level=5, "title="^m["title"] )
> log( label="radioclave", level=5, "filename="^filename )
> # Construct stream metadata from available id3 tags
> if ( m["title"] == "" ) then
> [ ("artist", "We have no clue what the puck we're playing.."),
> ("title", filename) ]
> else
> if ( m["album"] != "" ) then
> if ( m["artist"] != "" ) then
> if int_of_string( m["year"], default = 0 ) > 0 then
> [ ("title", m["album"]^" ("^m["year"]^") - "^m["title"] ) ]
> else
> [ ("title", m["album"]^" - "^m["title"] ) ]
> end
> else
> [ ("artist", "We have no clue what we're playing.."),
> ("title", m["album"]^" - "^m["title"] ) ]
> end
> else
> [ ("title", m["title"] ) ]
> end
> end
> end
I'm guessing if I define something similar it might work? But where would I
need to call the switch? After the fallback part? Like:
vdj = map_metadata( VDJmap, radio )
?
Thank you in advance for the help.
Best regards,
*Ákos Veres*
_____________________________________________
http://akos.me - A little about me.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users