-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Separate ICY parsing from visualisation #15
Comments
Hi Jo, thank you for looking this up. I agree that the ICY part is pretty messy indeed. There are lots of methods to make sure the right stuff is parsed to the custom communicators, and this can be improved. Although I myself don't see much use for displaying other ICY information except for the Regarding your proposal to switch to station-specific parsers, this will probably be a wontfix for the time being. The reason is that I'm happy with the way ICY messages are displayed at the moment and the amount of possible customisation. Also, as I mentioned, I don't see much use for using anything but the Of course, |
Ok, so that means issue #14 will be considered?
Yes, no doubt
Ok, will do if I feel like working on it :) |
Yes, just need to find a bit of spare time |
Some thoughts on how ICY messages are currently processed and displayed:
ICY Considerations
StreamTitle
to hold all the most relevant info: current song's title and current song's artist and name of the current radio programStreamTitle
field is typically alternated with (i) radio program info and (ii) current song's artist and titleSoftware Requirements
IMO,
yamlradio
should:kotnetcli
): some users want the song title to be colored bold, whereas others want an OS-specific notification, ...Current Situation
The station-specific communicators from issue #3 meet criterion (1) above, but fail criterion (2). They encapsulate station-specific behavior, while at the same time enforcing one specific layout (e.g. non-colored and non-capitalized plaintext on the stdout of a 80-char-wide terminal).
Proposed Solution
We need to separate station-specific ICY handling from common visualization concerns. On every arrival of ICY meta data,
yamlradio
should:StreamTitle
field to a station-specific parser (if any). This parser "knows what to expect from its station" and thus returns:kotnetcli
). If no custom parser was found in step (1) above, pass the raw ICY data via a dedicated method.Other fixed ICY meta data such as
icy-name
,icy-genre
andicy-description
(cf. issue #14 ) are updated when switching a radio station through a corresponding communicator method.The communicator interface might thus look like:
displaySongInfo(artist, title)
displayRadioShowInfo(title)
displayRawICYStreamTitle(streamTitle)
displayRadioInfo(icy-name, icy-genre, icy-description)
Final Thoughts
I think the above will improve end-user's experience, since a real added value over plain
mplayer
will be created. IMO, it won't blow up the code base too much (3th criterion above), since the existing station-specific communicator scheme can be transformed into a station-specific parser scheme.The text was updated successfully, but these errors were encountered: