LDownloader/main.py

31 lines
956 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"""LDownloader v3 — Video & Ses İndirici Ana Başlatıcı"""
import os
import sys
root_dir = os.path.dirname(os.path.abspath(__file__))
if root_dir not in sys.path:
sys.path.insert(0, root_dir)
if __name__ == "__main__":
try:
from ui.app import main
main()
except Exception as ex:
import traceback
log_path = "crash.log"
try:
from core.config import get_data_dir
log_path = os.path.join(get_data_dir(), "crash.log")
with open(log_path, "w", encoding="utf-8") as f:
traceback.print_exc(file=f)
except Exception:
pass
import tkinter as tk
from tkinter import messagebox
root = tk.Tk()
root.withdraw()
messagebox.showerror(
"LDownloader Başlatma Hatası",
f"Uygulama başlatılırken bir hata oluştu:\n\n{ex}\n\nDetaylar: {log_path}"
)
sys.exit(1)