diff --git a/src/classes/metrics.py b/src/classes/metrics.py index 1df45ef2d3..b103e72206 100644 --- a/src/classes/metrics.py +++ b/src/classes/metrics.py @@ -173,8 +173,6 @@ def send_metric(params): # Send metric HTTP data try: r = requests.get(url, headers={"user-agent": user_agent}) - log.info("Track metric: [%s] %s | (%s bytes)" % (r.status_code, r.url, len(r.content))) - except Exception: log.warning("Failed to track metric", exc_info=1) diff --git a/src/windows/main_window.py b/src/windows/main_window.py index 46f9ddb17d..94cd9c74ea 100644 --- a/src/windows/main_window.py +++ b/src/windows/main_window.py @@ -166,6 +166,12 @@ def closeEvent(self, event): # Stop threads self.StopSignal.emit() + # Stop thumbnail server thread + self.http_server_thread.kill() + + # Stop ZMQ polling thread + get_app().logger_libopenshot.kill() + # Process any queued events QCoreApplication.processEvents() @@ -2079,19 +2085,7 @@ def actionSimple_View_trigger(self): # Set initial size of docks simple_state = "".join([ - "AAAA/wAAAAD9AAAAAwAAAAAAAAEnAAAC3/wCAAAAA/wAAAJeAAAApwAAAAAA////+gAAAAACAAAAAfsAAAA" - "YAGQAbwBjAGsASwBlAHkAZgByAGEAbQBlAAAAAAD/////AAAAAAAAAAD7AAAAHABkAG8AYwBrAFAAcgBvAH" - "AAZQByAHQAaQBlAHMAAAAAJwAAAt8AAAChAP////sAAAAYAGQAbwBjAGsAVAB1AHQAbwByAGkAYQBsAgAAA" - "AAAAAAAAAAAyAAAAGQAAAABAAABHAAAAUD8AgAAAAH7AAAAGABkAG8AYwBrAEsAZQB5AGYAcgBhAG0AZQEA" - "AAFYAAAAFQAAAAAAAAAAAAAAAgAABEYAAALY/AEAAAAC/AAAAAAAAANnAAAA+gD////8AgAAAAL8AAAAJwA" - "AAcAAAACvAP////wBAAAAAvwAAAAAAAABFQAAAHsA////+gAAAAACAAAAA/sAAAASAGQAbwBjAGsARgBpAG" - "wAZQBzAQAAAAD/////AAAAkgD////7AAAAHgBkAG8AYwBrAFQAcgBhAG4AcwBpAHQAaQBvAG4AcwEAAAAA/" - "////wAAAJIA////+wAAABYAZABvAGMAawBFAGYAZgBlAGMAdABzAQAAAAD/////AAAAkgD////7AAAAEgBk" - "AG8AYwBrAFYAaQBkAGUAbwEAAAEbAAACTAAAAEcA////+wAAABgAZABvAGMAawBUAGkAbQBlAGwAaQBuAGU" - "BAAAB7QAAARIAAACWAP////wAAANtAAAA2QAAAIIA////+gAAAAECAAAAAvsAAAAiAGQAbwBjAGsAQwBhAH" - "AAdABpAG8AbgBFAGQAaQB0AG8AcgAAAAAA/////wAAAJgA////+wAAABQAZABvAGMAawBFAG0AbwBqAGkAc" - "wEAAADFAAACOgAAAJIA////AAAERgAAAAEAAAABAAAAAgAAAAEAAAAC/AAAAAEAAAACAAAAAQAAAA4AdABv" - "AG8AbABCAGEAcgEAAAAA/////wAAAAAAAAAA" + "AAAA/wAAAAD9AAAAAwAAAAAAAAEnAAAC3/wCAAAAA/wAAAJeAAAApwAAAAAA////+gAAAAACAAAAAfsAAAAYAGQAbwBjAGsASwBlAHkAZgByAGEAbQBlAAAAAAD/////AAAAAAAAAAD7AAAAHABkAG8AYwBrAFAAcgBvAHAAZQByAHQAaQBlAHMAAAAAJwAAAt8AAAChAP////sAAAAYAGQAbwBjAGsAVAB1AHQAbwByAGkAYQBsAgAABUQAAAF6AAABYAAAANwAAAABAAABHAAAAUD8AgAAAAH7AAAAGABkAG8AYwBrAEsAZQB5AGYAcgBhAG0AZQEAAAFYAAAAFQAAAAAAAAAAAAAAAgAABEYAAALC/AEAAAAC/AAAAAAAAARGAAAA+gD////8AgAAAAL8AAAAPQAAAa4AAACvAP////wBAAAAAvwAAAAAAAABwQAAAJcA////+gAAAAACAAAABPsAAAASAGQAbwBjAGsARgBpAGwAZQBzAQAAAAD/////AAAAkgD////7AAAAHgBkAG8AYwBrAFQAcgBhAG4AcwBpAHQAaQBvAG4AcwEAAAAA/////wAAAJIA////+wAAABYAZABvAGMAawBFAGYAZgBlAGMAdABzAQAAAAD/////AAAAkgD////7AAAAFABkAG8AYwBrAEUAbQBvAGoAaQBzAQAAAAD/////AAAAkgD////7AAAAEgBkAG8AYwBrAFYAaQBkAGUAbwEAAAHHAAACfwAAAEcA////+wAAABgAZABvAGMAawBUAGkAbQBlAGwAaQBuAGUBAAAB8QAAAQ4AAACWAP////sAAAAiAGQAbwBjAGsAQwBhAHAAdABpAG8AbgBFAGQAaQB0AG8AcgAAAANtAAAA2QAAAFgA////AAAERgAAAAEAAAABAAAAAgAAAAEAAAAC/AAAAAEAAAACAAAAAQAAAA4AdABvAG8AbABCAGEAcgEAAAAA/////wAAAAAAAAAA" ]) self.restoreState(qt_types.str_to_bytes(simple_state)) QCoreApplication.processEvents() @@ -2633,7 +2627,6 @@ def clearSelections(self): def foundCurrentVersion(self, version): """Handle the callback for detecting the current version on openshot.org""" - log.info('foundCurrentVersion: Found the latest version: %s' % version) _ = get_app()._tr # Compare versions (alphabetical compare of version strings should work fine) @@ -2654,6 +2647,10 @@ def foundCurrentVersion(self, version): updateButton.setToolButtonStyle(Qt.ToolButtonTextBesideIcon) self.toolBar.addWidget(updateButton) + # Initialize sentry exception tracing (now that we know the current version) + from classes import sentry + sentry.init_tracing() + def moveEvent(self, event): """ Move tutorial dialogs also (if any)""" QMainWindow.moveEvent(self, event) @@ -2823,17 +2820,25 @@ def __init__(self, *args, mode=None): # Set unique install id (if blank) if not s.get("unique_install_id"): + # This is assumed to be the 1st launch s.set("unique_install_id", str(uuid4())) # Track 1st launch metric track_metric_screen("initial-launch-screen") + # Track 1st main screen + track_metric_screen("main-screen") + + # Opt-out of metrics tracking on 1st launch (and prompt user) + track_metric_screen("metrics-opt-out") + s.set("send_metrics", False) + else: + # Only track main screen + track_metric_screen("main-screen") + # Set unique id for Sentry sentry.set_user({"id": s.get("unique_install_id")}) - # Track main screen - track_metric_screen("main-screen") - # Create blank tutorial manager self.tutorial_manager = None