Bug 441485 - "next track" function bad
Summary: "next track" function bad
Status: RESOLVED FIXED
Alias: None
Product: Elisa
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: VHI normal
Target Milestone: ---
Assignee: Matthieu Gallien
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2021-08-24 15:56 UTC by empyreal
Modified: 2021-08-26 16:19 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 21.08.1


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description empyreal 2021-08-24 15:56:29 UTC
If you want jump to next track from the middle of current track it rewinds current track to the beginning. Then you need to press next track shortcut again and it works out.
Comment 1 Paul Worrall 2021-08-24 16:33:36 UTC
I can't reproduce this on Elisa 21.08.0, which version are you using?

Operating System: KDE neon 5.22
KDE Plasma Version: 5.22.4
KDE Frameworks Version: 5.85.0
Qt Version: 5.15.3
Kernel Version: 5.11.0-27-generic (64-bit)
Graphics Platform: X11
Processors: 2 × AMD A6-6400K APU with Radeon(tm) HD Graphics
Memory: 7.7 GiB of RAM
Graphics Processor: AMD CEDAR
Comment 2 empyreal 2021-08-24 16:47:27 UTC
Elisa Version 21.11.70

SOFTWARE/OS VERSIONS
Operating System: Kubuntu 21.04
KDE Plasma Version: 5.21.4
KDE Frameworks Version: 5.80.0
Qt Version: 5.15.2
Kernel Version: 5.11.0-31-generic
OS Type: 64-bit
Graphics Platform: X11
Comment 3 Nate Graham 2021-08-24 17:31:51 UTC
I can't reproduce this with git master, which you're using.

How are you invoking the next track function? Using the button in the UI, or the in-window shortcut (ctrl+right) or a global shortcut? Have you customized any shortcuts?
Comment 4 empyreal 2021-08-24 18:36:56 UTC
In 21.08 release we have vice versa situation. Previous track jumps to start of current track. Then you need to press shortcut again. I use ctrl+right ctrl+left.

But I will change them, cause such shortcuts are pain. I hate them more than playlist =)

I have problems building latest release again. I downloaded files three days ago and can build them. Downloaded today and error again. I am figuring out...
Comment 5 Nate Graham 2021-08-24 18:52:05 UTC
Let's stick to one topic at a time please. :) 

The previous track action is supposed to jump to the beginning of the current track. That is intentional. Are you saying that in 21.08, the next track action does the right thing, but with git master, it does the same thing as the previous track action?
Comment 6 empyreal 2021-08-24 19:01:43 UTC
21.08 Prev track jumps to start of current track. Next track ok

master Prev track ok. Next track jumps to start of current

Right thing:
Next track => switch next track
Prev track => switch prev track

If you want jump to start of current track, make another function.
Winamp has such thing as full stop of playback - C key. Stops playback and you start from start of current track.

I don't understand how such bugs go unnoticed.
People use only mouse or what?

Should I commit proposed shortcuts?
Comment 7 Nate Graham 2021-08-24 19:12:49 UTC
Please stick to one topic or else the bug report becomes an un-actionable mess.

The previous track action going to the beginning of the current track (as long as it is past the first 5 seconds) is intentional. This is not a bug, it is a feature. :) If you don't like it, you can submit another bug report, but don't bring that up here. In this bug report let's only discuss your issue of the next and previous actions apparently doing the opposite things.

I can't reproduce this bug. Please answer these questions:
- How are you invoking the next track function? Using the button in the UI, or the in-window shortcut (ctrl+right) or a global shortcut?
- Have you customized any shortcuts?
Comment 8 empyreal 2021-08-24 19:30:27 UTC
I do not use UI buttons. I use shortcuts.

Play any track. Rewind it to the middle.
Try ctrl+right and ctrl+left and check how they work.

On master release after pressing ctrl+right I jump to the beginning of current track instead of switching next one.
Comment 9 Nate Graham 2021-08-24 19:53:46 UTC
I cannot reproduce that issue. For me, with current git master, Ctrl+right goes to the next song.
Comment 10 Nate Graham 2021-08-24 19:54:29 UTC
Can you try this:

Go to the keyboard shortcuts window, click the "Defaults" button, close the window, close Elisa, and re-launch Elisa. Is it working now?
Comment 11 Paul Worrall 2021-08-24 19:59:16 UTC
I'm on Elisa 21.11.70 now and for me "Configure Keyboard Shortcuts" shows the reverse of what actually happens when you press Ctrl+Left/Right
Comment 12 Nate Graham 2021-08-24 20:00:23 UTC
So you can confirm empyreal's issue?
Comment 13 Paul Worrall 2021-08-24 20:08:20 UTC
With keyboard shortcuts set to default, Elisa responds as expected to Ctrl+Left and Ctrl+Right, i.e.:

