From df6beb6e09d0d1b969e3193b893dcbffd08d273a Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 8 Nov 2011 12:42:24 +0530 Subject: [PATCH 1/4] ... --- src/calibre/gui2/wizard/__init__.py | 5 +++++ src/calibre/library/save_to_disk.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/wizard/__init__.py b/src/calibre/gui2/wizard/__init__.py index 9fe258e836..c0965412db 100644 --- a/src/calibre/gui2/wizard/__init__.py +++ b/src/calibre/gui2/wizard/__init__.py @@ -122,6 +122,11 @@ class Kobo(Device): output_format = 'EPUB' id = 'kobo' +class KoboVox(Kobo): + name = 'Kobo Vox' + output_profile = 'tablet' + id = 'kobo_vox' + class Booq(Device): name = 'bq Classic' manufacturer = 'Booq' diff --git a/src/calibre/library/save_to_disk.py b/src/calibre/library/save_to_disk.py index 45d80839b2..c8ac28a01f 100644 --- a/src/calibre/library/save_to_disk.py +++ b/src/calibre/library/save_to_disk.py @@ -173,7 +173,7 @@ def get_components(template, mi, id, timefmt='%b %Y', length=250, tsorder = tweaks['save_template_title_series_sorting'] format_args = FORMAT_ARGS.copy() format_args.update(mi.all_non_none_fields()) - if mi.is_null('author_sort'): + if mi.author_sort == _('Unknown'): format_args['author_sort'] = _('Unknown') if mi.title: if tsorder == 'strictly_alphabetic': From 944099b4aa675548ff4969a9d0998425624e8db1 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 8 Nov 2011 13:23:58 +0530 Subject: [PATCH 2/4] Fix #887275 (Calibre does not conect to Kobo ebook) --- src/calibre/devices/kobo/driver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/devices/kobo/driver.py b/src/calibre/devices/kobo/driver.py index 1e4cb6c63c..6e58e27cc7 100644 --- a/src/calibre/devices/kobo/driver.py +++ b/src/calibre/devices/kobo/driver.py @@ -40,7 +40,7 @@ class KOBO(USBMS): CAN_SET_METADATA = ['collections'] VENDOR_ID = [0x2237] - PRODUCT_ID = [0x4161, 0x4163] + PRODUCT_ID = [0x4161, 0x4163, 0x4165] BCD = [0x0110, 0x0323, 0x0326] VENDOR_NAME = ['KOBO_INC', 'KOBO'] From 380ea0d76c5fd9568b3b9672dbf4718f7a8cda86 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 8 Nov 2011 13:26:06 +0530 Subject: [PATCH 3/4] Detect SD card in Kobo Vox --- src/calibre/devices/android/driver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/devices/android/driver.py b/src/calibre/devices/android/driver.py index 5b0664515d..e083b38490 100644 --- a/src/calibre/devices/android/driver.py +++ b/src/calibre/devices/android/driver.py @@ -171,7 +171,7 @@ class ANDROID(USBMS): 'FILE-STOR_GADGET', 'SGH-T959', 'SAMSUNG_ANDROID', 'GT-P1000_CARD', 'A70S', 'A101IT', '7', 'INCREDIBLE', 'A7EB', 'SGH-T849_CARD', '__UMS_COMPOSITE', 'SGH-I997_CARD', 'MB870', 'ALPANDIGITAL', - 'ANDROID_MID', 'P990_SD_CARD'] + 'ANDROID_MID', 'P990_SD_CARD', '.K080'] OSX_MAIN_MEM = 'Android Device Main Memory' From cef604bda215820823da4e6b20bf609a291b49f4 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 8 Nov 2011 13:32:12 +0530 Subject: [PATCH 4/4] Treat author_sort = _('Unknown') as null --- src/calibre/ebooks/metadata/book/base.py | 1 + src/calibre/library/save_to_disk.py | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/calibre/ebooks/metadata/book/base.py b/src/calibre/ebooks/metadata/book/base.py index 58f28af01f..53d336a23d 100644 --- a/src/calibre/ebooks/metadata/book/base.py +++ b/src/calibre/ebooks/metadata/book/base.py @@ -32,6 +32,7 @@ NULL_VALUES = { 'device_collections': [], 'author_sort_map': {}, 'authors' : [_('Unknown')], + 'author_sort' : _('Unknown'), 'title' : _('Unknown'), 'user_categories' : {}, 'author_link_map' : {}, diff --git a/src/calibre/library/save_to_disk.py b/src/calibre/library/save_to_disk.py index c8ac28a01f..69565e07d7 100644 --- a/src/calibre/library/save_to_disk.py +++ b/src/calibre/library/save_to_disk.py @@ -173,8 +173,6 @@ def get_components(template, mi, id, timefmt='%b %Y', length=250, tsorder = tweaks['save_template_title_series_sorting'] format_args = FORMAT_ARGS.copy() format_args.update(mi.all_non_none_fields()) - if mi.author_sort == _('Unknown'): - format_args['author_sort'] = _('Unknown') if mi.title: if tsorder == 'strictly_alphabetic': v = mi.title