10-01-2018, 06:51 PM
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.
4. Replace this line
5. With this line
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
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