diff --git a/journey_fm_app.py b/journey_fm_app.py index c7717e9..8e6ec8d 100644 --- a/journey_fm_app.py +++ b/journey_fm_app.py @@ -359,6 +359,13 @@ class MainWindow(QMainWindow): self.last_update_label.setText(f"Last update: {datetime.now().strftime('%Y-%m-%d %I:%M:%S %p')}") self.status_label.setText("Ready") + # Append result to log file + try: + with open('playlist_log.txt', 'a', encoding='utf-8') as f: + f.write(result + '\n') + except Exception as e: + print(f"Error writing to log: {e}") + # Refresh logs self.log_viewer.refresh_logs() @@ -386,6 +393,13 @@ class MainWindow(QMainWindow): """Handle automatic update completion""" self.last_update_label.setText(f"Last update: {datetime.now().strftime('%Y-%m-%d %I:%M:%S %p')}") + # Append result to log file + try: + with open('playlist_log.txt', 'a', encoding='utf-8') as f: + f.write(result + '\n') + except Exception as e: + print(f"Error writing to log: {e}") + # Refresh logs self.log_viewer.refresh_logs() diff --git a/run_app.bat b/run_app.bat index b209686..a627b2b 100644 --- a/run_app.bat +++ b/run_app.bat @@ -8,7 +8,5 @@ if exist .venv\Scripts\activate.bat ( call .venv\Scripts\activate.bat ) -REM Run the application -python journey_fm_app.py - -pause \ No newline at end of file +REM Run the application without console window +pythonw journey_fm_app.py \ No newline at end of file