Alexei Sorokin 2015-12-13 17:21:20 +00:00 committed by Git OBS Bridge
parent 82b84122a4
commit 732af29b45
3 changed files with 68 additions and 5 deletions

View File

@ -1,9 +1,13 @@
-------------------------------------------------------------------
Sat Dec 12 13:01:59 UTC 2015 - sor.alexei@meowr.ru
Sun Dec 13 16:17:59 UTC 2015 - sor.alexei@meowr.ru
- Add nemo-media-columns_use-exiftool.patch: use exiftool as exiv2
shows some instability under nemo-python.
- Add nemo-seahorse_no-nautilus-conflicts.patch: do not install
files that conflict with nautilus-extension-seahorse.
- Depend on nautilus-extension-seahorse.
- nemo-extension-media-columns to depend on exiftool instead of
python-pyexiv2.
- nemo-extension-seahorse to depend on nautilus-extension-seahorse.
-------------------------------------------------------------------
Wed Oct 21 14:05:01 UTC 2015 - sor.alexei@meowr.ru

View File

@ -29,10 +29,12 @@ Source: https://github.com/linuxmint/%{name}/archive/%{_version}.tar.gz#
Patch0: nemo-seahorse_gpg-2.1.patch
# PATCH-FIX-UPSTREAM nemo-terminal_vte-2.91.patch
Patch1: nemo-terminal_vte-2.91.patch
# PATCH-FIX-UPSTREAM nemo-media-columns_use-exiftool.patch boo#958867 sor.alexei@meowr.ru -- Use exiftool as exiv2 shows some instability under nemo-python.
Patch2: nemo-media-columns_use-exiftool.patch
# PATCH-FIX-OPENSUSE nemo-seahorse_no-nautilus-conflicts.patch sor.alexei@meowr.ru -- Strip conflicted with nautilus-extension-seahorse files.
Patch2: nemo-seahorse_no-nautilus-conflicts.patch
Patch3: nemo-seahorse_no-nautilus-conflicts.patch
# PATCH-FIX-OPENSUSE nemo-dropbox_no-dropbox-bin.patch sor.alexei@meowr.ru -- Strip dropbox binary installation.
Patch3: nemo-dropbox_no-dropbox-bin.patch
Patch4: nemo-dropbox_no-dropbox-bin.patch
BuildRequires: docutils
BuildRequires: gettext-runtime
BuildRequires: gnome-common
@ -202,13 +204,13 @@ image(s) using ImageMagick's convert tool.
Summary: Nemo Media Columns
License: GPL-3.0
Group: System/GUI/Other
Requires: exiftool
Requires: nemo >= %{_version}
Requires: python-gobject
Requires: python-imaging
Requires: python-kaa-metadata
Requires: python-mutagen
Requires: python-nemo = %{version}
Requires: python-pyexiv2
Requires: python-pypdf
# nemo-media-columns was last used in openSUSE 13.2.
Provides: nemo-media-columns = %{version}
@ -340,6 +342,7 @@ directory in Nemo.
%patch1
%patch2
%patch3
%patch4
# Remove spurious executable permission.
chmod a-x nemo-audio-tab/COPYING.GPL3 nemo-emblems/COPYING.GPL3

View File

@ -0,0 +1,56 @@
--- nemo-media-columns.orig/nemo-media-columns.py
+++ nemo-media-columns/nemo-media-columns.py
@@ -29,7 +29,7 @@ from gi.repository import Nemo, GObject,
from mutagen.easyid3 import EasyID3
from mutagen.mp3 import MPEGInfo
# for exif support
-import pyexiv2
+import json, subprocess
# for reading videos. for future improvement, this can also read mp3!
import kaa.metadata
# for reading image dimensions
@@ -141,32 +141,32 @@ class ColumnExtension(GObject.GObject, N
if file.is_mime_type('image/jpeg') or file.is_mime_type('image/png') or file.is_mime_type('image/gif') or file.is_mime_type('image/bmp'):
# EXIF handling routines
try:
- metadata = pyexiv2.ImageMetadata(filename)
- metadata.read()
+ metadata = json.loads(subprocess.check_output(['exiftool', '-j', filename]))[0]
+
try:
- exif_datetimeoriginal = metadata['Exif.Photo.DateTimeOriginal']
- file.add_string_attribute('exif_datetime_original',str(exif_datetimeoriginal.raw_value))
+ exif_datetimeoriginal = metadata['DateTimeOriginal']
+ file.add_string_attribute('exif_datetime_original',str(exif_datetimeoriginal))
except:
file.add_string_attribute('exif_datetime_original',"")
try:
- exif_imagesoftware = metadata['Exif.Image.Software']
- file.add_string_attribute('exif_software',str(exif_imagesoftware.raw_value))
+ exif_imagesoftware = metadata['Software']
+ file.add_string_attribute('exif_software',str(exif_imagesoftware))
except:
file.add_string_attribute('exif_software',"")
try:
- exif_photoflash = metadata['Exif.Photo.Flash']
- file.add_string_attribute('exif_flash',str(exif_photoflash.raw_value))
+ exif_photoflash = metadata['Flash']
+ file.add_string_attribute('exif_flash',str(exif_photoflash))
except:
file.add_string_attribute('exif_flash',"")
try:
- exif_pixelydimension = metadata['Exif.Photo.PixelYDimension']
+ exif_pixelydimension = metadata['PixelYDimension']
exif_pixelxdimension = metadata['Exif.Photo.PixelXDimension']
- file.add_string_attribute('exif_pixeldimensions',str(exif_pixelydimension.raw_value)+'x'+str(exif_pixelxdimension.raw_value))
+ file.add_string_attribute('exif_pixeldimensions',str(exif_pixelydimension)+'x'+str(exif_pixelxdimension))
except:
file.add_string_attribute('exif_pixeldimensions',"")
try:
- exif_rating = metadata['Xmp.xmp.Rating']
- file.add_string_attribute('exif_rating',str(exif_rating.raw_value))
+ exif_rating = metadata['Rating']
+ file.add_string_attribute('exif_rating',str(exif_rating))
except:
file.add_string_attribute('exif_rating',"")
except: