diff --git a/ui/pages/__pycache__/artists.cpython-312.pyc b/ui/pages/__pycache__/artists.cpython-312.pyc index 92cbbc6b..f209d83e 100644 Binary files a/ui/pages/__pycache__/artists.cpython-312.pyc and b/ui/pages/__pycache__/artists.cpython-312.pyc differ diff --git a/ui/pages/__pycache__/downloads.cpython-312.pyc b/ui/pages/__pycache__/downloads.cpython-312.pyc index 274a03dc..8aff9a6a 100644 Binary files a/ui/pages/__pycache__/downloads.cpython-312.pyc and b/ui/pages/__pycache__/downloads.cpython-312.pyc differ diff --git a/ui/pages/__pycache__/sync.cpython-312.pyc b/ui/pages/__pycache__/sync.cpython-312.pyc index c7a90d14..d587bcb5 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/artists.py b/ui/pages/artists.py index d1f17337..e766a782 100644 --- a/ui/pages/artists.py +++ b/ui/pages/artists.py @@ -487,14 +487,31 @@ class PlexLibraryWorker(QThread): if self._stop_requested: return - # Search Plex for this combination + # Search Plex for this combination (cleaned artist) print(f" ๐Ÿ” Searching Plex: album='{album_name}', artist='{artist_clean}'") plex_albums = self.plex_client.search_albums(album_name, artist_clean, limit=5) print(f" ๐Ÿ“€ Found {len(plex_albums)} Plex albums") all_plex_matches.extend(plex_albums) - # Also try album-only search if artist+album didn't work - if not plex_albums and artist_clean: + # Backup search with original uncleaned artist name (for cases like "Tyler, The Creator") + if not plex_albums and artist and artist != artist_clean: + print(f" ๐Ÿ”„ Backup search with original artist: album='{album_name}', artist='{artist}'") + original_artist_results = self.plex_client.search_albums(album_name, artist, limit=5) + print(f" ๐Ÿ“€ Found {len(original_artist_results)} albums (original artist)") + all_plex_matches.extend(original_artist_results) + + # Additional fallback: remove commas (Tyler, The Creator -> Tyler The Creator) + if not original_artist_results and ',' in artist: + artist_no_comma = artist.replace(',', '').strip() + # Clean up multiple spaces that might result from comma removal + artist_no_comma = ' '.join(artist_no_comma.split()) + print(f" ๐Ÿ”„ Comma-removal fallback: album='{album_name}', artist='{artist_no_comma}'") + no_comma_results = self.plex_client.search_albums(album_name, artist_no_comma, limit=5) + print(f" ๐Ÿ“€ Found {len(no_comma_results)} albums (no comma)") + all_plex_matches.extend(no_comma_results) + + # Also try album-only search if no results from artist searches + if not all_plex_matches: # Only if we haven't found anything yet for this album print(f" ๐Ÿ” Trying album-only search: album='{album_name}'") album_only_results = self.plex_client.search_albums(album_name, "", limit=5) print(f" ๐Ÿ“€ Found {len(album_only_results)} albums (album-only)") diff --git a/ui/pages/downloads.py b/ui/pages/downloads.py index 838deb4e..8f08ae0d 100644 --- a/ui/pages/downloads.py +++ b/ui/pages/downloads.py @@ -7602,8 +7602,34 @@ class DownloadsPage(QWidget): counter += 1 new_file_path = f"{base} ({counter}){ext}" - print(f"๐Ÿ“‚ Copying file to: {new_file_path}") - shutil.copy2(original_file_path, new_file_path) + print(f"๐Ÿ“‚ Moving file to: {new_file_path}") + + # Verify source file exists before attempting move + if not os.path.exists(original_file_path): + print(f"โŒ Source file not found: {original_file_path}") + return None + + # Move the file (this will delete the original automatically) + shutil.move(original_file_path, new_file_path) + + # Verify the move was successful + if not os.path.exists(new_file_path): + print(f"โŒ File move failed - destination file not found: {new_file_path}") + return None + + if os.path.exists(original_file_path): + print(f"โš ๏ธ Warning: Original file still exists after move: {original_file_path}") + try: + os.remove(original_file_path) + print(f"๐Ÿ—‘๏ธ Cleaned up remaining original file") + except Exception as cleanup_error: + print(f"โš ๏ธ Could not remove original file: {cleanup_error}") + + print(f"๐Ÿงน File successfully moved and original cleaned up") + + # Clean up any empty directories left in the downloads folder + downloads_path = config_manager.get('soulseek.download_path', './Downloads') + self._cleanup_empty_directories(downloads_path, original_file_path) # Download cover art for both albums and singles if album_info and album_info['is_album']: diff --git a/ui/pages/sync.py b/ui/pages/sync.py index 18124b5d..1e5eef0d 100644 --- a/ui/pages/sync.py +++ b/ui/pages/sync.py @@ -1654,7 +1654,7 @@ class PlaylistItem(QFrame): } QPushButton:hover { background: #1ed760; - cursor: pointer; + } """) self.operation_status_button.clicked.connect(self.on_status_clicked)