Merge lp:~davidc3/unity-lens-photos/fix-raw-previews into lp:unity-lens-photos

Proposed by David Callé
Status: Merged
Approved by: David Callé
Approved revision: 89
Merge reported by: David Callé
Merged at revision: not available
Proposed branch: lp:~davidc3/unity-lens-photos/fix-raw-previews
Merge into: lp:unity-lens-photos
Diff against target: 18 lines (+7/-1)
1 file modified
src/shotwell_scope.py (+7/-1)
To merge this branch: bzr merge lp:~davidc3/unity-lens-photos/fix-raw-previews
Reviewer Review Type Date Requested Status
David Callé Approve
Review via email: mp+126893@code.launchpad.net

Description of the change

Fix previews for raw files by using shotwell generated jpg file

To post a comment you must log in.
Revision history for this message
David Callé (davidc3) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/shotwell_scope.py'
2--- src/shotwell_scope.py 2012-09-27 10:05:41 +0000
3+++ src/shotwell_scope.py 2012-09-28 09:04:22 +0000
4@@ -153,7 +153,13 @@
5 out_of_drive = False
6 if self.is_file (uri.replace("file://", "")):
7 title = self.getTitle (uri.replace("file://", ""), model.get_value(iter, 4))
8- image = uri
9+ # Test existence of a jpg thumb for raw files
10+ raw_thumb = uri.replace("file://", "")
11+ raw_thumb = raw_thumb.replace(".", "_")+"_shotwell.jpg"
12+ if self.is_file(raw_thumb):
13+ image = "file://"+raw_thumb
14+ else:
15+ image = uri
16 else:
17 image = "file://"+model.get_value(iter, 1)
18 desc = _("<b>This photo is missing.</b>\nYou can open Shotwell to retrieve it or remove it from your library.")

Subscribers

People subscribed via source and target branches

to all changes: