mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-31 14:33:54 -04:00
...
This commit is contained in:
parent
ae475bddb0
commit
857cc5f4bb
@ -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
|
||||
|
@ -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:
|
||||
|
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user