sailfishos-applications / flowplayer

Music Player for SailfishOS
https://openrepos.net/content/olf/flowplayer
Other
6 stars 7 forks source link

[Bug] Can't sort album tracks by track number, only by track title #63

Closed tuplasuhveli closed 9 months ago

tuplasuhveli commented 9 months ago

SailfishOS VERSION: 4.5.0.24
HARDWARE: Sony Xperia 10 III
FlowPlayer VERSION: 0.3.2

BUG DESCRIPTION

Songs in albums are sorted by title instead of by track number.

flowplayer1 flowplayer2

STEPS TO REPRODUCE

  1. Have music in the location set in the Flowplayer settings
  2. Update the music collection
  3. Set "Sort songs by" to "Track number"
  4. Open an album
  5. Have songs sorted by title instead of by track number

ADDITIONAL INFORMATION

I tried a bunch of different albums with two differents formats: MP3 and FLAC. I inspected their metadata and all of them have track numbers included. Some of the albums I have ripped by myself, but some of them I have downloaded from different vendors, such as Bandcamp. Nevertheless, the behaviour was always the same. Other music players, namely cmus and quod libet, are able to show the tracks in their correct order.

Here are the logs, when launching Flowplayer:

[defaultuser@Xperia10III ~]$ flowplayer
[D] unknown:0 - Getting language from locale: "fi_FI"
[D] unknown:0 - Using Wayland-EGL
library "libutils.so" not found
library "libcutils.so" not found
library "libhardware.so" not found
library "android.hardware.graphics.mapper@2.0.so" not found
library "android.hardware.graphics.mapper@2.1.so" not found
library "android.hardware.graphics.mapper@3.0.so" not found
library "android.hardware.graphics.mapper@4.0.so" not found
library "libc++.so" not found
library "libhidlbase.so" not found
library "libgralloctypes.so" not found
library "android.hardware.graphics.common@1.2.so" not found
library "libion.so" not found
library "libz.so" not found
library "libhidlmemory.so" not found
library "android.hidl.memory@1.0.so" not found
library "vendor.qti.qspmhal@1.0.so" not found
[D] unknown:0 - Loading preset:  ""
[W] unknown:284 - file:///usr/share/flowplayer/qml/flowplayer.qml:284:5: QML DockedPanel: Binding loop detected for property "visibleSize"
[D] onStatusChanged:19 - Loaded: false - main: false
[D] unknown:0 - DATABASES:  ""
[D] unknown:0 - Database:  "/home/defaultuser/.config/sailfishos-applications/flowplayer/flowplayer.db"
[D] startTimers:95 - Starting timers
[W] unknown:89 - file:///usr/share/flowplayer/qml/pages/CoverArtList.qml:89:5: QML Image: Cannot open: file:///home/defaultuser/.cache/media-art/album-d41d8cd98f00b204e9800998ecf8427e-d41d8cd98f00b204e9800998ecf8427e.jpeg
[W] unknown:89 - file:///usr/share/flowplayer/qml/pages/CoverArtList.qml:89:5: QML Image: Cannot open: file:///home/defaultuser/.cache/media-art/album-d41d8cd98f00b204e9800998ecf8427e-d41d8cd98f00b204e9800998ecf8427e.jpeg
[W] unknown:43 - file:///usr/share/flowplayer/qml/pages/CoverPage.qml:43:15: Unable to assign [undefined] to QString
[W] unknown:56 - file:///usr/share/flowplayer/qml/pages/CoverPage.qml:56:15: Unable to assign [undefined] to QString
[W] unknown:433 - file:///usr/share/flowplayer/qml/pages/NowPlaying.qml:433:23: Unable to assign [undefined] to QString
[W] unknown:444 - file:///usr/share/flowplayer/qml/pages/NowPlaying.qml:444:23: Unable to assign [undefined] to QString
[W] unknown:454 - file:///usr/share/flowplayer/qml/pages/NowPlaying.qml:454:23: Unable to assign [undefined] to QString
[W] unknown:175 - file:///usr/share/flowplayer/qml/pages/Lyrics.qml:175:23: Unable to assign [undefined] to QString
[W] unknown:192 - file:///usr/share/flowplayer/qml/pages/Lyrics.qml:192:20: Unable to assign [undefined] to double
[D] startTimers:95 - Starting timers
[D] unknown:0 - Acquired... Playing

and here are the logs, when opening the album in question, Bruce Springsteen's Nebraska:

[D] unknown:0 - LOADING MUSIC DATABASE FOR ALBUMS
[D] unknown:0 - DONE!  17
[D] unknown:0 - LISTO!
[D] onClicked:271 - Pushing attached:
[D] stopTimers:105 - Stopping timers
[D] onStatusChanged:17 - CURRENT: albums
[D] onStatusChanged:24 - Loading list: Bruce Springsteen - Nebraska - 1
[D] expression for onAlbumLoaded:58 - Album loaded. Time: 2443

EDIT: Edited the title to better match the issue. EDIT2: Typo.

dcaliste commented 9 months ago

I think it's a side effect of issue #64 and it should be fixed by #65. I noticed the same behaviour before applying @flypig's patch.

Olf0 commented 9 months ago

@tuplasuhveli, thank you for the well documented and nicely illustrated bug report.

@tuplasuhveli & @dcaliste, is this issue fixed by FlowPlayer 0.3.3?

tuplasuhveli commented 9 months ago

@Olf0 The update fixed the issue, that's great!

Olf0 commented 9 months ago

Fixed by #65.