If there is no image Exif metadata, the media object's date will be displayed on the Edit screen if there is one available.
svn: r18024
This commit is contained in:
parent
86334caef3
commit
823d3b4034
@ -249,8 +249,9 @@ class EditExifMetadata(Gramplet):
|
||||
seconds symbol = \2033
|
||||
"""
|
||||
def init(self):
|
||||
"""create variables, and build display"""
|
||||
|
||||
"""
|
||||
create variables, and build display
|
||||
"""
|
||||
self.exif_widgets, self.dates, self.coordinates = {}, {}, {}
|
||||
self.orig_image, self.plugin_image, self.image_path = [False]*3
|
||||
|
||||
@ -1183,21 +1184,25 @@ class EditExifMetadata(Gramplet):
|
||||
|
||||
for key in mediadatatags:
|
||||
widget = _DATAMAP[key]
|
||||
|
||||
tag_value = self._get_value(key)
|
||||
if tag_value:
|
||||
|
||||
if widget in ["Description", "Artist", "Copyright"]:
|
||||
if tag_value:
|
||||
self.exif_widgets[widget].set_text(tag_value)
|
||||
|
||||
# Last Changed/ Modified, and original Date...
|
||||
elif widget in ["Modified", "Original"]:
|
||||
# Original Date...
|
||||
elif widget == "Original":
|
||||
use_date = format_datetime(tag_value)
|
||||
if use_date:
|
||||
self.exif_widgets[widget].set_text(use_date)
|
||||
|
||||
# Last Modified date
|
||||
elif widget == "Modified":
|
||||
use_date = format_datetime(tag_value)
|
||||
if use_date:
|
||||
self.exif_widgets["Modified"].set_text(use_date)
|
||||
|
||||
# set Modified Datetime to non-editable...
|
||||
if (widget == "Modified" and use_date):
|
||||
self.exif_widgets[widget].set_editable(False)
|
||||
|
||||
# LatitudeRef, Latitude, LongitudeRef, Longitude...
|
||||
@ -1247,6 +1252,12 @@ class EditExifMetadata(Gramplet):
|
||||
altitude = "-" + altitude
|
||||
self.exif_widgets[widget].set_text(altitude)
|
||||
|
||||
# no Exif metadata, but there is a media object date available
|
||||
else:
|
||||
mediaobj_date = self.orig_image.get_date_object()
|
||||
if mediaobj_date:
|
||||
self.exif_widgets["Original"].set_text(_dd.display(mediaobj_date))
|
||||
|
||||
# Media Object Title...
|
||||
self.media_title = self.orig_image.get_description()
|
||||
self.exif_widgets["MediaTitle"].set_text(self.media_title)
|
||||
|
Loading…
Reference in New Issue
Block a user