Skip to content

Commit

Permalink
Upd: Rename playlistDetails to gotoPlaylist
Browse files Browse the repository at this point in the history
  • Loading branch information
jcorporation committed Sep 4, 2024
1 parent c4280bd commit 3886c98
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
1 change: 1 addition & 0 deletions docs/scripting/widges.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@ Add the `data-href` attribute to the html element. The content must be a valid s
| FUNCTION | OPTIONS | DESCRIPTION |
| -------- | ------- | ----------- |
| `gotoAlbum` | AlbumId | Shows the album with given id. |
| `gotoPlaylist` | uri | Playlist name. |
| `songDetails` | uri | Song URI |
2 changes: 1 addition & 1 deletion htdocs/js/clickActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ function clickPlaylist(uri, event) {
case 'insertPlayAfterCurrent': return insertPlayAfterCurrentQueue('plist', [uri]);
case 'replace': return replaceQueue('plist', [uri]);
case 'replacePlay': return replacePlayQueue('plist', [uri]);
case 'view': return playlistDetails(uri);
case 'view': return gotoPlaylist(uri);
case 'context': return showContextMenu(event);
default: logError('Invalid action: ' + settings.webuiSettings.clickPlaylist);
}
Expand Down
6 changes: 3 additions & 3 deletions htdocs/js/contextMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ function addMenuItemsPlaylistActions(dataNode, contextMenuBody, type, uri, name)
{
if (isMPDplaylist(uri) === true) {
addDivider(contextMenuBody);
addMenuItem(contextMenuBody, {"cmd": "playlistDetails", "options": [uri]}, 'View playlist');
addMenuItem(contextMenuBody, {"cmd": "gotoPlaylist", "options": [uri]}, 'View playlist');
}
else {
addMenuItem(contextMenuBody, {"cmd": "gotoFilesystem", "options": [uri, "plist"]}, 'View playlist');
Expand Down Expand Up @@ -599,10 +599,10 @@ function createMenuLists(target, contextMenuTitle, contextMenuBody) {
addMenuItemsPlaylistActions(dataNode, contextMenuBody, type, uri, name);
addDivider(contextMenuBody);
if (type === 'smartpls') {
addMenuItem(contextMenuBody, {"cmd": "playlistDetails", "options": [uri]}, 'View playlist');
addMenuItem(contextMenuBody, {"cmd": "gotoPlaylist", "options": [uri]}, 'View playlist');
}
else {
addMenuItem(contextMenuBody, {"cmd": "playlistDetails", "options": [uri]}, 'Edit playlist');
addMenuItem(contextMenuBody, {"cmd": "gotoPlaylist", "options": [uri]}, 'Edit playlist');
}
addMenuItem(contextMenuBody, {"cmd": "showRenamePlaylist", "options": [uri]}, 'Rename playlist');
addMenuItem(contextMenuBody, {"cmd": "showCopyPlaylist", "options": [[uri]]}, 'Copy playlist');
Expand Down
2 changes: 1 addition & 1 deletion htdocs/js/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ function homeIconGoto(type, options) {
break;
case 'plist':
case 'smartpls':
playlistDetails(options[0]);
gotoPlaylist(options[0]);
break;
default:
logError('Invalid type: ' + type);
Expand Down
8 changes: 6 additions & 2 deletions htdocs/js/viewBrowsePlaylist.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ function viewPlaylistListListClickHandler(event, target) {
}
}

function gotoPlaylist(uri) {

}

/**
* Click event handler for playlist detail list
* @param {MouseEvent} event click event
Expand Down Expand Up @@ -352,8 +356,8 @@ function currentPlaylistEnumerate() {
* @returns {void}
*/
//eslint-disable-next-line no-unused-vars
function playlistDetails(uri) {
setUpdateViewId('BrowsePlaylistListList');
function gotoPlaylist(uri) {
setUpdateViewId('BrowsePlaylistDetailList');
appGoto('Browse', 'Playlist', 'Detail', 0, undefined, undefined, {'tag': '', 'desc': false}, uri, '');
}

Expand Down

0 comments on commit 3886c98

Please sign in to comment.