Move main.py to ytsage/ and update imports

Renamed main.py to ytsage/main.py and updated relative imports to reflect the new module structure.
This commit is contained in:
oop7
2026-01-25 14:05:55 +02:00
parent 7efcfaa85b
commit ad5f304d4e
+34
View File
@@ -0,0 +1,34 @@
import sys
from PySide6.QtWidgets import QApplication, QMessageBox
from .utils.ytsage_logger import logger
from .gui.ytsage_gui_main import YTSageApp # Import the main application class from ytsage_gui_main
def show_error_dialog(message):
error_dialog = QMessageBox()
error_dialog.setIcon(QMessageBox.Icon.Critical)
error_dialog.setText("Application Error")
error_dialog.setInformativeText(message)
error_dialog.setWindowTitle("Error")
error_dialog.exec()
def main():
try:
logger.info("Starting YTSage application")
app = QApplication(sys.argv)
window = YTSageApp() # Instantiate the main application class
window.show()
logger.info("Application window shown, entering main loop")
sys.exit(app.exec())
except Exception as e:
logger.critical(f"Critical application error: {e}", exc_info=True)
show_error_dialog(f"Critical error: {e}")
sys.exit(1)
if __name__ == "__main__":
main()