X-Git-Url: http://git.code-monkey.de/?p=euphoria.git;a=blobdiff_plain;f=data%2Fthemes%2Fiio%2Fiio.edc;fp=data%2Fthemes%2Fiio%2Fiio.edc;h=9e46f7c3dc0ca9cf66dbb159f3d829a953ea2107;hp=31862cd6f94d81902e87b30ea251ead5d24be98e;hb=dd2beb9c6c0688714643fd0c08fecc17a1e32a74;hpb=12d14c472fdb872efc6d657852346ee7ee8092b1 diff --git a/data/themes/iio/iio.edc b/data/themes/iio/iio.edc index 31862cd..9e46f7c 100644 --- a/data/themes/iio/iio.edc +++ b/data/themes/iio/iio.edc @@ -31,19 +31,30 @@ { 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); + } } } }