This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch main
in repository eradio.

View the commit online.

commit 803febb0b113a3d1e16833707184d8d694a0af75
Author: politebot <[email protected]>
AuthorDate: Sat Oct 11 08:46:20 2025 -0500

    Add status bar with stream metadata
---
 src/appdata.h      |  1 +
 src/radio_player.c | 13 +++++++++++++
 src/ui.c           |  8 ++++++++
 3 files changed, 22 insertions(+)

diff --git a/src/appdata.h b/src/appdata.h
index 466cfe7..a14ab2b 100644
--- a/src/appdata.h
+++ b/src/appdata.h
@@ -28,6 +28,7 @@ typedef struct _AppData
    Evas_Object *server_hoversel;
    Evas_Object *play_pause_btn;
    Evas_Object *stop_btn;
+   Evas_Object *statusbar;
    Evas_Object *search_btn;
    Evas_Object *load_more_btn;
    Evas_Object *search_bar;
diff --git a/src/radio_player.c b/src/radio_player.c
index e6fa356..73bd2e1 100644
--- a/src/radio_player.c
+++ b/src/radio_player.c
@@ -1,9 +1,22 @@
 #include "radio_player.h"
 
+static void
+_title_changed_cb(void *data, Evas_Object *obj, void *event_info)
+{
+   AppData *ad = data;
+   const char *title = emotion_object_title_get(obj);
+   if (title)
+     {
+        printf("Station metadata: %s\n", title);
+        elm_object_text_set(ad->statusbar, title);
+     }
+}
+
 void
 radio_player_init(AppData *ad)
 {
    ad->emotion = emotion_object_add(ad->win);
+   evas_object_smart_callback_add(ad->emotion, "title_change", _title_changed_cb, ad);
 }
 
 void
diff --git a/src/ui.c b/src/ui.c
index 1162006..4f34c5e 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -187,6 +187,14 @@ ui_create(AppData *ad)
    elm_box_pack_end(box, controls_hbox);
    evas_object_show(controls_hbox);
 
+   ad->statusbar = elm_label_add(ad->win);
+   elm_object_text_set(ad->statusbar, "Now Playing: ");
+   elm_object_style_set(ad->statusbar, "marquee");
+   evas_object_size_hint_weight_set(ad->statusbar, EVAS_HINT_EXPAND, 0);
+   evas_object_size_hint_align_set(ad->statusbar, EVAS_HINT_FILL, 0.5);
+   elm_box_pack_end(box, ad->statusbar);
+   evas_object_show(ad->statusbar);
+
    Evas_Object *ic;
 
    ad->play_pause_btn = elm_button_add(ad->win);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to