From ea91862370d3de136fa101d55f69214492935479 Mon Sep 17 00:00:00 2001 From: Blondel MONDESIR Date: Mon, 24 Jun 2024 03:04:43 -0400 Subject: [PATCH 1/2] Escape quotes to fix SyntaxError for RPI --- cps/tasks/metadata_extract.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cps/tasks/metadata_extract.py b/cps/tasks/metadata_extract.py index 2aabf1bf2..f5fbaba55 100644 --- a/cps/tasks/metadata_extract.py +++ b/cps/tasks/metadata_extract.py @@ -139,7 +139,8 @@ def _add_download_tasks_to_worker(self, requested_urls): shelf_url = re.sub(r"/meta(?=\?|$)", r"/shelf", self.original_url) + f"/{self.shelf_id}" self.message += f"

Shelf Title: {self.shelf_title}" if self.unavailable: - self.message += f"

Unavailable Video(s):
{'
'.join(f'{url}' for url in self.unavailable)}" + self.message += f"

Unavailable Video(s):
{'
'.join(f'{url}' for url in self.unavailable)}" + def run(self, worker_thread): self.worker_thread = worker_thread From df094a60e031847eb51eb144087d51919163c442 Mon Sep 17 00:00:00 2001 From: Blondel MONDESIR Date: Mon, 24 Jun 2024 08:39:47 -0400 Subject: [PATCH 2/2] Concatenate instead of using f-string --- cps/tasks/metadata_extract.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cps/tasks/metadata_extract.py b/cps/tasks/metadata_extract.py index f5fbaba55..5582ed4d8 100644 --- a/cps/tasks/metadata_extract.py +++ b/cps/tasks/metadata_extract.py @@ -139,8 +139,7 @@ def _add_download_tasks_to_worker(self, requested_urls): shelf_url = re.sub(r"/meta(?=\?|$)", r"/shelf", self.original_url) + f"/{self.shelf_id}" self.message += f"

Shelf Title: {self.shelf_title}" if self.unavailable: - self.message += f"

Unavailable Video(s):
{'
'.join(f'{url}' for url in self.unavailable)}" - + self.message += "

Unavailable Video(s):
" + "
".join(f'{url}' for url in self.unavailable) def run(self, worker_thread): self.worker_thread = worker_thread