[vlc-commits] qt: fix sorting by duration
Pierre Lamot
git at videolan.org
Thu Aug 27 12:45:12 CEST 2020
vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Thu Aug 27 12:23:13 2020 +0200| [e0a184a933d51a97673a80d2490963a8da985a36] | committer: Pierre Lamot
qt: fix sorting by duration
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e0a184a933d51a97673a80d2490963a8da985a36
---
modules/gui/qt/medialibrary/mlalbummodel.cpp | 3 ++-
modules/gui/qt/medialibrary/mlalbumtrackmodel.cpp | 3 ++-
modules/gui/qt/medialibrary/mlvideomodel.cpp | 1 +
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/modules/gui/qt/medialibrary/mlalbummodel.cpp b/modules/gui/qt/medialibrary/mlalbummodel.cpp
index 972425205c..dc044c28ef 100644
--- a/modules/gui/qt/medialibrary/mlalbummodel.cpp
+++ b/modules/gui/qt/medialibrary/mlalbummodel.cpp
@@ -24,7 +24,8 @@ QHash<QByteArray, vlc_ml_sorting_criteria_t> MLAlbumModel::M_names_to_criteria =
{"release_year", VLC_ML_SORTING_RELEASEDATE},
{"main_artist", VLC_ML_SORTING_ARTIST},
//{"nb_tracks"},
- {"duration", VLC_ML_SORTING_DURATION}
+ {"duration", VLC_ML_SORTING_DURATION},
+ {"duration_short", VLC_ML_SORTING_DURATION}
};
MLAlbumModel::MLAlbumModel(QObject *parent)
diff --git a/modules/gui/qt/medialibrary/mlalbumtrackmodel.cpp b/modules/gui/qt/medialibrary/mlalbumtrackmodel.cpp
index ef82d86ced..ed4c63de7a 100644
--- a/modules/gui/qt/medialibrary/mlalbumtrackmodel.cpp
+++ b/modules/gui/qt/medialibrary/mlalbumtrackmodel.cpp
@@ -45,7 +45,8 @@ QHash<QByteArray, vlc_ml_sorting_criteria_t> MLAlbumTrackModel::M_names_to_crite
{"track_number", VLC_ML_SORTING_TRACKNUMBER},
{"release_year", VLC_ML_SORTING_RELEASEDATE},
{"main_artist", VLC_ML_SORTING_ARTIST},
- {"duration", VLC_ML_SORTING_DURATION}
+ {"duration", VLC_ML_SORTING_DURATION},
+ {"duration_short", VLC_ML_SORTING_DURATION}
};
MLAlbumTrackModel::MLAlbumTrackModel(QObject *parent)
diff --git a/modules/gui/qt/medialibrary/mlvideomodel.cpp b/modules/gui/qt/medialibrary/mlvideomodel.cpp
index 96072f9a35..fde7155b3b 100644
--- a/modules/gui/qt/medialibrary/mlvideomodel.cpp
+++ b/modules/gui/qt/medialibrary/mlvideomodel.cpp
@@ -44,6 +44,7 @@ QHash<QByteArray, vlc_ml_sorting_criteria_t> MLVideoModel::M_names_to_criteria =
{"id", VLC_ML_SORTING_DEFAULT},
{"title", VLC_ML_SORTING_ALPHA},
{"duration", VLC_ML_SORTING_DURATION},
+ {"duration_short", VLC_ML_SORTING_DURATION},
{"playcount", VLC_ML_SORTING_PLAYCOUNT},
};
More information about the vlc-commits
mailing list