From bbc3219d31e16ca315234bb940953d02d9c94b7a Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Fri, 5 Jul 2024 19:15:59 +0200 Subject: [PATCH 1/4] Update lubimycztac metadata provider (fixes #3090) --- cps/metadata_provider/lubimyczytac.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/cps/metadata_provider/lubimyczytac.py b/cps/metadata_provider/lubimyczytac.py index 0f3081ec..02a96992 100644 --- a/cps/metadata_provider/lubimyczytac.py +++ b/cps/metadata_provider/lubimyczytac.py @@ -285,11 +285,13 @@ class LubimyCzytacParser: def _parse_tags(self) -> List[str]: tags = self._parse_xpath_node(xpath=LubimyCzytac.TAGS, take_first=False) - return [ - strip_accents(w.replace(", itd.", " itd.")) - for w in tags - if isinstance(w, str) - ] + if tags: + return [ + strip_accents(w.replace(", itd.", " itd.")) + for w in tags + if isinstance(w, str) + ] + return None def _parse_from_summary(self, attribute_name: str) -> Optional[str]: value = None From 53ba352ed9ae9a9115c42a7784fb931344ea8723 Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Fri, 5 Jul 2024 20:43:50 +0200 Subject: [PATCH 2/4] Improved some things in caliblur theme (hide back button) --- cps/static/js/caliBlur.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/cps/static/js/caliBlur.js b/cps/static/js/caliBlur.js index 89d47228..48bb26e6 100755 --- a/cps/static/js/caliBlur.js +++ b/cps/static/js/caliBlur.js @@ -125,6 +125,7 @@ if ($("body.book").length > 0) { $("#sendbtn").parent().addClass("sendBtn"); $("[id*=btnGroupDrop]").parent().addClass("downloadBtn"); $("read-in-browser").parent().addClass("readBtn"); + $("listen-in-browser").parent().addClass("listenBtn"); $(".downloadBtn button:first").addClass("download-text"); // Move all options in book details page to the same group @@ -138,21 +139,33 @@ if ($("body.book").length > 0) { .prependTo('[aria-label^="Download, send"]'); $("#have_read_cb") .after(''); + $("#have_read_form").next("p").remove(); + $("#have_read_form").next("p").remove(); $("#archived_cb") .after(''); $("#shelf-actions").prependTo('[aria-label^="Download, send"]'); + $(".more-stuff .col-sm-12 #back").hide() +/* .html("« Previous") + .addClass("page-link") + .removeClass("btn btn-default") + .prependTo('[aria-label^="Download, send"]');*/ // Move dropdown lists higher in dom, replace bootstrap toggle with own toggle. $('ul[aria-labelledby="read-in-browser"]').insertBefore(".blur-wrapper").addClass("readinbrowser-drop"); + $('ul[aria-labelledby="listen-in-browser"]').insertBefore(".blur-wrapper").addClass("readinbrowser-drop"); $('ul[aria-labelledby="send-to-kereader"]').insertBefore(".blur-wrapper").addClass("sendtoereader-drop"); $(".leramslist").insertBefore(".blur-wrapper"); $('ul[aria-labelledby="btnGroupDrop1"]').insertBefore(".blur-wrapper").addClass("leramslist"); $("#add-to-shelves").insertBefore(".blur-wrapper"); - + $("#back") $("#read-in-browser").click(function () { $(".readinbrowser-drop").toggle(); }); + $("#listen-in-browser").click(function () { + $(".readinbrowser-drop").toggle(); + }); + $(".downloadBtn").click(function () { $(".leramslist").toggle(); @@ -626,6 +639,7 @@ if ($("body.epub").length === 0) { } $("#read-in-browser a").attr("target", ""); +$("#listen-in-browser a").attr("target", ""); if ($(".edit-shelf-btn").length > 1) { $(".edit-shelf-btn:first").remove(); From e9bccc83c54a810078ff54dd157ddc5d8d4cd163 Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Sat, 6 Jul 2024 13:29:17 +0200 Subject: [PATCH 3/4] Version bump --- cps/constants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cps/constants.py b/cps/constants.py index e5836433..2a171ca5 100644 --- a/cps/constants.py +++ b/cps/constants.py @@ -175,7 +175,7 @@ BookMeta = namedtuple('BookMeta', 'file_path, extension, title, author, cover, d 'series_id, languages, publisher, pubdate, identifiers') # python build process likes to have x.y.zbw -> b for beta and w a counting number -STABLE_VERSION = {'version': '0.6.22b'} +STABLE_VERSION = {'version': '0.6.22'} NIGHTLY_VERSION = dict() NIGHTLY_VERSION[0] = '$Format:%H$' From c5f2323c8a33d6fc010d8d60d29c0ad2eb7de45c Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Sat, 6 Jul 2024 14:21:49 +0200 Subject: [PATCH 4/4] Version bump --- cps/constants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cps/constants.py b/cps/constants.py index 2a171ca5..13146845 100644 --- a/cps/constants.py +++ b/cps/constants.py @@ -175,7 +175,7 @@ BookMeta = namedtuple('BookMeta', 'file_path, extension, title, author, cover, d 'series_id, languages, publisher, pubdate, identifiers') # python build process likes to have x.y.zbw -> b for beta and w a counting number -STABLE_VERSION = {'version': '0.6.22'} +STABLE_VERSION = {'version': '0.6.23b'} NIGHTLY_VERSION = dict() NIGHTLY_VERSION[0] = '$Format:%H$'