CC-5226: Metadata isn't correct during playing
-fixed using "insert_metadata" and callbacks instead.
This commit is contained in:
parent
4e71345a61
commit
949ae9667b
|
@ -5,7 +5,8 @@ def notify(m)
|
|||
end
|
||||
|
||||
def notify_queue(m)
|
||||
queue_metadata := m
|
||||
f = !dynamic_metadata_callback
|
||||
ignore(f(m))
|
||||
notify(m)
|
||||
end
|
||||
|
||||
|
@ -31,10 +32,6 @@ def append_title(m) =
|
|||
end
|
||||
end
|
||||
|
||||
def queue_metadata_callback(m) =
|
||||
!queue_metadata
|
||||
end
|
||||
|
||||
def crossfade_airtime(s)
|
||||
#duration is automatically overwritten by metadata fields passed in
|
||||
#with audio
|
||||
|
|
|
@ -24,7 +24,7 @@ default_dj_fade = ref 0.
|
|||
station_name = ref ''
|
||||
show_name = ref ''
|
||||
|
||||
queue_metadata = ref []
|
||||
dynamic_metadata_callback = ref fun (s) -> begin () end
|
||||
|
||||
s1_connected = ref ''
|
||||
s2_connected = ref ''
|
||||
|
@ -72,7 +72,11 @@ create_source()
|
|||
|
||||
queue = add(!sources, normalize=false)
|
||||
|
||||
queue = map_metadata(update=false, queue_metadata_callback, queue)
|
||||
pair = insert_metadata(queue)
|
||||
f = fst(pair)
|
||||
queue = snd(pair)
|
||||
|
||||
dynamic_metadata_callback := f
|
||||
|
||||
output.dummy(fallible=true, queue)
|
||||
|
||||
|
|
Loading…
Reference in New Issue