Hi Lee,

2018-03-15 18:16 GMT-05:00 Lee Morgan <[email protected]>:
>
> Currently when a live DJ connects to harbour via Traktor I set the
metadata like this:
>
>
> def new_meta(m) =
>   [("title","DJ Blah - Live-On-Air - Techno")]
> end
>
> When Traktor connects liquid soap shows this information:
>
> 2018/03/15 23:05:42 [harbor:4] Header: ice-name, value: Blah.
> 2018/03/15 23:05:42 [harbor:4] Header: ice-url, value:  .
> 2018/03/15 23:05:42 [harbor:4] Header: ice-genre, value: Techno.
> 2018/03/15 23:05:42 [harbor:4] Header: ice-description, value:  .
> 2018/03/15 23:05:42 [harbor:4] Header: ice-bitrate, value: Quality 0.
> 2018/03/15 23:05:42 [harbor:4] Header: ice-private, value: 0.
> 2018/03/15 23:05:42 [harbor:4] Header: ice-public, value: 1.
> 2018/03/15 23:05:42 [harbor:4] Header: ice-audio-info, value:
ice-samplerate=44100;ice-bitrate=Quality 0;ice-channels=2.
>
>
> How can I grab ice-name for DJ and ice-genre for Genre values in
liquidsoap so I can use them In my code above?

I believe that these headers should be passed to the on_connect callback in
the input.harbor operator so you should be able to do something on these
lines:

genre_ref = ref ""

def on_connect(m) =
  genre_ref := m["ice-genre"]
end

s = input.harbor(on_connect=on_connect, ..)

Does that make sense?

Romain
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to