Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Problem: Radio information does not display appropriately
#10
Okay, just understood the philosophy regarding the moOde audio radio stations. Agreeing with you that officially allowing the pls file as the playable URL in the station will end up as the break of the orientation therefore no further plan to make a support regarding the playlist file.

But at least, even though the provided playable URLs are not compatible with retrieving the cover and other metadata as designed in the system, can't we just add an exception handler if we cannot load up the metadata from the provided stream URL for managing this?

In my opinion, just adding the try-catch clause around the MPD json load part in the playerlib.js line 1044 would likely be the solution to this issue, as below:
Code:
if (MPD.json['artist'] == 'Radio station') {
               try {
                     var format = typeof(RADIO.json[MPD.json['file']]['format']) == 'undefined' ?
                           'Variable bps' : RADIO.json[MPD.json['file']]['format'];
                } catch (exception_if_we_cant_load_up_json_metadata_or_its_undefined) {
                     var format = 'Variable bps'
                }
                    var bitRate = MPD.json['bitrate'] ? format + ' ' + MPD.json['bitrate'] : format;
                       $('#extra-tags-display').text(bitRate + ' • ' + MPD.json['output']);
                    $('#countdown-sample-rate, #songsand-sample-rate, #ss-extra-metadata').text(bitRate);
} else { // ...


This might be not very accurate or even close to the problem since I do not really know about how things work in the system, but I'm pretty sure that this would be enough to present the basic idea.
Reply


Messages In This Thread
RE: Radio information does not display appropriately - by stevenoh0908 - 02-27-2024, 12:30 AM

Forum Jump: