mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Merge from trunk
This commit is contained in:
commit
7eddccd15f
@ -1,35 +1,229 @@
|
|||||||
body { background-color: white; }
|
body { background-color: white; }
|
||||||
|
|
||||||
|
/*
|
||||||
|
** The following rules apply principally to the line items shown in the
|
||||||
|
** Authors, Titles, Genres, Series, and Recently Added sections. Rules for the
|
||||||
|
** Descriptions section are grouped together later in the file.
|
||||||
|
** ------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
** <div> grouping an author's works together
|
||||||
|
** Used in Sections:
|
||||||
|
** Authors
|
||||||
|
**
|
||||||
|
** Minimize widows and orphans by logically grouping chunks
|
||||||
|
** Some reports of problems with Sony (ADE) ereaders
|
||||||
|
** ADE: page-break-inside:avoid;
|
||||||
|
** iBooks: display:inline-block;
|
||||||
|
** width:100%;
|
||||||
|
*/
|
||||||
|
div.author_logical_group {
|
||||||
|
page-break-inside:avoid;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Force page break when starting new initial letter
|
||||||
|
** Used in Sections:
|
||||||
|
** Authors
|
||||||
|
** Titles
|
||||||
|
*/
|
||||||
|
div.initial_letter {
|
||||||
|
page-break-before:always;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Author name
|
||||||
|
** Used in Sections:
|
||||||
|
** Authors
|
||||||
|
** Genres
|
||||||
|
** Recently Added
|
||||||
|
*/
|
||||||
|
p.author_index {
|
||||||
|
clear:both;
|
||||||
|
font-size:large;
|
||||||
|
font-weight:bold;
|
||||||
|
text-align:left;
|
||||||
|
margin-top:0.25px;
|
||||||
|
margin-bottom:-2px;
|
||||||
|
text-indent: 0em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Index letter
|
||||||
|
** Used in Sections:
|
||||||
|
** Authors
|
||||||
|
** Titles
|
||||||
|
*/
|
||||||
|
p.author_title_letter_index {
|
||||||
|
clear:both;
|
||||||
|
font-size:x-large;
|
||||||
|
text-align:center;
|
||||||
|
font-weight:bold;
|
||||||
|
margin-top:0px;
|
||||||
|
margin-bottom:0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Index letter
|
||||||
|
** Used in Sections:
|
||||||
|
** Series
|
||||||
|
*/
|
||||||
|
p.series_letter_index {
|
||||||
|
font-size:x-large;
|
||||||
|
text-align:center;
|
||||||
|
font-weight:bold;
|
||||||
|
margin-top:1em;
|
||||||
|
margin-bottom:0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Month-Year
|
||||||
|
** Used in Sections:
|
||||||
|
** Recently Added
|
||||||
|
*/
|
||||||
|
p.date_index {
|
||||||
|
clear:both;
|
||||||
|
font-size:x-large;
|
||||||
|
text-align:center;
|
||||||
|
font-weight:bold;
|
||||||
|
margin-top:1em;
|
||||||
|
margin-bottom:0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
p.date_read {
|
||||||
|
clear:both;
|
||||||
|
text-align:left;
|
||||||
|
margin-top:0px;
|
||||||
|
margin-bottom:0px;
|
||||||
|
margin-left:6em;
|
||||||
|
text-indent:-6em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Series name
|
||||||
|
** Used in Sections:
|
||||||
|
** Authors
|
||||||
|
** Series
|
||||||
|
** Genres
|
||||||
|
** Recently Added
|
||||||
|
** Optimized for ePub
|
||||||
|
*/
|
||||||
|
p.series {
|
||||||
|
clear:both;
|
||||||
|
font-style:italic;
|
||||||
|
margin-top:0.10em;
|
||||||
|
margin-bottom:0em;
|
||||||
|
margin-left:1.5em;
|
||||||
|
text-align:left;
|
||||||
|
text-indent:-1.25em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Series name
|
||||||
|
** Used in Sections:
|
||||||
|
** Authors
|
||||||
|
** Series
|
||||||
|
** Genres
|
||||||
|
** Recently Added
|
||||||
|
** Optimized for mobi
|
||||||
|
*/
|
||||||
|
p.series_mobi {
|
||||||
|
clear:both;
|
||||||
|
font-style:italic;
|
||||||
|
margin-top:0em;
|
||||||
|
margin-bottom:0em;
|
||||||
|
margin-left:0em;
|
||||||
|
text-align:left;
|
||||||
|
text-indent:-30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Section title
|
||||||
|
** Used in Sections:
|
||||||
|
** Authors
|
||||||
|
** Titles
|
||||||
|
** Series
|
||||||
|
** Genres
|
||||||
|
** Recently Added
|
||||||
|
** Descriptions
|
||||||
|
*/
|
||||||
|
p.title {
|
||||||
|
margin-top:0em;
|
||||||
|
margin-bottom:0em;
|
||||||
|
text-align:center;
|
||||||
|
font-style:italic;
|
||||||
|
font-size:xx-large;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Line item book listing
|
||||||
|
** Used in Sections:
|
||||||
|
** Authors
|
||||||
|
** Titles
|
||||||
|
** Series
|
||||||
|
** Genres
|
||||||
|
** Recently Added
|
||||||
|
*/
|
||||||
|
p.line_item {
|
||||||
|
clear: both;
|
||||||
|
font-family:monospace;
|
||||||
|
margin-top:0px;
|
||||||
|
margin-bottom:0px;
|
||||||
|
margin-left:2em;
|
||||||
|
text-align:left;
|
||||||
|
text-indent:-2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Prefix
|
||||||
|
** Used in Sections:
|
||||||
|
** Authors
|
||||||
|
** Titles
|
||||||
|
** Series
|
||||||
|
** Genres
|
||||||
|
** Recently Added
|
||||||
|
*/
|
||||||
|
span.prefix {
|
||||||
|
float:left;
|
||||||
|
margin-left: 0.25em;
|
||||||
|
text-align: left;
|
||||||
|
vertical-align: middle;
|
||||||
|
width: 1.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Book details entry
|
||||||
|
** Used in Sections:
|
||||||
|
** Authors
|
||||||
|
** Titles
|
||||||
|
** Series
|
||||||
|
** Genres
|
||||||
|
** Recently Added
|
||||||
|
*/
|
||||||
|
span.entry {
|
||||||
|
font-family: serif;
|
||||||
|
vertical-align:middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** The following rules apply to Descriptions
|
||||||
|
** -----------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Link to Series
|
||||||
|
*/
|
||||||
a.series_id {
|
a.series_id {
|
||||||
font-style:normal;
|
font-style:normal;
|
||||||
font-size:large;
|
font-size:large;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Minimize widows and orphans by logically grouping chunks
|
** Various dividers
|
||||||
* Some reports of problems with Sony (ADE) ereaders
|
|
||||||
* ADE: page-break-inside:avoid;
|
|
||||||
* iBooks: display:inline-block;
|
|
||||||
* width:100%;
|
|
||||||
*/
|
*/
|
||||||
div.author_logical_group {
|
|
||||||
page-break-inside:avoid;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.description > p:first-child {
|
|
||||||
margin: 0 0 0 0;
|
|
||||||
text-indent: 0em;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.description {
|
|
||||||
margin: 0 0 0 0;
|
|
||||||
text-indent: 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.initial_letter {
|
|
||||||
page-break-before:always;
|
|
||||||
}
|
|
||||||
|
|
||||||
hr.annotations_divider {
|
hr.annotations_divider {
|
||||||
width:50%;
|
width:50%;
|
||||||
margin-left:1em;
|
margin-left:1em;
|
||||||
@ -63,15 +257,11 @@ hr.merged_comments_divider {
|
|||||||
border-left: solid white 0px;
|
border-left: solid white 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
p.date_read {
|
/*
|
||||||
text-align:left;
|
** Author name
|
||||||
margin-top:0px;
|
*/
|
||||||
margin-bottom:0px;
|
|
||||||
margin-left:6em;
|
|
||||||
text-indent:-6em;
|
|
||||||
}
|
|
||||||
|
|
||||||
p.author {
|
p.author {
|
||||||
|
clear:both;
|
||||||
font-size:large;
|
font-size:large;
|
||||||
margin-top:0em;
|
margin-top:0em;
|
||||||
margin-bottom:0.1em;
|
margin-bottom:0.1em;
|
||||||
@ -79,31 +269,9 @@ p.author {
|
|||||||
text-indent: 0em;
|
text-indent: 0em;
|
||||||
}
|
}
|
||||||
|
|
||||||
p.author_index {
|
/*
|
||||||
font-size:large;
|
** Formats
|
||||||
font-weight:bold;
|
*/
|
||||||
text-align:left;
|
|
||||||
margin-top:0.25px;
|
|
||||||
margin-bottom:-2px;
|
|
||||||
text-indent: 0em;
|
|
||||||
}
|
|
||||||
|
|
||||||
p.author_title_letter_index {
|
|
||||||
font-size:x-large;
|
|
||||||
text-align:center;
|
|
||||||
font-weight:bold;
|
|
||||||
margin-top:0px;
|
|
||||||
margin-bottom:0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
p.date_index {
|
|
||||||
font-size:x-large;
|
|
||||||
text-align:center;
|
|
||||||
font-weight:bold;
|
|
||||||
margin-top:1em;
|
|
||||||
margin-bottom:0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
p.formats {
|
p.formats {
|
||||||
font-size:90%;
|
font-size:90%;
|
||||||
margin-top:0em;
|
margin-top:0em;
|
||||||
@ -112,6 +280,9 @@ p.formats {
|
|||||||
text-indent: 0.0in;
|
text-indent: 0.0in;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Genres
|
||||||
|
*/
|
||||||
p.genres {
|
p.genres {
|
||||||
font-style:normal;
|
font-style:normal;
|
||||||
margin-top:0.5em;
|
margin-top:0.5em;
|
||||||
@ -120,68 +291,55 @@ p.genres {
|
|||||||
text-indent: 0.0in;
|
text-indent: 0.0in;
|
||||||
}
|
}
|
||||||
|
|
||||||
p.series {
|
|
||||||
font-style:italic;
|
|
||||||
margin-top:0.10em;
|
|
||||||
margin-bottom:0em;
|
|
||||||
margin-left:2em;
|
|
||||||
text-align:left;
|
|
||||||
text-indent:-2em;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Series name
|
||||||
|
*/
|
||||||
p.series_id {
|
p.series_id {
|
||||||
margin-top:0em;
|
margin-top:0em;
|
||||||
margin-bottom:0em;
|
margin-bottom:0em;
|
||||||
text-align:center;
|
text-align:center;
|
||||||
}
|
}
|
||||||
|
|
||||||
p.series_letter_index {
|
|
||||||
font-size:x-large;
|
|
||||||
text-align:center;
|
|
||||||
font-weight:bold;
|
|
||||||
margin-top:1em;
|
|
||||||
margin-bottom:0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
p.title {
|
|
||||||
margin-top:0em;
|
|
||||||
margin-bottom:0em;
|
|
||||||
text-align:center;
|
|
||||||
font-style:italic;
|
|
||||||
font-size:xx-large;
|
|
||||||
}
|
|
||||||
|
|
||||||
p.wishlist_item, p.unread_book, p.read_book, p.line_item {
|
|
||||||
font-family:monospace;
|
|
||||||
margin-top:0px;
|
|
||||||
margin-bottom:0px;
|
|
||||||
margin-left:2em;
|
|
||||||
text-align:left;
|
|
||||||
text-indent:-2em;
|
|
||||||
}
|
|
||||||
|
|
||||||
span.prefix {}
|
|
||||||
span.entry {
|
|
||||||
font-family: serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Book Descriptions
|
** Publisher, Publication Date
|
||||||
*/
|
*/
|
||||||
td.publisher, td.date {
|
td.publisher, td.date {
|
||||||
font-weight:bold;
|
font-weight:bold;
|
||||||
text-align:center;
|
text-align:center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Rating
|
||||||
|
*/
|
||||||
td.rating{
|
td.rating{
|
||||||
text-align:center;
|
text-align:center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Additional notes
|
||||||
|
*/
|
||||||
td.notes {
|
td.notes {
|
||||||
font-size: 100%;
|
font-size: 100%;
|
||||||
text-align:center;
|
text-align:center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Thumbnail
|
||||||
|
*/
|
||||||
td.thumbnail img {
|
td.thumbnail img {
|
||||||
-webkit-box-shadow: 4px 4px 12px #999;
|
-webkit-box-shadow: 4px 4px 12px #999;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Comments
|
||||||
|
*/
|
||||||
|
div.description {
|
||||||
|
margin: 0 0 0 0;
|
||||||
|
text-indent: 1em;
|
||||||
|
}
|
||||||
|
div.description > p:first-child {
|
||||||
|
margin: 0 0 0 0;
|
||||||
|
text-indent: 0em;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -193,7 +193,11 @@ class PRST1(USBMS):
|
|||||||
|
|
||||||
time_offsets = {}
|
time_offsets = {}
|
||||||
for i, row in enumerate(cursor):
|
for i, row in enumerate(cursor):
|
||||||
comp_date = int(os.path.getmtime(self.normalize_path(prefix + row[0])) * 1000);
|
try:
|
||||||
|
comp_date = int(os.path.getmtime(self.normalize_path(prefix + row[0])) * 1000);
|
||||||
|
except (OSError, IOError):
|
||||||
|
# In case the db has incorrect path info
|
||||||
|
continue
|
||||||
device_date = int(row[1]);
|
device_date = int(row[1]);
|
||||||
offset = device_date - comp_date
|
offset = device_date - comp_date
|
||||||
time_offsets.setdefault(offset, 0)
|
time_offsets.setdefault(offset, 0)
|
||||||
|
@ -310,8 +310,18 @@ class MetadataSingleDialogBase(ResizableDialog):
|
|||||||
self.update_from_mi(mi)
|
self.update_from_mi(mi)
|
||||||
|
|
||||||
def cover_from_format(self, *args):
|
def cover_from_format(self, *args):
|
||||||
mi, ext = self.formats_manager.get_selected_format_metadata(self.db,
|
try:
|
||||||
self.book_id)
|
mi, ext = self.formats_manager.get_selected_format_metadata(self.db,
|
||||||
|
self.book_id)
|
||||||
|
except (IOError, OSError) as err:
|
||||||
|
if getattr(err, 'errno', None) == errno.EACCES: # Permission denied
|
||||||
|
import traceback
|
||||||
|
fname = err.filename if err.filename else 'file'
|
||||||
|
error_dialog(self, _('Permission denied'),
|
||||||
|
_('Could not open %s. Is it being used by another'
|
||||||
|
' program?')%fname, det_msg=traceback.format_exc(),
|
||||||
|
show=True)
|
||||||
|
return
|
||||||
if mi is None:
|
if mi is None:
|
||||||
return
|
return
|
||||||
cdata = None
|
cdata = None
|
||||||
|
@ -417,7 +417,7 @@ class EbookViewer(MainWindow, Ui_EbookViewer):
|
|||||||
vprefs.set('viewer_splitter_state',
|
vprefs.set('viewer_splitter_state',
|
||||||
bytearray(self.splitter.saveState()))
|
bytearray(self.splitter.saveState()))
|
||||||
vprefs['multiplier'] = self.view.multiplier
|
vprefs['multiplier'] = self.view.multiplier
|
||||||
vprefs['in_paged_mode1'] = not self.action_toggle_paged_mode.isChecked()
|
vprefs['in_paged_mode'] = not self.action_toggle_paged_mode.isChecked()
|
||||||
|
|
||||||
def restore_state(self):
|
def restore_state(self):
|
||||||
state = vprefs.get('viewer_toolbar_state', None)
|
state = vprefs.get('viewer_toolbar_state', None)
|
||||||
@ -434,8 +434,8 @@ class EbookViewer(MainWindow, Ui_EbookViewer):
|
|||||||
# specific location, ensure they are visible.
|
# specific location, ensure they are visible.
|
||||||
self.tool_bar.setVisible(True)
|
self.tool_bar.setVisible(True)
|
||||||
self.tool_bar2.setVisible(True)
|
self.tool_bar2.setVisible(True)
|
||||||
self.action_toggle_paged_mode.setChecked(not vprefs.get('in_paged_mode1',
|
self.action_toggle_paged_mode.setChecked(not vprefs.get('in_paged_mode',
|
||||||
False))
|
True))
|
||||||
self.toggle_paged_mode(self.action_toggle_paged_mode.isChecked(),
|
self.toggle_paged_mode(self.action_toggle_paged_mode.isChecked(),
|
||||||
at_start=True)
|
at_start=True)
|
||||||
|
|
||||||
|
@ -440,8 +440,7 @@ class KindlePage(QWizardPage, KindleUI):
|
|||||||
x = unicode(self.to_address.text()).strip()
|
x = unicode(self.to_address.text()).strip()
|
||||||
parts = x.split('@')
|
parts = x.split('@')
|
||||||
|
|
||||||
if (self.send_email_widget.set_email_settings(True) and len(parts) >= 2
|
if (len(parts) >= 2 and parts[0] and self.send_email_widget.set_email_settings(True)):
|
||||||
and parts[0]):
|
|
||||||
conf = smtp_prefs()
|
conf = smtp_prefs()
|
||||||
accounts = conf.parse().accounts
|
accounts = conf.parse().accounts
|
||||||
if not accounts: accounts = {}
|
if not accounts: accounts = {}
|
||||||
|
@ -1188,7 +1188,8 @@ Author '{0}':
|
|||||||
current_series = book['series']
|
current_series = book['series']
|
||||||
pSeriesTag = Tag(soup,'p')
|
pSeriesTag = Tag(soup,'p')
|
||||||
pSeriesTag['class'] = "series"
|
pSeriesTag['class'] = "series"
|
||||||
|
if self.opts.fmt == 'mobi':
|
||||||
|
pSeriesTag['class'] = "series_mobi"
|
||||||
if self.opts.generate_series:
|
if self.opts.generate_series:
|
||||||
aTag = Tag(soup,'a')
|
aTag = Tag(soup,'a')
|
||||||
aTag['href'] = "%s.html#%s" % ('BySeries',self.generateSeriesAnchor(book['series']))
|
aTag['href'] = "%s.html#%s" % ('BySeries',self.generateSeriesAnchor(book['series']))
|
||||||
@ -1330,6 +1331,8 @@ Author '{0}':
|
|||||||
current_series = new_entry['series']
|
current_series = new_entry['series']
|
||||||
pSeriesTag = Tag(soup,'p')
|
pSeriesTag = Tag(soup,'p')
|
||||||
pSeriesTag['class'] = "series"
|
pSeriesTag['class'] = "series"
|
||||||
|
if self.opts.fmt == 'mobi':
|
||||||
|
pSeriesTag['class'] = "series_mobi"
|
||||||
if self.opts.generate_series:
|
if self.opts.generate_series:
|
||||||
aTag = Tag(soup,'a')
|
aTag = Tag(soup,'a')
|
||||||
|
|
||||||
@ -1776,6 +1779,8 @@ Author '{0}':
|
|||||||
current_series = book['series']
|
current_series = book['series']
|
||||||
pSeriesTag = Tag(soup,'p')
|
pSeriesTag = Tag(soup,'p')
|
||||||
pSeriesTag['class'] = "series"
|
pSeriesTag['class'] = "series"
|
||||||
|
if self.opts.fmt == 'mobi':
|
||||||
|
pSeriesTag['class'] = "series_mobi"
|
||||||
aTag = Tag(soup, 'a')
|
aTag = Tag(soup, 'a')
|
||||||
aTag['id'] = self.generateSeriesAnchor(book['series'])
|
aTag['id'] = self.generateSeriesAnchor(book['series'])
|
||||||
pSeriesTag.insert(0,aTag)
|
pSeriesTag.insert(0,aTag)
|
||||||
@ -3343,11 +3348,17 @@ Author '{0}':
|
|||||||
return codeTag
|
return codeTag
|
||||||
else:
|
else:
|
||||||
spanTag = Tag(soup, "span")
|
spanTag = Tag(soup, "span")
|
||||||
#spanTag['class'] = "prefix"
|
spanTag['class'] = "prefix"
|
||||||
|
|
||||||
|
# color:white was the original technique used to align columns.
|
||||||
|
# The new technique is to float the prefix left with CSS.
|
||||||
if prefix_char is None:
|
if prefix_char is None:
|
||||||
spanTag['style'] = "color:white"
|
if True:
|
||||||
prefix_char = self.defaultPrefix
|
prefix_char = " "
|
||||||
#prefix_char = " "
|
else:
|
||||||
|
del spanTag['class']
|
||||||
|
spanTag['style'] = "color:white"
|
||||||
|
prefix_char = self.defaultPrefix
|
||||||
spanTag.insert(0,NavigableString(prefix_char))
|
spanTag.insert(0,NavigableString(prefix_char))
|
||||||
return spanTag
|
return spanTag
|
||||||
|
|
||||||
@ -3428,6 +3439,8 @@ Author '{0}':
|
|||||||
current_series = book['series']
|
current_series = book['series']
|
||||||
pSeriesTag = Tag(soup,'p')
|
pSeriesTag = Tag(soup,'p')
|
||||||
pSeriesTag['class'] = "series"
|
pSeriesTag['class'] = "series"
|
||||||
|
if self.opts.fmt == 'mobi':
|
||||||
|
pSeriesTag['class'] = "series_mobi"
|
||||||
if self.opts.generate_series:
|
if self.opts.generate_series:
|
||||||
aTag = Tag(soup,'a')
|
aTag = Tag(soup,'a')
|
||||||
aTag['href'] = "%s.html#%s" % ('BySeries', self.generateSeriesAnchor(book['series']))
|
aTag['href'] = "%s.html#%s" % ('BySeries', self.generateSeriesAnchor(book['series']))
|
||||||
@ -3773,7 +3786,6 @@ Author '{0}':
|
|||||||
else:
|
else:
|
||||||
return "%s_series" % re.sub('\W','',ascii_text(series)).lower()
|
return "%s_series" % re.sub('\W','',ascii_text(series)).lower()
|
||||||
|
|
||||||
|
|
||||||
def generateShortDescription(self, description, dest=None):
|
def generateShortDescription(self, description, dest=None):
|
||||||
# Truncate the description, on word boundaries if necessary
|
# Truncate the description, on word boundaries if necessary
|
||||||
# Possible destinations:
|
# Possible destinations:
|
||||||
|
@ -42,7 +42,7 @@ class Restore(Thread):
|
|||||||
self.src_library_path = os.path.abspath(library_path)
|
self.src_library_path = os.path.abspath(library_path)
|
||||||
self.progress_callback = progress_callback
|
self.progress_callback = progress_callback
|
||||||
self.db_id_regexp = re.compile(r'^.* \((\d+)\)$')
|
self.db_id_regexp = re.compile(r'^.* \((\d+)\)$')
|
||||||
self.bad_ext_pat = re.compile(r'[^a-z0-9]+')
|
self.bad_ext_pat = re.compile(r'[^a-z0-9_]+')
|
||||||
if not callable(self.progress_callback):
|
if not callable(self.progress_callback):
|
||||||
self.progress_callback = lambda x, y: x
|
self.progress_callback = lambda x, y: x
|
||||||
self.dirs = []
|
self.dirs = []
|
||||||
|
Loading…
x
Reference in New Issue
Block a user