mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
More miscellaneous fixes
This commit is contained in:
parent
7047b922a9
commit
92a1d8c4e7
@ -494,7 +494,7 @@ class DeviceGUI(object):
|
|||||||
full_metadata = self.library_view.model().get_metadata(
|
full_metadata = self.library_view.model().get_metadata(
|
||||||
rows, full_metadata=True)[-1]
|
rows, full_metadata=True)[-1]
|
||||||
files = self.library_view.model().get_preferred_formats(rows,
|
files = self.library_view.model().get_preferred_formats(rows,
|
||||||
fmts, paths=True, set_metadata=True)
|
fmts, paths=True, set_metadata=True)[0]
|
||||||
files = [getattr(f, 'name', None) for f in files]
|
files = [getattr(f, 'name', None) for f in files]
|
||||||
|
|
||||||
bad, remove_ids, jobnames = [], [], []
|
bad, remove_ids, jobnames = [], [], []
|
||||||
|
@ -723,9 +723,6 @@ class BooksView(TableView):
|
|||||||
|
|
||||||
def close(self):
|
def close(self):
|
||||||
self._model.close()
|
self._model.close()
|
||||||
|
|
||||||
def set_editable(self, editable):
|
|
||||||
self._model.set_editable(editable)
|
|
||||||
|
|
||||||
def set_editable(self, editable):
|
def set_editable(self, editable):
|
||||||
self._model.set_editable(editable)
|
self._model.set_editable(editable)
|
||||||
@ -1019,10 +1016,6 @@ class DeviceBooksModel(BooksModel):
|
|||||||
self.sort(col, self.sorted_on[1])
|
self.sort(col, self.sorted_on[1])
|
||||||
done = True
|
done = True
|
||||||
return done
|
return done
|
||||||
|
|
||||||
def set_editable(self, editable):
|
|
||||||
self.editable = editable
|
|
||||||
|
|
||||||
|
|
||||||
def set_editable(self, editable):
|
def set_editable(self, editable):
|
||||||
self.editable = editable
|
self.editable = editable
|
||||||
|
@ -200,17 +200,22 @@ class Main(MainWindow, Ui_MainWindow, DeviceGUI):
|
|||||||
self.delete_books)
|
self.delete_books)
|
||||||
QObject.connect(self.action_edit, SIGNAL("triggered(bool)"),
|
QObject.connect(self.action_edit, SIGNAL("triggered(bool)"),
|
||||||
self.edit_metadata)
|
self.edit_metadata)
|
||||||
|
self.__em1__ = partial(self.edit_metadata, bulk=False)
|
||||||
QObject.connect(md.actions()[0], SIGNAL('triggered(bool)'),
|
QObject.connect(md.actions()[0], SIGNAL('triggered(bool)'),
|
||||||
partial(self.edit_metadata, bulk=False))
|
self.__em1__)
|
||||||
|
self.__em2__ = partial(self.edit_metadata, bulk=True)
|
||||||
QObject.connect(md.actions()[2], SIGNAL('triggered(bool)'),
|
QObject.connect(md.actions()[2], SIGNAL('triggered(bool)'),
|
||||||
partial(self.edit_metadata, bulk=True))
|
self.__em2__)
|
||||||
|
self.__em3__ = partial(self.download_metadata, covers=True)
|
||||||
QObject.connect(md.actions()[4], SIGNAL('triggered(bool)'),
|
QObject.connect(md.actions()[4], SIGNAL('triggered(bool)'),
|
||||||
partial(self.download_metadata, covers=True))
|
self.__em3__)
|
||||||
|
self.__em4__ = partial(self.download_metadata, covers=False)
|
||||||
QObject.connect(md.actions()[5], SIGNAL('triggered(bool)'),
|
QObject.connect(md.actions()[5], SIGNAL('triggered(bool)'),
|
||||||
partial(self.download_metadata, covers=False))
|
self.__em4__)
|
||||||
|
self.__em5__ = partial(self.download_metadata, covers=True,
|
||||||
|
set_metadata=False)
|
||||||
QObject.connect(md.actions()[6], SIGNAL('triggered(bool)'),
|
QObject.connect(md.actions()[6], SIGNAL('triggered(bool)'),
|
||||||
partial(self.download_metadata, covers=True,
|
self.__em5__)
|
||||||
set_metadata=False))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -739,9 +744,10 @@ class Main(MainWindow, Ui_MainWindow, DeviceGUI):
|
|||||||
if not paths:
|
if not paths:
|
||||||
return
|
return
|
||||||
from calibre.gui2.add import Adder
|
from calibre.gui2.add import Adder
|
||||||
|
self.__adder_func = partial(self._files_added, on_card=on_card)
|
||||||
self._adder = Adder(self,
|
self._adder = Adder(self,
|
||||||
None if to_device else self.library_view.model().db,
|
None if to_device else self.library_view.model().db,
|
||||||
Dispatcher(partial(self._files_added, on_card=on_card)))
|
Dispatcher(self.__adder_func))
|
||||||
self._adder.add(paths)
|
self._adder.add(paths)
|
||||||
|
|
||||||
def _files_added(self, paths=[], names=[], infos=[], on_card=False):
|
def _files_added(self, paths=[], names=[], infos=[], on_card=False):
|
||||||
|
@ -176,8 +176,8 @@ class LocationModel(QAbstractListModel):
|
|||||||
_('Click to see the list of books on storage card B in your reader')
|
_('Click to see the list of books on storage card B in your reader')
|
||||||
]
|
]
|
||||||
|
|
||||||
def rowCount(self, parent):
|
def rowCount(self, *args):
|
||||||
return 1 + sum([1 for i in self.free if i >= 0])
|
return 1 + len([i for i in self.free if i >= 0])
|
||||||
|
|
||||||
def data(self, index, role):
|
def data(self, index, role):
|
||||||
row = index.row()
|
row = index.row()
|
||||||
|
@ -158,13 +158,14 @@ class BasicNewsRecipe(Recipe):
|
|||||||
|
|
||||||
#: Recipe specific options to control the conversion of the downloaded
|
#: Recipe specific options to control the conversion of the downloaded
|
||||||
#: content into an e-book. These will override any user or plugin specified
|
#: content into an e-book. These will override any user or plugin specified
|
||||||
#: values, so only use if absolutely necessary. For example:
|
#: values, so only use if absolutely necessary. For example::
|
||||||
#: conversion_options = {
|
#: conversion_options = {
|
||||||
#: 'base_font_size' : 16,
|
#: 'base_font_size' : 16,
|
||||||
#: 'tags' : 'mytag1,mytag2',
|
#: 'tags' : 'mytag1,mytag2',
|
||||||
#: 'title' : 'My Title',
|
#: 'title' : 'My Title',
|
||||||
#: 'linearize_tables' : True,
|
#: 'linearize_tables' : True,
|
||||||
#: }
|
#: }
|
||||||
|
#:
|
||||||
conversion_options = {}
|
conversion_options = {}
|
||||||
|
|
||||||
#: List of tags to be removed. Specified tags are removed from downloaded HTML.
|
#: List of tags to be removed. Specified tags are removed from downloaded HTML.
|
||||||
|
8
todo
8
todo
@ -1,16 +1,8 @@
|
|||||||
|
|
||||||
* Refactor web.fetch.simple to use per connection timeouts via the timeout kwarg for mechanize.open
|
* Refactor web.fetch.simple to use per connection timeouts via the timeout kwarg for mechanize.open
|
||||||
|
|
||||||
* Refactor IPC code to use communication logic from multiprocessing
|
|
||||||
|
|
||||||
* Rationalize books table. Add a pubdate column, remove the uri column (and associated support in add_books) and convert series_index to a float.
|
* Rationalize books table. Add a pubdate column, remove the uri column (and associated support in add_books) and convert series_index to a float.
|
||||||
|
|
||||||
* Replace single application stuff with Listener from multiprocessing
|
* Replace single application stuff with Listener from multiprocessing
|
||||||
|
|
||||||
* Refactor add books to use a separate process named calibre-worker-add
|
|
||||||
- Dont use the process for adding a single book
|
|
||||||
- Use a process pool for speed or multiple process for stability (20 per process?)
|
|
||||||
|
|
||||||
* Change mobi metadata setter to use author_sort setting from MOBI output plugin instead of mobi.py
|
|
||||||
|
|
||||||
* Fix HTML-to-ZIP plugin
|
* Fix HTML-to-ZIP plugin
|
||||||
|
Loading…
x
Reference in New Issue
Block a user