Closed PanderMusubi closed 6 years ago
You probably also want to wrap around, so say I prefer fast but only highest exists it should still work.
Or some fixed schemes such as:
highest -> fast -> slow
fast -> highest -> slow
slow -> highest -> fast
and
aacp -> aac -> mp3
aac -> aacp -> mp3
mp3 -> aac -> aacp
This is graceful degradation by upgrading first and then downgrading.
Reason for activating this scheme would be any kind of error, time out, non-existing url or whatever. If all options are exhausted, the next in the playlist should be played. I think, first all sorts of quality should be exhausted, then the next in line of encoding, starting out with the original set quality.
So if you have aacp&highest and nothing is available, the path should be aacp&fast, aacp&slow, aac&highest, aac&fast, aac&slow, mp3&highest, mp3&fast, mp3&slow and then next in playlist with aacp&highest, etc. Is that OK?
Sorry quality goes over format so the order would be aacp&highest -> aac&highest -> mp3&highest, aacp&fast, aac&fast, mp3&fast, ...
For Clementine I had to implement a minimal version of this as the support for SomaFM there only lists MP3 fast quality. See also https://github.com/clementine-player/Clementine/pull/5243 and perhaps someone would like to have a look there on how to extend support to AAC and extend the number of channels for SomaFM.
I don't think that making the extension change the configuration itself is a good idea.
At the moment the configuration sets encoding and quality to a fixed value. However, SomaFM and Intergalactic FM do not support all combinations. The implementation should be that what is set is a desirable value, but if it is not found, via graceful degradation, another setting is tried and used.
For encoding, I would like to propose aacp -> aac -> mp3 and for quality highest -> fast -> slow. The default config has to change to aacp and highest.
Implementing this would expose more channels per online radio station and reduce confusion on the side of the user.