Merge branch 'master' into Develop

# Conflicts:
#	cps/web.py
#	test/Calibre-Web TestSummary_Linux.html
This commit is contained in:
Ozzie Isaacs
2023-02-21 17:03:54 +01:00
4 changed files with 15 additions and 8 deletions
+1 -1
View File
@@ -149,7 +149,7 @@ class TaskBackupMetadata(CalibreTask):
package.set("unique-identifier", "uuid_id")
package.set("version", "2.0")
# generate metadata element and all subelements of it
# generate metadata element and all sub elements of it
metadata = etree.SubElement(package, "metadata", nsmap=NSMAP)
identifier = etree.SubElement(metadata, PURL + "identifier", id="calibre_id", nsmap=NSMAP)
identifier.set(OPF + "scheme", "calibre")
+4 -3
View File
@@ -43,16 +43,17 @@
<title>{{entry.Books.title}}</title>
<id>urn:uuid:{{entry.Books.uuid}}</id>
<updated>{{entry.Books.atom_timestamp}}</updated>
{% if entry.Books.authors.__len__() > 0 %}
{% for author in entry.Books.authors %}
<author>
<name>{{entry.Books.authors[0].name}}</name>
<name>{{author.name}}</name>
</author>
{% endif %}
{% endfor %}
{% if entry.Books.publishers.__len__() > 0 %}
<publisher>
<name>{{entry.Books.publishers[0].name}}</name>
</publisher>
{% endif %}
<published>{{entry.Books.pubdate.strftime("%Y-%m-%dT%H:%M:%S+00:00")}}</published>
{% for lang in entry.Books.languages %}
<dcterms:language>{{lang.lang_code}}</dcterms:language>
{% endfor %}
+4 -4
View File
@@ -1411,10 +1411,10 @@ def change_profile(kobo_support, local_oauth_check, oauth_status, translations,
current_user.random_books = 0
try:
if current_user.role_passwd() or current_user.role_admin():
if to_save.get('password', "") != "":
current_user.password = generate_password_hash(valid_password(to_save.get("password", "")))
if to_save.get("eReader_mail", current_user.kindle_mail) != current_user.kindle_mail:
current_user.kindle_mail = valid_email(to_save.get("eReader_mail"))
if to_save.get("password", "") != "":
current_user.password = generate_password_hash(to_save.get("password"))
if to_save.get("kindle_mail", current_user.kindle_mail) != current_user.kindle_mail:
current_user.kindle_mail = valid_email(to_save.get("kindle_mail"))
new_email = valid_email(to_save.get("email", current_user.email))
if not new_email:
raise Exception(_("Email can't be empty and has to be a valid Email"))