Ctrl+Right: Next Track
Ctrl+Left : Start of current track and then previous track

But under "Configure Keyboard Shortcuts" they're listed the other way round. So yes there is a bug.
Comment 14 Nate Graham 2021-08-24 20:11:25 UTC
Ah, you're right, the names in the config window are indeed wrong. That should be fixable.
Comment 15 Nate Graham 2021-08-24 20:14:59 UTC
Apparently this has been wrong since

Author: nikunj goyal <nikunjgoyal31@gmail.com>
Date:   Mon Sep 21 08:27:33 2020 +0000

    Add keyboard navigation to move between tracks


I wonder how it ever worked, or why it works for me.
Comment 16 empyreal 2021-08-24 20:16:45 UTC
I have 3 days old master branch.

That's what happens with master branch now:
git clone --branch master 'https://github.com/empyrea1/elisa.git'
/elisa-master/install$ cmake ..
-- The CXX compiler identification is GNU 10.3.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:27 (find_package):
  Could not find a configuration file for package "ECM" that is compatible
  with requested version "5.85.0".
  The following configuration files were considered but not accepted:

    /usr/share/ECM/cmake/ECMConfig.cmake, version: 5.80.0
-- Configuring incomplete, errors occurred!
See also "/home/user/Downloads/elisa-master/install/CMakeFiles/CMakeOutput.log".

sudo apt install extra-cmake-modules
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
extra-cmake-modules is already the newest version (5.80.0-0ubuntu1).
The following packages were automatically installed and are no longer required:
  libmarisa0 libopencc-data libopencc1.1
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

Sorry. Can't check current master.

Defaults do not help. Restart do no help.
It's problem with controls, because on 21.08 opposite situation.
Comment 17 Nate Graham 2021-08-24 20:17:38 UTC
When I change the code to fix the obvious error, I can suddenly reproduce the bug, and the shortcuts become backwards. I wonder what in heaven's name is happening here!
Comment 18 Bug Janitor Service 2021-08-24 20:29:33 UTC
A possibly relevant merge request was started @ https://invent.kde.org/multimedia/elisa/-/merge_requests/278
Comment 19 empyreal 2021-08-24 22:32:10 UTC
ElisaMainWindow.qml

Action {
        shortcut: nextTrackAction.shortcut
        onTriggered: ElisaApplication.mediaPlayListProxyModel.skipPreviousTrack(ElisaApplication.audioPlayer.position)
    }

    Action {
        shortcut: previousTrackAction.shortcut
        onTriggered: ElisaApplication.mediaPlayListProxyModel.skipNextTrack(ElisaApplication.audioPlayer.position)
    }

Is this code ok?
I interchanged skipNextTrack and skipPreviousTrack.
After that next track works fine and previous track jumps to start of current track.
Is it really designed like that?
Comment 20 empyreal 2021-08-24 23:25:13 UTC
mediaplaylistproxymodel.cpp
removed
    if (position > mSeekToBeginningDelay) {
        Q_EMIT seek(0);
        return;
    }
mediaplaylistproxymodel.h 
removed 
    int mSeekToBeginningDelay = 2000;

And now controls work as they should.
Press Z - prev track, press B - next track
Press Arrow Left - rewind, press Arrow Right - forward
Comment 21 empyreal 2021-08-25 00:50:01 UTC
Managed to install latest master by changing
set(REQUIRED_KF5_VERSION "5.85.0")
to set(REQUIRED_KF5_VERSION "5.80.0")
in CMakeLists.txt
Comment 22 Nate Graham 2021-08-25 14:06:29 UTC
Thanks, that was the other half of the fix. I've updated https://invent.kde.org/multimedia/elisa/-/merge_requests/278.

Please do not mark the bug as RESOLVED until the fix is actually committed. The automated system will take care of this automatically, so there is nothing you need to do.
Comment 23 Nate Graham 2021-08-26 16:19:11 UTC
Git commit dd0e1a1c8caf9c8bb462ce2380ae496a43e3e7cc by Nate Graham.
Committed on 26/08/2021 at 16:18.
Pushed by ngraham into branch 'release/21.08'.

Fix in-app seek shortcuts

They were reversed!
FIXED-IN: 21.08.1

M  +2    -2    src/elisaapplication.cpp
M  +2    -2    src/qml/ElisaMainWindow.qml

https://invent.kde.org/multimedia/elisa/commit/dd0e1a1c8caf9c8bb462ce2380ae496a43e3e7cc