diff --git a/resources/recipes/ihned.recipe b/resources/recipes/ihned.recipe index daf63e19ed..a74f9e5649 100644 --- a/resources/recipes/ihned.recipe +++ b/resources/recipes/ihned.recipe @@ -5,7 +5,7 @@ from calibre.web.feeds.recipes import BasicNewsRecipe class IHNed(BasicNewsRecipe): - stahnout_vsechny = False + stahnout_vsechny = True #True = stahuje vsechny z homepage #False = stahuje pouze dnesni clanky (ze dne, kdy je skript spusten) diff --git a/src/calibre/devices/android/driver.py b/src/calibre/devices/android/driver.py index 5a82882dfa..277070020b 100644 --- a/src/calibre/devices/android/driver.py +++ b/src/calibre/devices/android/driver.py @@ -36,7 +36,7 @@ class ANDROID(USBMS): # Google 0x18d1 : { 0x4e11 : [0x0100, 0x226, 0x227], 0x4e12: [0x0100, 0x226, - 0x227], 0x4e21: [0x0100, 0x226, 0x227]}, + 0x227], 0x4e21: [0x0100, 0x226, 0x227], 0xb058: [0x0222]}, # Samsung 0x04e8 : { 0x681d : [0x0222, 0x0223, 0x0224, 0x0400], @@ -64,12 +64,13 @@ class ANDROID(USBMS): EXTRA_CUSTOMIZATION_DEFAULT = ', '.join(EBOOK_DIR_MAIN) VENDOR_NAME = ['HTC', 'MOTOROLA', 'GOOGLE_', 'ANDROID', 'ACER', - 'GT-I5700', 'SAMSUNG', 'DELL', 'LINUX', 'GOOGLE', 'ARCHOS'] + 'GT-I5700', 'SAMSUNG', 'DELL', 'LINUX', 'GOOGLE', 'ARCHOS', + 'TELECHIP'] WINDOWS_MAIN_MEM = ['ANDROID_PHONE', 'A855', 'A853', 'INC.NEXUS_ONE', '__UMS_COMPOSITE', '_MB200', 'MASS_STORAGE', '_-_CARD', 'SGH-I897', 'GT-I9000', 'FILE-STOR_GADGET', 'SGH-T959', 'SAMSUNG_ANDROID', 'SCH-I500_CARD', 'SPH-D700_CARD', 'MB810', 'GT-P1000', 'DESIRE', - 'SGH-T849', '_MB300', 'A70S'] + 'SGH-T849', '_MB300', 'A70S', 'S_ANDROID'] WINDOWS_CARD_A_MEM = ['ANDROID_PHONE', 'GT-I9000_CARD', 'SGH-I897', 'FILE-STOR_GADGET', 'SGH-T959', 'SAMSUNG_ANDROID', 'GT-P1000_CARD', 'A70S'] diff --git a/src/calibre/devices/misc.py b/src/calibre/devices/misc.py index aaf948f25e..9f8dbcb379 100644 --- a/src/calibre/devices/misc.py +++ b/src/calibre/devices/misc.py @@ -193,6 +193,9 @@ class LUMIREAD(USBMS): THUMBNAIL_HEIGHT = 200 + VENDOR_NAME = 'ACER' + WINDOWS_MAIN_MEM = WINDOWS_CARD_A_MEM = 'LUMIREAD_600' + def upload_cover(self, path, filename, metadata, filepath): if metadata.thumbnail and metadata.thumbnail[-1]: cfilepath = filepath.replace('/', os.sep) diff --git a/src/calibre/gui2/device_drivers/configwidget.ui b/src/calibre/gui2/device_drivers/configwidget.ui index f4902a7387..619d7052e8 100644 --- a/src/calibre/gui2/device_drivers/configwidget.ui +++ b/src/calibre/gui2/device_drivers/configwidget.ui @@ -85,6 +85,9 @@ + + If checked, books are placed into sub directories based on their metadata on the device. If unchecked, books are all put into the top level directory. + Use sub directories diff --git a/src/calibre/gui2/library/delegates.py b/src/calibre/gui2/library/delegates.py index ea614aa817..ae9d6e2f71 100644 --- a/src/calibre/gui2/library/delegates.py +++ b/src/calibre/gui2/library/delegates.py @@ -292,7 +292,7 @@ class CcEnumDelegate(QStyledItemDelegate): # {{{ def createEditor(self, parent, option, index): m = index.model() col = m.column_map[index.column()] - editor = QComboBox(parent) + editor = DelegateCB(parent) editor.addItem('') for v in m.custom_columns[col]['display']['enum_values']: editor.addItem(v) @@ -353,6 +353,17 @@ class CcCommentsDelegate(QStyledItemDelegate): # {{{ model.setData(index, QVariant(editor.textbox.html), Qt.EditRole) # }}} +class DelegateCB(QComboBox): # {{{ + + def __init__(self, parent): + QComboBox.__init__(self, parent) + + def event(self, e): + if e.type() == e.ShortcutOverride: + e.accept() + return QComboBox.event(self, e) +# }}} + class CcBoolDelegate(QStyledItemDelegate): # {{{ def __init__(self, parent): ''' @@ -361,7 +372,7 @@ class CcBoolDelegate(QStyledItemDelegate): # {{{ QStyledItemDelegate.__init__(self, parent) def createEditor(self, parent, option, index): - editor = QComboBox(parent) + editor = DelegateCB(parent) items = [_('Y'), _('N'), ' '] icons = [I('ok.png'), I('list_remove.png'), I('blank.png')] if tweaks['bool_custom_columns_are_tristate'] == 'no': diff --git a/src/calibre/utils/date.py b/src/calibre/utils/date.py index 2551b90788..d970ed228d 100644 --- a/src/calibre/utils/date.py +++ b/src/calibre/utils/date.py @@ -46,6 +46,14 @@ local_tz = _local_tz = SafeLocalTimeZone() UNDEFINED_DATE = datetime(101,1,1, tzinfo=utc_tz) +def is_date_undefined(qt_or_dt): + d = qt_or_dt + if hasattr(d, 'toString'): + d = datetime(d.year(), d.month(), d.day(), tzinfo=utc_tz) + return d.year == UNDEFINED_DATE.year and \ + d.month == UNDEFINED_DATE.month and \ + d.day == UNDEFINED_DATE.day + def parse_date(date_string, assume_utc=False, as_utc=True, default=None): ''' Parse a date/time string into a timezone aware datetime object. The timezone diff --git a/src/calibre/utils/smtplib.py b/src/calibre/utils/smtplib.py index d6f3fb0b69..9992039d00 100755 --- a/src/calibre/utils/smtplib.py +++ b/src/calibre/utils/smtplib.py @@ -554,6 +554,8 @@ class SMTP: def encode_cram_md5(challenge, user, password): challenge = base64.decodestring(challenge) + if isinstance(password, unicode): # Added by Kovid, see http://bugs.python.org/issue5285 + password = password.encode('utf-8') response = user + " " + hmac.HMAC(password, challenge).hexdigest() return encode_base64(response, eol="")