Thank you for your donation!


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


Previous button strange
#1
Hi all,

the previous button in the GUI behaves strange. For webradios it behaves as expected. But for local files it does set position in the track to 0 and pause. Is it what the prev button should do or is it a bug?
I think it should do the same as mpc prev for all tracks.
Reply
#2
Yes, thats how its supposed to behave. Click once to rewind the track then click again again to skip to previous track. Its similar to how iTunes Prev behaves except in moOde we do rewind/pause while in iTunes its rewind/play.

-Tim
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
Thanks for explanation. I understand.
Code:
$('#prev,#mprev').click(function() {
       if (parseInt(MPD.json['time']) > 0 && parseInt(sendMoodeCmd('GET', 'getmpdstatus')['elapsed']) > 0) {
            window.clearInterval(UI.knob);
            if ($('#mobile-toolbar').css('display') == 'flex') {
                refreshMTimer(0, 0, 'stop'); // reset to beginning of song and pause
            }
            else {
                refreshTimer(0, 0, 'stop');
            }
            sendMpdCmd('seek ' + MPD.json['song'] + ' 0');
            if (MPD.json['state'] != 'pause') {            
                sendMpdCmd('pause');
            }
       }
        else {
            sendMpdCmd('previous');
        }
    });

I think rewind/play is better. If you go back you must click twice to move to previous track and at the end click play.

Code:
if (parseInt(MPD.json['time']) > 3 && parseInt(sendMoodeCmd('GET', 'getmpdstatus')['elapsed']) > 3) {
If you click for example in 3seconds do sendMpdCmd('previous')
Then you dont need pause.
Reply
#4
iTunes is similar in that it requires 2 quick clicks to go to Prev track. This is where you end up when there is no dedicated Stop button. If you had a Stop btn in addition to the Play/Pause btn then Stop would rewind to 0, Play/Pause would act as-is and Prev would skip to previous track

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


Forum Jump: