From 9eb8b031d97e6432683952c3e7bdcdd2a8117b97 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 11 Jan 2011 11:14:19 -0700 Subject: [PATCH] Code to put downloaded news into the magazines category on the nook color. Commented out, pending testing --- src/calibre/devices/nook/driver.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/calibre/devices/nook/driver.py b/src/calibre/devices/nook/driver.py index 987b90c748..ca05885645 100644 --- a/src/calibre/devices/nook/driver.py +++ b/src/calibre/devices/nook/driver.py @@ -91,3 +91,19 @@ class NOOK_COLOR(NOOK): EBOOK_DIR_MAIN = 'My Files/Books' + ''' + def create_upload_path(self, path, mdata, fname, create_dirs=True): + filepath = NOOK.create_upload_path(self, path, mdata, fname, + create_dirs=create_dirs) + edm = self.EBOOK_DIR_MAIN.replace('/', os.sep) + npath = os.path.join(edm, _('News')) + os.sep + if npath in filepath: + filepath = filepath.replace(npath, os.sep.join('My Files', + 'Magazines')+os.sep) + filedir = os.path.dirname(filepath) + if create_dirs and not os.path.exists(filedir): + os.makedirs(filedir) + + return filepath + ''' +