mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04:00
Merge from trunk
This commit is contained in:
commit
8e4c24c8a2
@ -101,7 +101,7 @@ class POCKETBOOK360(EB600):
|
|||||||
|
|
||||||
VENDOR_NAME = ['PHILIPS', '__POCKET', 'POCKETBO']
|
VENDOR_NAME = ['PHILIPS', '__POCKET', 'POCKETBO']
|
||||||
WINDOWS_MAIN_MEM = WINDOWS_CARD_A_MEM = ['MASS_STORGE', 'BOOK_USB_STORAGE',
|
WINDOWS_MAIN_MEM = WINDOWS_CARD_A_MEM = ['MASS_STORGE', 'BOOK_USB_STORAGE',
|
||||||
'OK_POCKET_611_61']
|
'OK_POCKET_611_61', 'OK_POCKET_360+61']
|
||||||
|
|
||||||
OSX_MAIN_MEM = OSX_CARD_A_MEM = 'Philips Mass Storge Media'
|
OSX_MAIN_MEM = OSX_CARD_A_MEM = 'Philips Mass Storge Media'
|
||||||
OSX_MAIN_MEM_VOL_PAT = re.compile(r'/Pocket')
|
OSX_MAIN_MEM_VOL_PAT = re.compile(r'/Pocket')
|
||||||
|
@ -7,11 +7,10 @@ __license__ = 'GPL v3'
|
|||||||
__copyright__ = '2011, Kovid Goyal <kovid@kovidgoyal.net>'
|
__copyright__ = '2011, Kovid Goyal <kovid@kovidgoyal.net>'
|
||||||
__docformat__ = 'restructuredtext en'
|
__docformat__ = 'restructuredtext en'
|
||||||
|
|
||||||
import re
|
import re, unicodedata
|
||||||
|
|
||||||
from calibre.ebooks.oeb.base import (OEB_DOCS, XHTML, XHTML_NS, XML_NS,
|
from calibre.ebooks.oeb.base import (OEB_DOCS, XHTML, XHTML_NS, XML_NS,
|
||||||
namespace, prefixname, urlnormalize)
|
namespace, prefixname, urlnormalize)
|
||||||
from calibre.ebooks import normalize
|
|
||||||
from calibre.ebooks.mobi.mobiml import MBP_NS
|
from calibre.ebooks.mobi.mobiml import MBP_NS
|
||||||
from calibre.ebooks.mobi.utils import is_guide_ref_start
|
from calibre.ebooks.mobi.utils import is_guide_ref_start
|
||||||
|
|
||||||
@ -356,7 +355,9 @@ class Serializer(object):
|
|||||||
text = text.replace(u'\u00AD', '') # Soft-hyphen
|
text = text.replace(u'\u00AD', '') # Soft-hyphen
|
||||||
if quot:
|
if quot:
|
||||||
text = text.replace('"', '"')
|
text = text.replace('"', '"')
|
||||||
self.buf.write(normalize(text).encode('utf-8'))
|
if isinstance(text, unicode):
|
||||||
|
text = unicodedata.normalize('NFC', text)
|
||||||
|
self.buf.write(text.encode('utf-8'))
|
||||||
|
|
||||||
def fixup_links(self):
|
def fixup_links(self):
|
||||||
'''
|
'''
|
||||||
|
@ -561,7 +561,9 @@ class OPDSServer(object):
|
|||||||
if type_ != 'I':
|
if type_ != 'I':
|
||||||
raise cherrypy.HTTPError(404, 'Non id categories not supported')
|
raise cherrypy.HTTPError(404, 'Non id categories not supported')
|
||||||
|
|
||||||
ids = self.db.get_books_for_category(category, which)
|
q = category
|
||||||
|
if q == 'news': q = 'tags'
|
||||||
|
ids = self.db.get_books_for_category(q, which)
|
||||||
sort_by = 'series' if category == 'series' else 'title'
|
sort_by = 'series' if category == 'series' else 'title'
|
||||||
|
|
||||||
return self.get_opds_acquisition_feed(ids, offset, page_url,
|
return self.get_opds_acquisition_feed(ids, offset, page_url,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user