[vlc-commits] [Git][videolan/vlc][master] 2 commits: qt: mlalbummodel: Sort Title by Alphabetical Order

Thomas Guillem (@tguillem) gitlab at videolan.org
Fri Mar 15 15:08:07 UTC 2024



Thomas Guillem pushed to branch master at VideoLAN / VLC


Commits:
f4a2f119 by darshan jain at 2024-03-15T14:33:00+00:00
qt: mlalbummodel: Sort Title by Alphabetical Order

The view in MusicArtistsAlbums was incorrectly trying to sort Albums
from an Artist by "Album" which would resort to sorting them by
releasing date.

This commit change the sorting order for "title" to "alphabetical",
matching it with how the roleToCriteria defines the order:

  case ALBUM_TITLE:
  return VLC_ML_SORTING_ALPHA;

 Fixes: #28505

- - - - -
5cd2d7ae by darshan jain at 2024-03-15T14:33:00+00:00
qt: MusicArtistsAlbums: add Release Year Sorting Criteria for Albums

By this commit Albums in MusicArtistsAlbums are now sort wrt Release
Year with no Default fallback sort criteria warnings.

- - - - -


2 changed files:

- modules/gui/qt/medialibrary/mlalbummodel.cpp
- modules/gui/qt/medialibrary/qml/MusicArtistsAlbums.qml


Changes:

=====================================
modules/gui/qt/medialibrary/mlalbummodel.cpp
=====================================
@@ -22,7 +22,7 @@
 
 QHash<QByteArray, vlc_ml_sorting_criteria_t> MLAlbumModel::M_names_to_criteria = {
     {"id", VLC_ML_SORTING_DEFAULT},
-    {"title", VLC_ML_SORTING_ALBUM},
+    {"title", VLC_ML_SORTING_ALPHA},
     {"release_year", VLC_ML_SORTING_RELEASEDATE},
     {"main_artist", VLC_ML_SORTING_ARTIST},
     //{"nb_tracks"},


=====================================
modules/gui/qt/medialibrary/qml/MusicArtistsAlbums.qml
=====================================
@@ -39,7 +39,8 @@ FocusScope {
     property int rightPadding: 0
 
     property var sortModel: [
-        { text: I18n.qtr("Alphabetic"),  criteria: "title" }
+        { text: I18n.qtr("Alphabetic"),  criteria: "title" },
+        { text: I18n.qtr("Release Year"),  criteria: "release_year" }
     ]
 
     property int initialIndex: 0



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/dc82c0b98d2f9a6a36d39fdabb5d06409f3e990e...5cd2d7aec11914d0e6c6ef0b5e7c02aeb1bc3e3b

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/dc82c0b98d2f9a6a36d39fdabb5d06409f3e990e...5cd2d7aec11914d0e6c6ef0b5e7c02aeb1bc3e3b
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list