Fix popularity stats to use upload data instead of download data

- Change popularity stats to analyze upload records (Direction = 'Upload')
- This shows which of your shared files are most downloaded by others
- Update error messages and explanations to reflect upload-based analysis
- Remove "NEW" labels from README features
- Clarify that popularity shows download frequency of your uploads
This commit is contained in:
Alec
2025-09-03 10:53:43 +02:00
parent 7ebb1372f4
commit 9c0a4e0ff2
2 changed files with 8 additions and 7 deletions
+4 -3
View File
@@ -12,7 +12,7 @@ A GUI tool to analyze upload and download statistics from your slskd transfers d
- Lists top users by data transferred - Lists top users by data transferred
- Shows statistics by file type - Shows statistics by file type
- Filter statistics by time period (All time, Last month, Last year) - Filter statistics by time period (All time, Last month, Last year)
- **NEW**: Artist and album popularity statistics based on user download demand - Artist and album popularity statistics based on download frequency of your uploads
- Smart path parsing with enhanced library structure detection - Smart path parsing with enhanced library structure detection
- Intelligent album name cleaning (removes redundant artist names from folder names) - Intelligent album name cleaning (removes redundant artist names from folder names)
- User-friendly graphical interface with summary and detailed tables - User-friendly graphical interface with summary and detailed tables
@@ -43,8 +43,8 @@ With the GUI, you can:
- Set the number of top entries to display - Set the number of top entries to display
- View upload and download statistics side-by-side - View upload and download statistics side-by-side
- See summary statistics and detailed tables for users and file types - See summary statistics and detailed tables for users and file types
- **NEW**: Visual time series graphs showing transfer trends over time - Visual time series graphs showing transfer trends over time
- **NEW**: Analyze artist and album popularity based on download demand with interactive charts and tables - Analyze artist and album popularity based on how often others download your files with interactive charts and tables
## Screenshots ## Screenshots
@@ -63,6 +63,7 @@ This tool automatically detects and works with both:
- **Old format**: Text-based `State` column - **Old format**: Text-based `State` column
- **New format**: Integer `State` + `StateDescription` columns - **New format**: Integer `State` + `StateDescription` columns
## About ## About
This tool is designed to work with the `transfers.db` SQLite database created by [slskd](https://github.com/slskd/slskd), a Soulseek client daemon. It helps you understand your sharing patterns and track transfer statistics. This tool is designed to work with the `transfers.db` SQLite database created by [slskd](https://github.com/slskd/slskd), a Soulseek client daemon. It helps you understand your sharing patterns and track transfer statistics.
+4 -4
View File
@@ -1011,7 +1011,7 @@ class MainWindow(QMainWindow):
# Check if we have data and good format compatibility # Check if we have data and good format compatibility
if not artist_stats and not album_stats: if not artist_stats and not album_stats:
self.showPopularityError("No successful download transfers found.", format_info) self.showPopularityError("No successful upload transfers found.", format_info)
return return
elif format_info['match_percentage'] < 50: elif format_info['match_percentage'] < 50:
self.showPopularityWarning(format_info) self.showPopularityWarning(format_info)
@@ -1202,7 +1202,7 @@ class MainWindow(QMainWindow):
{message} {message}
How it works: How it works:
• Analyzes successful download transfers (what users want) • Analyzes successful upload transfers (what others downloaded from you)
• Smart left-to-right path parsing • Smart left-to-right path parsing
• Detects media folders (/music/, \\Artists\\, etc.) • Detects media folders (/music/, \\Artists\\, etc.)
• Removes artist name prefixes from album titles • Removes artist name prefixes from album titles
@@ -1256,7 +1256,7 @@ def analyze_library_format(db_paths):
cursor.execute(f""" cursor.execute(f"""
SELECT Filename SELECT Filename
FROM Transfers FROM Transfers
WHERE {success_condition} AND Direction = 'Download' AND Filename IS NOT NULL WHERE {success_condition} AND Direction = 'Upload' AND Filename IS NOT NULL
LIMIT 200 LIMIT 200
""") """)
@@ -1425,7 +1425,7 @@ def get_popularity_stats(db_paths, days=None):
success_condition = "State LIKE 'Completed, Succeeded'" success_condition = "State LIKE 'Completed, Succeeded'"
# Create WHERE clause for time filtering # Create WHERE clause for time filtering
where_clause = f"WHERE {success_condition} AND Direction = 'Download'" # Track what users download where_clause = f"WHERE {success_condition} AND Direction = 'Upload'" # Track what users upload/share
params = [] params = []
if days is not None: if days is not None: