mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-10 15:11:58 +01:00
logging: drop the noisy album count from the sync summary
sum(artist.albumCount) double-counts compilation albums, so it read higher than the albums actually synced; keep only the song total, which matches exactly.
This commit is contained in:
@@ -69,7 +69,7 @@ class SyncManager(
|
||||
Log.i(
|
||||
"sync",
|
||||
"finished in ${elapsedMs(startedAt)}ms: " +
|
||||
"${summary.artists} artists, ${summary.albums} albums (server reported ${summary.reportedAlbums}), " +
|
||||
"${summary.artists} artists, ${summary.albums} albums, " +
|
||||
"${summary.songs} songs (server reported ${summary.reportedSongs}), " +
|
||||
"${summary.playlists} playlists, ${summary.playlistSongs} playlist tracks, ${summary.pruned} pruned",
|
||||
)
|
||||
|
||||
@@ -26,7 +26,6 @@ class SyncService(
|
||||
private var playlistsSynced = 0
|
||||
private var playlistSongsSynced = 0
|
||||
private var pruned = 0
|
||||
private var reportedAlbums = 0L
|
||||
private var reportedSongs = 0L
|
||||
|
||||
suspend fun sync(): SyncSummary {
|
||||
@@ -43,7 +42,6 @@ class SyncService(
|
||||
playlists = playlistsSynced,
|
||||
playlistSongs = playlistSongsSynced,
|
||||
pruned = pruned,
|
||||
reportedAlbums = reportedAlbums,
|
||||
reportedSongs = reportedSongs,
|
||||
)
|
||||
}
|
||||
@@ -56,7 +54,6 @@ class SyncService(
|
||||
write("artists", artistColumns, primaryKey, batch) { it.values() }
|
||||
batch.forEach { seen.add(idHash(it.id)) }
|
||||
artistsSynced += batch.size
|
||||
reportedAlbums += batch.sumOf { it.albumCount }
|
||||
}
|
||||
pruned += pruneStaleIds(seen, { library.artistIdsAfter(source.id, it, PRUNE_PAGE) }, { library.deleteArtists(source.id, it) })
|
||||
}
|
||||
@@ -244,7 +241,6 @@ data class SyncSummary(
|
||||
val playlists: Int,
|
||||
val playlistSongs: Int,
|
||||
val pruned: Int,
|
||||
val reportedAlbums: Long,
|
||||
val reportedSongs: Long,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user