Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax issues on v2025.1.24 #156

Open
nxjosephofficial opened this issue Feb 4, 2025 · 0 comments · May be fixed by #157
Open

Syntax issues on v2025.1.24 #156

nxjosephofficial opened this issue Feb 4, 2025 · 0 comments · May be fixed by #157

Comments

@nxjosephofficial
Copy link

nxjosephofficial commented Feb 4, 2025

Hi. I want to port this program to FreeBSD platform and already did (waiting for FreeBSD committer check to put it in repository) but I had to fix some syntax issues by creating two patch files, after that, Varia launched fine without throwing syntax errors on terminal output.

These are my patch files fixing the syntax errors. I may open a PR about it.

Thanks in advance.

Kind regards,

Yusuf.

--- src/download/thread.py.orig	2025-02-04 16:32:56 UTC
+++ src/download/thread.py
@@ -215,7 +215,7 @@ class DownloadThread(threading.Thread):
                     self.video_stop_event.clear()
                     self.cancelled = True
                 except Exception as e:
-                    GLib.idle_add(self.speed_label.set_text, f"{_("An error occurred:")} {self.app.escape_special_characters(str(e))}")
+                    GLib.idle_add(self.speed_label.set_text, f'{_("An error occurred:")} {self.app.escape_special_characters(str(e))}')
                     self.video_stop_event.clear()
                     self.cancelled = True
                     GLib.idle_add(self.set_failed, None)
@@ -603,4 +603,4 @@ class DownloadThread(threading.Thread):
 
         self.stop(False)
         GLib.idle_add(self.pause_button.set_visible, False)
-        self.app.filter_download_list("no", self.app.applied_filter)
\ No newline at end of file
+        self.app.filter_download_list("no", self.app.applied_filter)

--- src/download/videos.py.orig	2025-02-04 16:49:29 UTC
+++ src/download/videos.py
@@ -312,8 +312,8 @@ def on_video_clicked(button, self, entry):
         else:
             # Show error dialog if something went wrong
             error_body = (
-                f"{_("An error occurred:")}\n\n"
-                f"{_("The video platform may not be supported or you may be being blocked by the platform. If you have an active VPN connection that might be the cause, or you can try importing your browser's cookies through a cookies.txt file.")}\n\n\n"
+                f'{_("An error occurred:")}\n\n'
+                f'{_("The video platform may not be supported or you may be being blocked by the platform. If you have an active VPN connection that might be the cause, or you can try importing your browsers cookies through a cookies.txt file.")}\n\n\n'
                 "────────────────────────────\n\n\n"
                 f"{self.escape_special_characters(ytdlp_error)}"
             )
@@ -370,4 +370,4 @@ def on_video_option_download_clicked(self, prefswindow
         else:
             break
 
-    on_download_clicked(None, self, url, filename, None, "video", video_options, False, self.appconf["download_directory"])
\ No newline at end of file
+    on_download_clicked(None, self, url, filename, None, "video", video_options, False, self.appconf["download_directory"])

@nxjosephofficial nxjosephofficial linked a pull request Feb 4, 2025 that will close this issue
@nxjosephofficial nxjosephofficial changed the title Syntax issues Syntax issues on v2025.1.24 Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant