Add new settings

This commit is contained in:
2024-03-08 22:38:18 +08:00
parent ccb19875ca
commit c0568543a5
5 changed files with 43 additions and 1 deletions

View File

@@ -21,6 +21,8 @@ class Config:
self._data['type'] = 'epub,txt'
self._data['export_book_template'] = 'exported/<book_name> - <author_name>.<ext>' # noqa: E501
self._data['export_chapter_template'] = 'exported/<book_id>/<chapter_id>.txt' # noqa: E501
self._data['export_nodownload'] = True
self._data['img_cache_dir'] = 'img_cache'
self._data['page_size'] = 10
self.save()
@@ -72,6 +74,10 @@ class Config:
def export_epub(self):
return self.export_type.find('epub') >= 0
@cached_property
def export_nodownload(self):
return self.get_arg('export_nodownload', True)
@cached_property
def export_txt(self):
return self.export_type.find('txt') >= 0