]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Add "Aspect Ratio" and "Frame Rate" to additional video information columns
authorKochih Wu <mecca831@gmail.com>
Wed, 27 Mar 2019 18:30:44 +0000 (12:30 -0600)
committerNate Graham <nate@kde.org>
Wed, 27 Mar 2019 20:22:49 +0000 (14:22 -0600)
Summary:
Add options to show aspect ratio and frame rate.

BUG: 366524
FIXED-IN: 19.08.0

Test Plan: Under Control -> Additional Info -> Video, there should be options for aspect ratio and frame rate.

Reviewers: #dolphin, #kde_applications, ngraham

Reviewed By: #dolphin, #kde_applications, ngraham

Subscribers: astippich, ngraham, elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D20074

src/kitemviews/kfileitemmodel.cpp
src/kitemviews/kfileitemmodel.h
src/kitemviews/private/kbaloorolesprovider.cpp

index fc14c79c1c270ac30bfca4422597b4147cd078b3..b14647b42bd28e77114b8afda6ccdad64e0b7a85 100644 (file)
@@ -2322,6 +2322,8 @@ const KFileItemModel::RoleInfoMap* KFileItemModel::rolesInfoMap(int& count)
         { "bitrate",     BitrateRole,     I18N_NOOP2_NOSTRIP("@label", "Bitrate"),          I18N_NOOP2_NOSTRIP("@label", "Audio"),    true,  true  },
         { "track",       TrackRole,       I18N_NOOP2_NOSTRIP("@label", "Track"),            I18N_NOOP2_NOSTRIP("@label", "Audio"),    true,  true  },
         { "releaseYear", ReleaseYearRole, I18N_NOOP2_NOSTRIP("@label", "Release Year"),     I18N_NOOP2_NOSTRIP("@label", "Audio"),    true,  true  },
+        { "aspectRatio", AspectRatioRole, I18N_NOOP2_NOSTRIP("@label", "Aspect Ratio"),     I18N_NOOP2_NOSTRIP("@label", "Video"),    true,  true  },
+        { "frameRate",   FrameRateRole,   I18N_NOOP2_NOSTRIP("@label", "Frame Rate"),       I18N_NOOP2_NOSTRIP("@label", "Video"),    true,  true  },
         { "path",        PathRole,        I18N_NOOP2_NOSTRIP("@label", "Path"),             I18N_NOOP2_NOSTRIP("@label", "Other"),    false, false },
         { "deletiontime",DeletionTimeRole,I18N_NOOP2_NOSTRIP("@label", "Deletion Time"),    I18N_NOOP2_NOSTRIP("@label", "Other"),    false, false },
         { "destination", DestinationRole, I18N_NOOP2_NOSTRIP("@label", "Link Destination"), I18N_NOOP2_NOSTRIP("@label", "Other"),    false, false },
index d15cfebc1b8cf14231eedd2e010d84e4f7a818f7..0f7926aae1b432f5238999a03cc7247b0015d996 100644 (file)
@@ -288,7 +288,7 @@ private:
         // User visible roles available with Baloo:
         CommentRole, TagsRole, RatingRole, WidthRole, HeightRole, ImageDateTimeRole, OrientationRole,
         WordCountRole, TitleRole, LineCountRole, ArtistRole, GenreRole, AlbumRole, DurationRole, TrackRole, ReleaseYearRole,
-        BitrateRole, OriginUrlRole,
+        BitrateRole, OriginUrlRole, AspectRatioRole, FrameRateRole,
         // Non-visible roles:
         IsDirRole, IsLinkRole, IsHiddenRole, IsExpandedRole, IsExpandableRole, ExpandedParentsCountRole,
         // Mandatory last entry:
index 0eedf180656515769b83796d98c9b38ec378e0f2..469f0791550a9a5d152a8f8a0c35a1e44bf74582 100644 (file)
@@ -120,6 +120,8 @@ KBalooRolesProvider::KBalooRolesProvider() :
         { "album",    "album" },
         { "duration",      "duration" },
         { "bitRate", "bitrate" },
+        { "aspectRatio", "aspectRatio" },
+        { "frameRate", "frameRate" },
         { "releaseYear",    "releaseYear" },
         { "trackNumber",   "track" },
         { "originUrl", "originUrl" }