projects
/
euphoria.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
The MSG_ID_SET_SONGNAME message now handles streams.
[euphoria.git]
/
data
/
themes
/
winter
/
groups
/
euphoria.edc
diff --git
a/data/themes/winter/groups/euphoria.edc
b/data/themes/winter/groups/euphoria.edc
index 3a03583daebe0f1e75ca979b17ef9a70aa184c51..776562c165cf0c51241b910dc1006f5918ac1655 100644
(file)
--- a/
data/themes/winter/groups/euphoria.edc
+++ b/
data/themes/winter/groups/euphoria.edc
@@
-12,19
+12,30
@@
{
switch (id) {
case MSG_ID_SET_SONGNAME: {
{
switch (id) {
case MSG_ID_SET_SONGNAME: {
- new buf[128];
+ new buf[128]
, args_left
;
- if (type != MSG_STRING_SET || numargs () < 5)
- return;
+ args_left = numargs () - 2;
- getsarg (2, buf, 128);
- set_text (PART:"artist_name", buf);
+ /* if the one argument is a string, the current song
+ * is a stream, and the argument is the stream's name
+ * (channel name).
+ */
+ if (type == MSG_STRING && args_left == 1) {
+ getsarg (2, buf, 128);
+ set_text (PART:"artist_name", buf);
- getsarg (3, buf, 128);
- set_text (PART:"song_name", buf);
+ set_text (PART:"song_name", "");
+ set_text (PART:"album_name", "");
+ } else if (type == MSG_STRING_SET && args_left > 1) {
+ getsarg (2, buf, 128);
+ set_text (PART:"artist_name", buf);
- getsarg (4, buf, 128);
- set_text (PART:"album_name", buf);
+ getsarg (3, buf, 128);
+ set_text (PART:"song_name", buf);
+
+ getsarg (4, buf, 128);
+ set_text (PART:"album_name", buf);
+ }
}
}
}
}
}
}