Merge lp:~artmello/gallery-app/gallery-app-videos_sorted_first into lp:gallery-app

Proposed by Arthur Mello
Status: Rejected
Rejected by: Bill Filler
Proposed branch: lp:~artmello/gallery-app/gallery-app-videos_sorted_first
Merge into: lp:gallery-app
Diff against target: 35 lines (+4/-3)
2 files modified
src/media-object-factory.cpp (+3/-2)
src/medialoader/video-metadata.cpp (+1/-1)
To merge this branch: bzr merge lp:~artmello/gallery-app/gallery-app-videos_sorted_first
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Ubuntu Phablet Team Pending
Review via email: mp+245802@code.launchpad.net

Commit message

Change the fallback for videos from created to lastModified

Description of the change

Change the fallback for videos from created to lastModified

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)

Unmerged revisions

1123. By Arthur Mello

Change the fallback for videos from created to lastModified

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/media-object-factory.cpp'
2--- src/media-object-factory.cpp 2014-05-31 02:01:13 +0000
3+++ src/media-object-factory.cpp 2015-01-07 22:45:20 +0000
4@@ -261,7 +261,7 @@
5 if (!ok)
6 return false;
7
8- m_timeStamp = file.created();
9+ m_timeStamp = file.lastModified();
10 if (metadata.rotation() == 90) {
11 m_orientation = LEFT_BOTTOM_ORIGIN;
12 } else if (metadata.rotation() == 180) {
13@@ -272,7 +272,8 @@
14 m_orientation = TOP_LEFT_ORIGIN;
15 }
16 m_fileSize = file.size();
17- m_exposureTime = metadata.exposureTime();
18+ m_exposureTime = metadata.exposureTime().isValid() ?
19+ metadata.exposureTime() : m_timeStamp;
20 m_size = metadata.frameSize();
21
22 return true;
23
24=== modified file 'src/medialoader/video-metadata.cpp'
25--- src/medialoader/video-metadata.cpp 2014-04-30 23:40:50 +0000
26+++ src/medialoader/video-metadata.cpp 2015-01-07 22:45:20 +0000
27@@ -94,7 +94,7 @@
28 it = m_tags.find(ENCODED_DATE_KEY);
29 if ( it == m_tags.end()) {
30 // Fallback for date that the file was created
31- return m_file.created();
32+ return m_file.lastModified();
33 }
34
35 return it.value().toDateTime();

Subscribers

People subscribed via source and target branches