Merge lp:~vthompson/qtgrilo/changes-from-upstream into lp:qtgrilo

Proposed by Victor Thompson
Status: Merged
Approved by: David Planella
Approved revision: 10
Merged at revision: 10
Proposed branch: lp:~vthompson/qtgrilo/changes-from-upstream
Merge into: lp:qtgrilo
Diff against target: 58 lines (+10/-10)
2 files modified
declarative/grilomedia.cpp (+6/-6)
declarative/grilomedia.h (+4/-4)
To merge this branch: bzr merge lp:~vthompson/qtgrilo/changes-from-upstream
Reviewer Review Type Date Requested Status
David Planella Approve
Review via email: mp+185611@code.launchpad.net

Commit message

Recommended changes from upstream.

Description of the change

The added properties (genre, cover art, year, and track number) have merged upstream--with the changes proposed in this branch. No changes to the Music app are necessary to utilize the plugin with these modifications.

To post a comment you must log in.
Revision history for this message
David Planella (dpm) wrote :

Looks good to me!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'declarative/grilomedia.cpp'
--- declarative/grilomedia.cpp 2013-09-12 00:05:05 +0000
+++ declarative/grilomedia.cpp 2013-09-14 02:13:44 +0000
@@ -100,22 +100,22 @@
100 return QString();100 return QString();
101}101}
102102
103QString GriloMedia::thumbnail() const103QUrl GriloMedia::thumbnail() const
104{104{
105 if (GRL_IS_MEDIA(m_media)) {105 if (GRL_IS_MEDIA(m_media)) {
106 return QString::fromUtf8(grl_media_get_thumbnail(GRL_MEDIA(m_media)));106 return QUrl(grl_media_get_thumbnail(GRL_MEDIA(m_media)));
107 }107 }
108108
109 return QString();109 return QUrl();
110}110}
111111
112QString GriloMedia::year() const112int GriloMedia::year() const
113{113{
114 if (GRL_IS_MEDIA(m_media)) {114 if (GRL_IS_MEDIA(m_media)) {
115 return QString::number(g_date_time_get_year(grl_media_get_creation_date(GRL_MEDIA(m_media))));115 return g_date_time_get_year(grl_media_get_creation_date(GRL_MEDIA(m_media)));
116 }116 }
117117
118 return QString();118 return 0;
119}119}
120120
121int GriloMedia::trackNumber() const121int GriloMedia::trackNumber() const
122122
=== modified file 'declarative/grilomedia.h'
--- declarative/grilomedia.h 2013-09-12 00:05:05 +0000
+++ declarative/grilomedia.h 2013-09-14 02:13:44 +0000
@@ -40,8 +40,8 @@
40 Q_PROPERTY(QString album READ album CONSTANT);40 Q_PROPERTY(QString album READ album CONSTANT);
41 Q_PROPERTY(QString artist READ artist CONSTANT);41 Q_PROPERTY(QString artist READ artist CONSTANT);
42 Q_PROPERTY(QString genre READ genre CONSTANT);42 Q_PROPERTY(QString genre READ genre CONSTANT);
43 Q_PROPERTY(QString thumbnail READ thumbnail CONSTANT);43 Q_PROPERTY(QUrl thumbnail READ thumbnail CONSTANT);
44 Q_PROPERTY(QString year READ year CONSTANT);44 Q_PROPERTY(int year READ year CONSTANT);
45 Q_PROPERTY(int trackNumber READ trackNumber CONSTANT);45 Q_PROPERTY(int trackNumber READ trackNumber CONSTANT);
46 Q_PROPERTY(int childCount READ childCount CONSTANT);46 Q_PROPERTY(int childCount READ childCount CONSTANT);
47 Q_PROPERTY(QString mimeType READ mimeType CONSTANT);47 Q_PROPERTY(QString mimeType READ mimeType CONSTANT);
@@ -58,8 +58,8 @@
58 QString album() const;58 QString album() const;
59 QString artist() const;59 QString artist() const;
60 QString genre() const;60 QString genre() const;
61 QString thumbnail() const;61 QUrl thumbnail() const;
62 QString year() const;62 int year() const;
63 int trackNumber() const;63 int trackNumber() const;
64 int childCount() const;64 int childCount() const;
65 QString mimeType() const;65 QString mimeType() const;

Subscribers

People subscribed via source and target branches