Skip to content

Commit

Permalink
added conditional .exe extension if running on windows, no extension …
Browse files Browse the repository at this point in the history
…by default for ffmpeg binary
  • Loading branch information
andrei-g99 committed Oct 20, 2024
1 parent 00fa69a commit 4e4abbe
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from tkinter import font
from tkinter import ttk
import sys
import os
from tkinter import messagebox
from tubecut.commands import _download_video, _trim_video

Expand All @@ -13,15 +14,19 @@
current_dir = Path(__file__).parent


ffmpeg_path = current_dir / 'bin' / 'ffmpeg.exe'
ffmpeg_path = current_dir / 'bin' / 'ffmpeg'

# Add .exe extension if running on Windows
if os.name == 'nt': # 'nt' is for Windows
ffmpeg_path = current_dir / 'bin' / 'ffmpeg.exe'

root = tk.Tk()
root.title("TubeCut")
screen_width = root.winfo_screenwidth()
screen_height = root.winfo_screenheight()

window_width = int(screen_width * 0.4)
window_height = int(screen_height * 0.3)
window_width = int(screen_width * 0.6)
window_height = int(screen_height * 0.5)

root.geometry(f"{window_width}x{window_height}")

Expand Down

0 comments on commit 4e4abbe

Please sign in to comment.