diff --git a/src/libprs500/gui2/dialogs/lrf_single.py b/src/libprs500/gui2/dialogs/lrf_single.py
index e376e0c5f7..73675e3d12 100644
--- a/src/libprs500/gui2/dialogs/lrf_single.py
+++ b/src/libprs500/gui2/dialogs/lrf_single.py
@@ -71,7 +71,7 @@ class LRFSingleDialog(QDialog, Ui_LRFSingleDialog):
except ValueError:
pass
if not formats:
- d = error_dialog(window, 'No available formats', 'Cannot convert as this book has no available formats')
+ d = error_dialog(window, 'No available formats', 'Cannot convert %s as this book has no supported formats'%(self.gui_title.text()))
d.exec_()
if len(formats) > 1:
@@ -79,7 +79,7 @@ class LRFSingleDialog(QDialog, Ui_LRFSingleDialog):
d.exec_()
if d.result() == QDialog.Accepted:
self.selected_format = d.format()
- else:
+ elif len(formats) > 0:
self.selected_format = formats[0]
if self.selected_format:
diff --git a/src/libprs500/gui2/dialogs/metadata_bulk.py b/src/libprs500/gui2/dialogs/metadata_bulk.py
index c8fdd82d94..5a497fff56 100644
--- a/src/libprs500/gui2/dialogs/metadata_bulk.py
+++ b/src/libprs500/gui2/dialogs/metadata_bulk.py
@@ -53,6 +53,9 @@ class MetadataBulkDialog(QDialog, Ui_MetadataBulkDialog):
if au:
au = au.split(',')
self.db.set_authors(id, au)
+ aus = qstring_to_unicode(self.author_sort.text())
+ if aus:
+ self.db.set_author_sort(id, aus)
if self.write_rating:
self.db.set_rating(id, 2*self.rating.value())
pub = qstring_to_unicode(self.publisher.text())
diff --git a/src/libprs500/gui2/dialogs/metadata_bulk.ui b/src/libprs500/gui2/dialogs/metadata_bulk.ui
index 64c5366198..0e2f57f3cf 100644
--- a/src/libprs500/gui2/dialogs/metadata_bulk.ui
+++ b/src/libprs500/gui2/dialogs/metadata_bulk.ui
@@ -44,25 +44,57 @@
Meta information
-
- 9
-
-
- 9
-
-
- 9
-
-
- 9
-
-
- 6
-
-
- 6
-
- -
+
-
+
+
+ &Author(s):
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ authors
+
+
+
+ -
+
+
+ Change the author(s) of this book. Multiple authors should be separated by a comma
+
+
+
+ -
+
+
+ Author S&ort:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ authors
+
+
+
+ -
+
+
+ Specify how the author(s) of this book should be sorted. For example Charles Dickens should be sorted as Dickens, Charles.
+
+
+
+ -
+
+
+ &Rating:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
Rating of this book. 0-5 stars
@@ -81,23 +113,6 @@
- -
-
-
- &Rating:
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
-
- -
-
-
- Change the publisher of this book
-
-
-
-
@@ -111,6 +126,13 @@
+ -
+
+
+ Change the publisher of this book
+
+
+
-
@@ -124,52 +146,13 @@
- -
+
-
Tags categorize the book. This is particularly useful while searching. <br><br>They can be any words or phrases, separated by commas.
- -
-
-
- Change the author(s) of this book. Multiple authors should be separated by a comma
-
-
-
- -
-
-
- &Author(s):
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
- authors
-
-
-
- -
-
-
- List of known series. You can add new series.
-
-
- List of known series. You can add new series.
-
-
- true
-
-
- QComboBox::InsertAlphabetically
-
-
- QComboBox::AdjustToContents
-
-
-
-
@@ -186,6 +169,25 @@
+ -
+
+
+ List of known series. You can add new series.
+
+
+ List of known series. You can add new series.
+
+
+ true
+
+
+ QComboBox::InsertAlphabetically
+
+
+ QComboBox::AdjustToContents
+
+
+
diff --git a/src/libprs500/gui2/dialogs/metadata_single.py b/src/libprs500/gui2/dialogs/metadata_single.py
index 526dd28963..682a4408f4 100644
--- a/src/libprs500/gui2/dialogs/metadata_single.py
+++ b/src/libprs500/gui2/dialogs/metadata_single.py
@@ -141,6 +141,8 @@ class MetadataSingleDialog(QDialog, Ui_MetadataSingleDialog):
self.title.setText(db.title(row))
au = self.db.authors(row)
self.authors.setText(au if au else '')
+ aus = self.db.author_sort(row)
+ self.author_sort.setText(aus)
pub = self.db.publisher(row)
self.publisher.setText(pub if pub else '')
tags = self.db.tags(row)
@@ -199,6 +201,9 @@ class MetadataSingleDialog(QDialog, Ui_MetadataSingleDialog):
self.db.set_title(self.id, title)
au = qstring_to_unicode(self.authors.text()).split(',')
if au: self.db.set_authors(self.id, au)
+ aus = qstring_to_unicode(self.author_sort.text())
+ if aus:
+ self.db.set_author_sort(self.id, aus)
self.db.set_rating(self.id, 2*self.rating.value())
self.db.set_publisher(self.id, qstring_to_unicode(self.publisher.text()))
self.db.set_tags(self.id, qstring_to_unicode(self.tags.text()).split(','))
diff --git a/src/libprs500/gui2/dialogs/metadata_single.ui b/src/libprs500/gui2/dialogs/metadata_single.ui
index 0875c026a1..47e62a1c26 100644
--- a/src/libprs500/gui2/dialogs/metadata_single.ui
+++ b/src/libprs500/gui2/dialogs/metadata_single.ui
@@ -21,124 +21,28 @@
Qt::Horizontal
-
+
-
- 6
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
-
Meta information
-
- 9
-
-
- 9
-
-
- 9
-
-
- 9
-
-
- 6
-
-
- 6
-
-
-
-
-
- Rating of this book. 0-5 stars
-
-
- Rating of this book. 0-5 stars
-
-
- QAbstractSpinBox::PlusMinus
-
-
- stars
-
-
- 5
-
-
-
- -
-
+
-
+
- &Rating:
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
-
- -
-
-
- Change the publisher of this book
-
-
-
- -
-
-
- &Publisher:
+ &Title:
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
- publisher
+ title
- -
-
-
- Ta&gs:
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
- tags
-
-
-
- -
-
-
- Tags categorize the book. This is particularly useful while searching. <br><br>They can be any words or phrases, separated by commas.
-
-
-
- -
-
-
- Change the author(s) of this book. Multiple authors should be separated by a comma
-
-
-
- -
+
-
Change the title of this book
@@ -158,20 +62,119 @@
- -
-
+
-
+
+
+ Change the author(s) of this book. Multiple authors should be separated by a comma
+
+
+
+ -
+
- &Title:
+ Author S&ort:
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
- title
+ authors
- -
+
-
+
+
+ Specify how the author(s) of this book should be sorted. For example Charles Dickens should be sorted as Dickens, Charles.
+
+
+
+ -
+
+
+ &Rating:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+ Rating of this book. 0-5 stars
+
+
+ Rating of this book. 0-5 stars
+
+
+ QAbstractSpinBox::PlusMinus
+
+
+ stars
+
+
+ 5
+
+
+
+ -
+
+
+ &Publisher:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ publisher
+
+
+
+ -
+
+
+ Change the publisher of this book
+
+
+
+ -
+
+
+ Ta&gs:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ tags
+
+
+
+ -
+
+
+ Tags categorize the book. This is particularly useful while searching. <br><br>They can be any words or phrases, separated by commas.
+
+
+
+ -
+
+
+ &Series:
+
+
+ Qt::PlainText
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ series
+
+
+
+ -
List of known series. You can add new series.
@@ -190,23 +193,7 @@
- -
-
-
- &Series:
-
-
- Qt::PlainText
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
- series
-
-
-
- -
+
-
false