summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2013-08-17 22:26:02 +0200
committerGravatar waker <wakeroid@gmail.com>2013-08-17 22:26:02 +0200
commit6f76b72db553b69048c7aaf562e1f2425d018d3c (patch)
treed47a0823b4164d3393e12ebfb1eb0cc94cf62132
parent610339056ac671a491371be8f02b40f72f8ee874 (diff)
update ctmapping in streamer when GUI changes it
-rw-r--r--plugins/gtkui/ctmapping.c1
-rw-r--r--streamer.c4
2 files changed, 5 insertions, 0 deletions
diff --git a/plugins/gtkui/ctmapping.c b/plugins/gtkui/ctmapping.c
index df149dbb..4bf3bb95 100644
--- a/plugins/gtkui/ctmapping.c
+++ b/plugins/gtkui/ctmapping.c
@@ -112,6 +112,7 @@ ctmapping_apply (void) {
}
}
deadbeef->conf_set_str ("network.ctmapping", mapstr);
+ deadbeef->sendmessage (DB_EV_CONFIGCHANGED, 0, 0, 0);
}
void
diff --git a/streamer.c b/streamer.c
index 57acce7d..1108466f 100644
--- a/streamer.c
+++ b/streamer.c
@@ -843,6 +843,7 @@ streamer_set_current (playItem_t *it) {
*sc = 0;
}
+ // FIXME: can be race condition if config changes during this
ctmap = streamer_ctmap;
while (ctmap) {
if (!strcmp (cct, ctmap->ct)) {
@@ -2333,6 +2334,9 @@ streamer_configchanged (void) {
formatchanged = 1;
streamer_reset (1);
}
+
+ // FIXME: only if changed (can compare strings)
+ ctmap_init ();
}
void