From 857cc5f4bb1d31fd9d5f0035886ed3dec6058657 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 3 Jun 2009 22:54:55 -0700 Subject: [PATCH] ... --- installer/osx/freeze.py | 2 +- src/calibre/devices/kindle/driver.py | 3 +-- src/calibre/devices/usbms/driver.py | 9 ++++++++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/installer/osx/freeze.py b/installer/osx/freeze.py index 8dee8feb7a..2471e2867f 100644 --- a/installer/osx/freeze.py +++ b/installer/osx/freeze.py @@ -19,7 +19,7 @@ from modulegraph.find_modules import find_modules PYTHON = '/Library/Frameworks/Python.framework/Versions/Current/bin/python' class BuildAPP(py2app): - QT_PREFIX = '/Users/kovid/qt' + QT_PREFIX = '/Volumes/sw/qt' LOADER_TEMPLATE = \ r'''#!/usr/bin/env python import os, sys, glob diff --git a/src/calibre/devices/kindle/driver.py b/src/calibre/devices/kindle/driver.py index de8cf0272c..00cd615b6d 100644 --- a/src/calibre/devices/kindle/driver.py +++ b/src/calibre/devices/kindle/driver.py @@ -53,8 +53,7 @@ class KINDLE(USBMS): @classmethod def metadata_from_path(cls, path): - from calibre.ebooks.metadata.meta import metadata_from_formats - mi = metadata_from_formats([path]) + mi = cls.metadata_from_formats([path]) if mi.title == _('Unknown') or ('-asin' in mi.title and '-type' in mi.title): match = cls.WIRELESS_FILE_NAME_PATTERN.match(os.path.basename(path)) if match is not None: diff --git a/src/calibre/devices/usbms/driver.py b/src/calibre/devices/usbms/driver.py index 2276efc91b..fe39e12077 100644 --- a/src/calibre/devices/usbms/driver.py +++ b/src/calibre/devices/usbms/driver.py @@ -211,8 +211,15 @@ class USBMS(CLI, Device): @classmethod def metadata_from_path(cls, path): + return cls.metadata_from_formats([path]) + + @classmethod + def metadata_from_formats(cls, fmts): from calibre.ebooks.metadata.meta import metadata_from_formats - return metadata_from_formats([path]) + from calibre.customize.ui import quick_metadata + with quick_metadata: + return metadata_from_formats(fmts) + @classmethod def book_from_path(cls, path):