Thank you for your donation!


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


about cmd=playitem_next
#9
Yes thats the file for REST API commands.

As far as "album" goes you need to think about the group of tracks that makes up the album. For example in Tag or Album view, playing an album actually submits an array containing the album tracks to the Queue.

Have a look in scripts-library.js "play_group" and "Play_group_next"

Code:
// Click coverart context menu item
$('#context-menu-lib-album a').click(function(e) {
    UI.dbEntry[0] = $.isNumeric(UI.dbEntry[0]) ? UI.dbEntry[0] : 0;

    if (!$('.album-view-button').hasClass('active')) {
        $('#lib-song-' + (UI.dbEntry[0] + 1).toString()).removeClass('active');
        $('img.lib-coverart, #lib-coverart-meta-area').removeClass('active');
    }

   // Order the files according the the order of the albums
   var files = [];
   for (i = 0; i < filteredAlbums.length; i++) {
       for (j = 0; j < filteredSongs.length; j++) {
           if (filteredSongs[j].key == filteredAlbums[i].key) {
               files.push(filteredSongs[j].file);
           }
       }
   }
    //console.log('files= ' + JSON.stringify(files));

   switch ($(this).data('cmd')) {
       case 'add_group':
       case 'add_group_next':
           sendQueueCmd($(this).data('cmd'), files);
           notify(NOTIFY_TITLE_INFO, $(this).data('cmd'), NOTIFY_DURATION_SHORT);
           break;
       case 'play_group':
       case 'play_group_next':
              sendQueueCmd($(this).data('cmd'), files);
             break;

Folders on the other hand can be added to the Queue via the MPD "add" command and all the files in the folder will be automatically added. Playlists can be added to the Queue via the MPD "load" command.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply


Messages In This Thread
about cmd=playitem_next - by Phil35 - 02-28-2025, 05:33 PM
RE: about cmd=playitem_next - by Tim Curtis - 02-28-2025, 09:15 PM
RE: about cmd=playitem_next - by Nutul - 02-28-2025, 11:20 PM
RE: about cmd=playitem_next - by Phil35 - 03-01-2025, 12:52 PM
RE: about cmd=playitem_next - by Tim Curtis - 03-01-2025, 01:18 PM
RE: about cmd=playitem_next - by Phil35 - 03-01-2025, 07:45 PM
RE: about cmd=playitem_next - by Tim Curtis - 03-01-2025, 08:20 PM
RE: about cmd=playitem_next - by Phil35 - 03-02-2025, 07:49 PM
RE: about cmd=playitem_next - by Tim Curtis - 03-02-2025, 09:24 PM

Forum Jump: