good
This commit is contained in:
parent
5fec980fe2
commit
f456f4a4c2
7 changed files with 1168 additions and 7 deletions
|
|
@ -1 +1 @@
|
|||
{"access_token": "BQC40M9fig71EJWU6RTYqUk_84boT_i6nhGUxiGKoyWZRazN-FOX3yBF7LzPm212VtplWBlBPuF7LlkEBlT-p97pHefbHFF3dPAcye9jaP6HfGKBuwN2jPbEg15zNApse5-8nxKczAWce82uIeDodDUdMX7yWb3z-WzudBcSVTPXGprTcl1dEAOMb3TvOSBbY_9rlAPbMYWIImpWZdurccTf_ElrwNtjwjo3FqGPCy3AoQd0zJTU2rArgvpeYak4", "token_type": "Bearer", "expires_in": 3600, "scope": "user-library-read user-read-private playlist-read-private playlist-read-collaborative user-read-email", "expires_at": 1753733790, "refresh_token": "AQDmfQkPCGObfJeTUIbW1hAAwhSqkuHRA3Qh2dqVYMRh0eCkFMQgPNJDDzF8y-BiaVbj80zePkK_XSfYH1aJutMtNbnsqRKWuxP31BTrMc7pdUdbE7Fma4oH8wpDUKdG3MM"}
|
||||
{"access_token": "BQAGFYuFGcSZ2MXk4qaE7u41ZhYZ2_6EBIrkMAQTBHWVapuPZDvR-laSVBFyPp96cY8-eWl2v0mYJDd7A2MCzXb1hZ8XY3973NxpJOLTlI8MtTwl2IbV5ZPOkA21eVeJGdWAlF8mmU0NPqcBVh0KUzVtGGvaYO3foV2bdgd2gsBnUJYrAGQukwoZ_LVLEF-grSAqIyWE4vLGVawUOnZNTlT0JQtxi4f5gTS-GdJtqqHU-1bjqCkcXoer-p-ywrH_", "token_type": "Bearer", "expires_in": 3600, "scope": "user-library-read user-read-private playlist-read-private playlist-read-collaborative user-read-email", "expires_at": 1753738591, "refresh_token": "AQDmfQkPCGObfJeTUIbW1hAAwhSqkuHRA3Qh2dqVYMRh0eCkFMQgPNJDDzF8y-BiaVbj80zePkK_XSfYH1aJutMtNbnsqRKWuxP31BTrMc7pdUdbE7Fma4oH8wpDUKdG3MM"}
|
||||
1147
logs/app.log
1147
logs/app.log
File diff suppressed because it is too large
Load diff
5
main.py
5
main.py
|
|
@ -171,6 +171,11 @@ class MainWindow(QMainWindow):
|
|||
self.dashboard_page.data_provider.increment_completed_downloads
|
||||
)
|
||||
|
||||
# Connect sync activities to dashboard
|
||||
self.sync_page.sync_activity.connect(
|
||||
self.dashboard_page.add_activity_item
|
||||
)
|
||||
|
||||
self.stacked_widget.addWidget(self.dashboard_page)
|
||||
self.stacked_widget.addWidget(self.sync_page)
|
||||
self.stacked_widget.addWidget(self.downloads_page)
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
|
|
@ -955,11 +955,8 @@ class DashboardPage(QWidget):
|
|||
|
||||
def add_activity_item(self, icon: str, title: str, subtitle: str, time_ago: str = "Now"):
|
||||
"""Add new activity item to the feed"""
|
||||
print(f"[DEBUG] Adding activity: {title} - Current count: {self.activity_layout.count()}")
|
||||
|
||||
# Remove placeholder if it exists
|
||||
if self.has_placeholder:
|
||||
print("[DEBUG] Removing placeholder item")
|
||||
# Clear the entire layout
|
||||
while self.activity_layout.count():
|
||||
item = self.activity_layout.takeAt(0)
|
||||
|
|
@ -973,16 +970,13 @@ class DashboardPage(QWidget):
|
|||
separator.setFixedHeight(1)
|
||||
separator.setStyleSheet("background: #404040;")
|
||||
self.activity_layout.insertWidget(0, separator)
|
||||
print(f"[DEBUG] Added separator - Count now: {self.activity_layout.count()}")
|
||||
|
||||
# Add new activity item at the top
|
||||
new_item = ActivityItem(icon, title, subtitle, time_ago)
|
||||
self.activity_layout.insertWidget(0, new_item)
|
||||
print(f"[DEBUG] Added new item - Count now: {self.activity_layout.count()}")
|
||||
|
||||
# Limit to 5 most recent items (5 items + 4 separators = 9 total)
|
||||
while self.activity_layout.count() > 9:
|
||||
print(f"[DEBUG] Removing old item - Count: {self.activity_layout.count()}")
|
||||
item = self.activity_layout.takeAt(self.activity_layout.count() - 1)
|
||||
if item.widget():
|
||||
item.widget().deleteLater()
|
||||
|
|
|
|||
|
|
@ -1944,6 +1944,9 @@ class SyncOptionsPanel(QFrame):
|
|||
layout.addLayout(quality_layout)
|
||||
|
||||
class SyncPage(QWidget):
|
||||
# Signals for dashboard activity tracking
|
||||
sync_activity = pyqtSignal(str, str, str, str) # icon, title, subtitle, time
|
||||
|
||||
def __init__(self, spotify_client=None, plex_client=None, soulseek_client=None, downloads_page=None, parent=None):
|
||||
super().__init__(parent)
|
||||
self.spotify_client = spotify_client
|
||||
|
|
@ -2038,6 +2041,9 @@ class SyncPage(QWidget):
|
|||
# Store the worker
|
||||
self.active_sync_workers[playlist.id] = sync_worker
|
||||
|
||||
# Emit activity signal for sync start
|
||||
self.sync_activity.emit("🔄", "Sync Started", f"Syncing playlist '{playlist.name}'", "Now")
|
||||
|
||||
# Start the worker
|
||||
self.thread_pool.start(sync_worker)
|
||||
|
||||
|
|
@ -2335,6 +2341,11 @@ class SyncPage(QWidget):
|
|||
|
||||
# Pass the snapshot_id to the save function
|
||||
self._update_and_save_sync_status(playlist_id, result, snapshot_id)
|
||||
|
||||
# Emit activity signal for sync completion
|
||||
playlist_name = playlist_item.name if playlist_item else "Unknown Playlist"
|
||||
success_msg = f"Completed: {result.matched_tracks}/{result.total_tracks} tracks"
|
||||
self.sync_activity.emit("✅", "Sync Complete", f"'{playlist_name}' - {success_msg}", "Now")
|
||||
|
||||
# Continue sequential sync if in progress
|
||||
if self.is_sequential_syncing:
|
||||
|
|
@ -2370,6 +2381,10 @@ class SyncPage(QWidget):
|
|||
# Update any open modals
|
||||
self.update_open_modals_error(playlist_id, error_msg)
|
||||
|
||||
# Emit activity signal for sync error
|
||||
playlist_name = playlist_item.name if playlist_item else "Unknown Playlist"
|
||||
self.sync_activity.emit("❌", "Sync Failed", f"'{playlist_name}' - {error_msg}", "Now")
|
||||
|
||||
# Continue sequential sync if in progress (even on error)
|
||||
if self.is_sequential_syncing:
|
||||
self.process_next_in_sync_queue()
|
||||
|
|
|
|||
Loading…
Reference in a new issue