From cd333e17dd1fb79820eba73794b5632f626834d6 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 22 Dec 2014 12:46:25 +0530 Subject: [PATCH] Tolino Shine driver: Fix option to swap main memory and SD card not working on OS X. Fixes #1404793 [Tolino Shine (Device Settings not recognized)](https://bugs.launchpad.net/calibre/+bug/1404793) --- src/calibre/devices/eb600/driver.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/calibre/devices/eb600/driver.py b/src/calibre/devices/eb600/driver.py index 55235a4ac9..732221323b 100644 --- a/src/calibre/devices/eb600/driver.py +++ b/src/calibre/devices/eb600/driver.py @@ -96,6 +96,19 @@ class TOLINO(EB600): drives['carda'] = main return drives + def osx_sort_names(self, names): + e = self.settings().extra_customization + if len(names) < 2 or not e[self.OPT_SWAP_MEMORY]: + return names + main = names.get('main', None) + card = names.get('carda', None) + + if main is not None and card is not None: + names['main'] = card + names['carda'] = main + + return names + def post_open_callback(self): # The Tolino Vision only handles books inside the Books folder product_id, bcd = self.device_being_opened[1], self.device_being_opened[2]