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 5e05bb8ae1ff8ce38f72b82a69435007bccbb88b
Author: politebot <[email protected]>
AuthorDate: Sun Oct 19 13:48:03 2025 -0500
Show more station metadata in the search results
---
src/appdata.h | 5 +++++
src/http.c | 40 +++++++++++++++++++++++++++++++++++++
src/station_list.c | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
3 files changed, 102 insertions(+), 1 deletion(-)
diff --git a/src/appdata.h b/src/appdata.h
index 71b1f32..bcc4c48 100644
--- a/src/appdata.h
+++ b/src/appdata.h
@@ -10,6 +10,11 @@ typedef struct _Station
const char *url;
const char *favicon;
const char *stationuuid;
+ const char *country;
+ const char *language;
+ const char *codec;
+ const char *tags;
+ int bitrate;
Eina_Bool favorite;
} Station;
diff --git a/src/http.c b/src/http.c
index dc0dd33..7a90665 100644
--- a/src/http.c
+++ b/src/http.c
@@ -312,6 +312,10 @@ _handle_station_list_complete(Ecore_Con_Event_Url_Complete *ev)
eina_stringshare_del(st->url);
eina_stringshare_del(st->favicon);
eina_stringshare_del(st->stationuuid);
+ eina_stringshare_del(st->country);
+ eina_stringshare_del(st->language);
+ eina_stringshare_del(st->codec);
+ eina_stringshare_del(st->tags);
free(st);
}
ad->stations = NULL;
@@ -350,6 +354,42 @@ _handle_station_list_complete(Ecore_Con_Event_Url_Complete *ev)
st->stationuuid = eina_stringshare_add((const char *)prop);
xmlFree(prop);
}
+
+ prop = xmlGetProp(cur, (xmlChar *)"country");
+ if (prop)
+ {
+ st->country = eina_stringshare_add((const char *)prop);
+ xmlFree(prop);
+ }
+
+ prop = xmlGetProp(cur, (xmlChar *)"language");
+ if (prop)
+ {
+ st->language = eina_stringshare_add((const char *)prop);
+ xmlFree(prop);
+ }
+
+ prop = xmlGetProp(cur, (xmlChar *)"codec");
+ if (prop)
+ {
+ st->codec = eina_stringshare_add((const char *)prop);
+ xmlFree(prop);
+ }
+
+ prop = xmlGetProp(cur, (xmlChar *)"tags");
+ if (prop)
+ {
+ st->tags = eina_stringshare_add((const char *)prop);
+ xmlFree(prop);
+ }
+
+ prop = xmlGetProp(cur, (xmlChar *)"bitrate");
+ if (prop)
+ {
+ st->bitrate = atoi((const char *)prop);
+ xmlFree(prop);
+ }
+
ad->stations = eina_list_append(ad->stations, st);
}
diff --git a/src/station_list.c b/src/station_list.c
index e104f04..f004495 100644
--- a/src/station_list.c
+++ b/src/station_list.c
@@ -12,7 +12,63 @@ static char *
_gl_text_get(void *data, Evas_Object *obj, const char *part)
{
Station *st = data;
- return strdup(st->name);
+
+ if (!strcmp(part, "elm.text"))
+ {
+ // Create a detailed text showing station name and metadata
+ char detailed_text[512] = {0};
+ snprintf(detailed_text, sizeof(detailed_text), "%s", st->name ? st->name : "");
+
+ // Add bitrate, codec, country as additional info
+ char info[256] = "";
+ Eina_Bool first_item = EINA_TRUE;
+
+ if (st->bitrate > 0)
+ {
+ char bitrate_str[32];
+ snprintf(bitrate_str, sizeof(bitrate_str), "%d kbps", st->bitrate);
+ strcat(info, bitrate_str);
+ first_item = EINA_FALSE;
+ }
+
+ if (st->codec && st->codec[0])
+ {
+ if (!first_item) strcat(info, " | ");
+ strcat(info, st->codec);
+ first_item = EINA_FALSE;
+ }
+
+ if (st->country && st->country[0])
+ {
+ if (!first_item) strcat(info, " | ");
+ strcat(info, st->country);
+ first_item = EINA_FALSE;
+ }
+
+ if (st->language && st->language[0])
+ {
+ if (!first_item) strcat(info, " | ");
+ strcat(info, st->language);
+ first_item = EINA_FALSE;
+ }
+
+ if (info[0])
+ {
+ strncat(detailed_text, " • ", sizeof(detailed_text) - strlen(detailed_text) - 1);
+ strncat(detailed_text, info, sizeof(detailed_text) - strlen(detailed_text) - 1);
+ }
+
+ // Add tags on another line if available
+ if (st->tags && st->tags[0])
+ {
+ strncat(detailed_text, " • ", sizeof(detailed_text) - strlen(detailed_text) - 1);
+ strncat(detailed_text, st->tags, sizeof(detailed_text) - strlen(detailed_text) - 1);
+ }
+
+ return strdup(detailed_text);
+ }
+
+ return NULL;
}
static Evas_Object *
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.