File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3434 ConfigLoadFailure ,
3535 ConfigRegistry ,
3636)
37+ from dvr_scan .platform import open_path
3738from dvr_scan .scanner import OutputMode , Point
38- from dvr_scan .shared import ScanSettings
39+ from dvr_scan .shared import ScanSettings , logfile_path
3940from dvr_scan .subtractor import SubtractorCudaMOG2
4041from dvr_scan .video_joiner import BackendUnavailable
4142
@@ -1366,13 +1367,18 @@ def _create_menubar(self):
13661367 underline = 0 ,
13671368 )
13681369 help_menu .add_command (
1369- label = "Join Discord Chat " ,
1370+ label = "Open Discord" ,
13701371 command = lambda : webbrowser .open_new_tab ("https://discord.gg/69kf6f2Exb" ),
13711372 underline = 5 ,
13721373 )
1374+ help_menu .add_separator ()
1375+ help_menu .add_command (
1376+ label = "Open Logs" ,
1377+ command = lambda : open_path (logfile_path ("dvr-scan.log" ).parent ),
1378+ underline = 5 ,
1379+ )
13731380 # TODO: Add window to show log messages and copy them to clipboard or save to a logfile.
13741381 # help_menu.add_command(label="Debug Log", underline=0, state=tk.DISABLED)
1375- help_menu .add_separator ()
13761382
13771383 help_menu .add_command (
13781384 label = "About DVR-Scan" ,
Original file line number Diff line number Diff line change 6161)
6262
6363
64+ def open_path (path : str ):
65+ """Open a path in the default file explorer."""
66+ if platform .system () == "Windows" :
67+ os .startfile (path )
68+ elif platform .system () == "Darwin" :
69+ subprocess .run (["open" , path ], check = True )
70+ else :
71+ subprocess .run (["xdg-open" , path ], check = True )
72+
73+
6474def get_min_screen_bounds ():
6575 """Attempts to get the minimum screen resolution of all monitors using the `screeninfo` package.
6676 Returns the minimum of all monitor's heights and widths with 10% padding, or None if the package
You can’t perform that action at this time.
0 commit comments