Thank you for your donation!


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


Favourites does not resolve station name.
#1
Hi Tim,  when saving a playing webstream to Favourites the station name becomes 'Radio Station"....for every station. ;-)

On a normal playlist they are correctly identified by name but once saved into Favourites only by address and generic 'Radio Station'

So on subsequently searching in Favourites it is nigh on impossible to find the saved station.
----------
bob
Reply
#2
Hi Bob,

Its same in normal playlist. Have a look at the Default Playlist in Browse panel.

On our TODO list we have
- Display station name in saved playlist if row exists in cfg_radio

Just a matter of when we get to it but for sure it will be in the release 4.4 time frame or possibly in a 4.3 update :-)
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
Hey Bob,

This turned out to be a trivial modification :-) If you want to test it yourself, and I know you are of the hacking type, just follow the instructions below.

1. sudo nano /var/www/js/playerlib.js
2. ctrl-w (search) for the string "function formatBrowseData"
3. ctrl-v (page down once)

The following code block should be visible and if not then cursor down until its in view.

Code:
            // different icon for song file vs radio station in saved playlist
            // click on item line for menu
            else {
                if (data[i].file.substr(0,4) == 'http') {
                    output += '"><div class="db-icon db-song db-browse db-action"><a class="btn" href="#notarget" title="Click for menu" data-toggle="context" data-target="#context-menu-savedpl-item" style="width:100vw;height:2em;"><i class="fas fa-microphone sx db-browse" style="float:left;"></i></a></div><div class="db-entry db-song db-browse">';
                    itemType = 'Radio station';
                } else {
                    output += '"><div class="db-icon db-song db-browse db-action"><a class="btn" href="#notarget" title="Click for menu" data-toggle="context" data-target="#context-menu-savedpl-item" style="width:100vw;height:2em;"><i class="fas fa-music sx db-browse" style="float:left;"></i></a></div><div class="db-entry db-song db-browse">';
                    itemType = 'Song file';
                }
            }


4. Replace this line
Code:
itemType = 'Radio station';

5. With this line

Code:
itemType = typeof(RADIO.json[data[i].file]['name']) === 'undefined' ? 'Radio station' : RADIO.json[data[i].file]['name'];

6. Ctrl-x, y <return> to save the file

7. Refresh Browser and open one of the saved playlists. You should see the station name.

-Tim
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply


Forum Jump: