diff --git a/.spotify_cache b/.spotify_cache index 383f97a1..574d8c8c 100644 --- a/.spotify_cache +++ b/.spotify_cache @@ -1 +1 @@ -{"access_token": "BQCLT_slOYLk3v2BHMORcGETcy_0zWC43NqlAHsNvKZg6YnGZwlW3U98evnFP_mlm-PRC5LjSZc39mtX9Z5ikNILw13_nCpCLAYD5Qh0ZP4tUtCwlbmkCyDrhnzFXRgv7BaiFhCmxz4QV63j1YMhgk_NM95Bg8cMy8_K7jcdgNP5ApVC6LXbhNK4ytYFhuicULb-fTbJna2DAmp37QduR9dc1LHazfFYGb7Um_fAYfo7CjipUhyFI54NH3zy32aQ", "token_type": "Bearer", "expires_in": 3600, "scope": "user-library-read user-read-private playlist-read-private playlist-read-collaborative user-read-email", "expires_at": 1753341652, "refresh_token": "AQDmfQkPCGObfJeTUIbW1hAAwhSqkuHRA3Qh2dqVYMRh0eCkFMQgPNJDDzF8y-BiaVbj80zePkK_XSfYH1aJutMtNbnsqRKWuxP31BTrMc7pdUdbE7Fma4oH8wpDUKdG3MM"} \ No newline at end of file +{"access_token": "BQDGsK2fscXEAxvJIN_UV90EdxRj6Ryw8Hd7V4UcU3WL_Xzu3zxajhXoq14ayJHNeWJd7-d8IlmhTbbrsQyQLePnxkLbd4EO9f7WSwVeena7ySVb5c67L9c4kjtXdZ_ZLWyI_SqjwRJSB_SH8Pg02mvEysnZOIdbtNmefpI0zQHmdhM431l7sffCtwEKr59-E4G_qaWfQCHX9L0OsLTZ-dXry6_mOKdE3PZEmEX51xNhpKhXMHZYGGua6jCUO2xq", "token_type": "Bearer", "expires_in": 3600, "scope": "user-library-read user-read-private playlist-read-private playlist-read-collaborative user-read-email", "expires_at": 1753383290, "refresh_token": "AQDmfQkPCGObfJeTUIbW1hAAwhSqkuHRA3Qh2dqVYMRh0eCkFMQgPNJDDzF8y-BiaVbj80zePkK_XSfYH1aJutMtNbnsqRKWuxP31BTrMc7pdUdbE7Fma4oH8wpDUKdG3MM"} \ No newline at end of file diff --git a/logs/app.log b/logs/app.log index 58eb02f1..72732832 100644 --- a/logs/app.log +++ b/logs/app.log @@ -446634,3 +446634,27 @@ 2025-07-23 23:20:52 - newmusic.main - INFO - change_page:163 - Changed to page: sync 2025-07-23 23:20:52 - newmusic.spotify_client - INFO - _ensure_user_id:195 - Successfully authenticated with Spotify as broquethomas 2025-07-23 23:20:52 - newmusic.spotify_client - INFO - get_user_playlists_metadata_only:256 - Retrieved 7 playlist metadata (first batch) +2025-07-24 10:54:48 - newmusic - INFO - setup_logging:57 - Logging initialized with level: DEBUG +2025-07-24 10:54:48 - newmusic.main - INFO - main:211 - Starting NewMusic application +2025-07-24 10:54:48 - newmusic.spotify_client - INFO - _setup_client:179 - Spotify client initialized (user info will be fetched when needed) +2025-07-24 10:54:48 - newmusic.soulseek_client - INFO - _setup_client:220 - Soulseek client configured with slskd at http://localhost:5030 +2025-07-24 10:54:48 - newmusic.spotify_client - INFO - _setup_client:179 - Spotify client initialized (user info will be fetched when needed) +2025-07-24 10:54:49 - newmusic.main - INFO - change_page:163 - Changed to page: dashboard +2025-07-24 10:54:49 - newmusic.main - INFO - setup_media_player_connections:150 - Media player connections established between sidebar and downloads page +2025-07-24 10:54:49 - newmusic.plex_client - INFO - _find_music_library:116 - Found music library: Music +2025-07-24 10:54:49 - newmusic.plex_client - INFO - _setup_client:102 - Successfully connected to Plex server: PLEX-MACHINE +2025-07-24 10:54:50 - newmusic.main - INFO - change_page:163 - Changed to page: sync +2025-07-24 10:54:50 - newmusic.spotify_client - INFO - _ensure_user_id:195 - Successfully authenticated with Spotify as broquethomas +2025-07-24 10:54:51 - newmusic.spotify_client - INFO - get_user_playlists_metadata_only:256 - Retrieved 7 playlist metadata (first batch) +2025-07-24 10:58:05 - newmusic - INFO - setup_logging:57 - Logging initialized with level: DEBUG +2025-07-24 10:58:05 - newmusic.main - INFO - main:211 - Starting NewMusic application +2025-07-24 10:58:05 - newmusic.spotify_client - INFO - _setup_client:179 - Spotify client initialized (user info will be fetched when needed) +2025-07-24 10:58:05 - newmusic.soulseek_client - INFO - _setup_client:220 - Soulseek client configured with slskd at http://localhost:5030 +2025-07-24 10:58:05 - newmusic.spotify_client - INFO - _setup_client:179 - Spotify client initialized (user info will be fetched when needed) +2025-07-24 10:58:06 - newmusic.main - INFO - change_page:163 - Changed to page: dashboard +2025-07-24 10:58:06 - newmusic.main - INFO - setup_media_player_connections:150 - Media player connections established between sidebar and downloads page +2025-07-24 10:58:06 - newmusic.plex_client - INFO - _find_music_library:116 - Found music library: Music +2025-07-24 10:58:06 - newmusic.plex_client - INFO - _setup_client:102 - Successfully connected to Plex server: PLEX-MACHINE +2025-07-24 10:58:07 - newmusic.main - INFO - change_page:163 - Changed to page: sync +2025-07-24 10:58:07 - newmusic.spotify_client - INFO - _ensure_user_id:195 - Successfully authenticated with Spotify as broquethomas +2025-07-24 10:58:07 - newmusic.spotify_client - INFO - get_user_playlists_metadata_only:256 - Retrieved 7 playlist metadata (first batch) diff --git a/ui/pages/__pycache__/sync.cpython-312.pyc b/ui/pages/__pycache__/sync.cpython-312.pyc index e222ab7d..55459e2c 100644 Binary files a/ui/pages/__pycache__/sync.cpython-312.pyc and b/ui/pages/__pycache__/sync.cpython-312.pyc differ diff --git a/ui/pages/sync.py b/ui/pages/sync.py index 74b6c5d9..c77c712c 100644 --- a/ui/pages/sync.py +++ b/ui/pages/sync.py @@ -811,9 +811,12 @@ class PlaylistDetailsModal(QDialog): playlist_item_widget.download_modal = modal - # --- FIX --- - # The call to on_download_process_started has been removed from here - # and moved to the modal's "Begin Search" button. + # --- FIX: Connect the cleanup signal immediately upon creation. --- + # This ensures that when the modal closes for any reason, the SyncPage + # is notified and can run its cleanup logic. + modal.process_finished.connect( + lambda: self.parent_page.on_download_process_finished(self.playlist.id) + ) self.accept() modal.show() @@ -2456,7 +2459,11 @@ class DownloadMissingTracksModal(QDialog): self.tracks_to_download_count = 0 self.downloaded_tracks_count = 0 self.analysis_complete = False + + # --- FIX: Initialize attributes to prevent crash on close --- self.download_in_progress = False + self.cancel_requested = False + self.permanently_failed_tracks = [] print(f"📊 Total tracks: {self.total_tracks}")