This commit is contained in:
Kovid Goyal 2009-06-03 22:54:55 -07:00
parent ae475bddb0
commit 857cc5f4bb
3 changed files with 10 additions and 4 deletions

View File

@ -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

View File

@ -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:

View File

@ -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):