]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Add Genre to additional information for audio files. Fixes T5599
authorFrancisco Navarro Morales <navarromoralesdev@gmail.com>
Sun, 27 Aug 2017 21:07:59 +0000 (23:07 +0200)
committerElvis Angelaccio <elvis.angelaccio@kde.org>
Sun, 27 Aug 2017 21:11:31 +0000 (23:11 +0200)
Summary: I have just imitated the code that made this funcionality for artist and album additional information for audio files.

Reviewed By: #dolphin, emmanuelp

CCBUG: 374558

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

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

index b725d950797b4620f61955b373f0b8e2399e6360..f2f44eab4f38666e46e7b9e7af740a34c0e8fc7c 100644 (file)
@@ -2307,6 +2307,7 @@ const KFileItemModel::RoleInfoMap* KFileItemModel::rolesInfoMap(int& count)
         { "imageSize",   ImageSizeRole,   I18N_NOOP2_NOSTRIP("@label", "Image Size"),       I18N_NOOP2_NOSTRIP("@label", "Image"),    true,  true  },
         { "orientation", OrientationRole, I18N_NOOP2_NOSTRIP("@label", "Orientation"),      I18N_NOOP2_NOSTRIP("@label", "Image"),    true,  true  },
         { "artist",      ArtistRole,      I18N_NOOP2_NOSTRIP("@label", "Artist"),           I18N_NOOP2_NOSTRIP("@label", "Audio"),    true,  true  },
+        { "genre",       GenreRole,       I18N_NOOP2_NOSTRIP("@label", "Genre"),            I18N_NOOP2_NOSTRIP("@label", "Audio"),    true,  true  },
         { "album",       AlbumRole,       I18N_NOOP2_NOSTRIP("@label", "Album"),            I18N_NOOP2_NOSTRIP("@label", "Audio"),    true,  true  },
         { "duration",    DurationRole,    I18N_NOOP2_NOSTRIP("@label", "Duration"),         I18N_NOOP2_NOSTRIP("@label", "Audio"),    true,  true  },
         { "track",       TrackRole,       I18N_NOOP2_NOSTRIP("@label", "Track"),            I18N_NOOP2_NOSTRIP("@label", "Audio"),    true,  true  },
index ef902775fcf1abbf340ef382d3e76e6d8ab4f3f6..c18ced8e340319a0d609e3f1a616b00c3f414240 100644 (file)
@@ -286,7 +286,7 @@ private:
         GroupRole, TypeRole, DestinationRole, PathRole, DeletionTimeRole,
         // User visible roles available with Baloo:
         CommentRole, TagsRole, RatingRole, ImageSizeRole, OrientationRole,
-        WordCountRole, TitleRole, LineCountRole, ArtistRole, AlbumRole, DurationRole, TrackRole,
+        WordCountRole, TitleRole, LineCountRole, ArtistRole, GenreRole, AlbumRole, DurationRole, TrackRole,
         OriginUrlRole,
         // Non-visible roles:
         IsDirRole, IsLinkRole, IsHiddenRole, IsExpandedRole, IsExpandableRole, ExpandedParentsCountRole,
index d6c15afcdbb42ac5ba0d563d00e5d36cf92cc58b..59aadcee0480ba8b280a0790b259c17a25bf078d 100644 (file)
@@ -146,6 +146,7 @@ KBalooRolesProvider::KBalooRolesProvider() :
         { "height",        "imageSize" },
         { "nexif.orientation", "orientation", },
         { "artist",     "artist" },
+        { "genre",     "genre"  },
         { "album",    "album" },
         { "duration",      "duration" },
         { "trackNumber",   "track" },