Nook2 driver: Dont put news in News subfolder

This commit is contained in:
Kovid Goyal 2011-06-14 17:29:01 -06:00
parent 8568887d36
commit 0552e5bda7
2 changed files with 6 additions and 1 deletions

View File

@ -88,6 +88,7 @@ class NOOK_COLOR(NOOK):
WINDOWS_MAIN_MEM = WINDOWS_CARD_A_MEM = 'EBOOK_DISK' WINDOWS_MAIN_MEM = WINDOWS_CARD_A_MEM = 'EBOOK_DISK'
EBOOK_DIR_MAIN = 'My Files' EBOOK_DIR_MAIN = 'My Files'
NEWS_IN_FOLDER = False
def upload_cover(self, path, filename, metadata, filepath): def upload_cover(self, path, filename, metadata, filepath):
pass pass

View File

@ -101,6 +101,9 @@ class Device(DeviceConfig, DevicePlugin):
#: The maximum length of paths created on the device #: The maximum length of paths created on the device
MAX_PATH_LEN = 250 MAX_PATH_LEN = 250
#: Put news in its own folder
NEWS_IN_FOLDER = True
def reset(self, key='-1', log_packets=False, report_progress=None, def reset(self, key='-1', log_packets=False, report_progress=None,
detected_device=None): detected_device=None):
self._main_prefix = self._card_a_prefix = self._card_b_prefix = None self._main_prefix = self._card_a_prefix = self._card_b_prefix = None
@ -946,6 +949,7 @@ class Device(DeviceConfig, DevicePlugin):
extra_components = [] extra_components = []
tag = special_tag tag = special_tag
if tag.startswith(_('News')): if tag.startswith(_('News')):
if self.NEWS_IN_FOLDER:
extra_components.append('News') extra_components.append('News')
else: else:
for c in tag.split('/'): for c in tag.split('/'):