]> git.poda.fr Git - converter.git/commitdiff
More readable final log line
authorJulien <julien@poda.fr>
Sat, 8 Feb 2025 12:54:08 +0000 (13:54 +0100)
committerJulien <julien@poda.fr>
Sat, 8 Feb 2025 12:54:08 +0000 (13:54 +0100)
converter.py

index 6d0152ee48a71c9de22568e314bdbd54c4a05b16..d302859f4a3c19f1f126d517ee4751ffb3dbdd70 100755 (executable)
@@ -139,21 +139,21 @@ class Stats:
         self.errors: int = 0
         self.skipped: int = 0
         self.duplicates: int = 0
+        self.removed: int = 0
+        self.updated: int = 0
         self.tasks: int = 0
         self.converted: int = 0
         self.copied: int = 0
-        self.updated: int = 0
-        self.removed: int = 0
 
     def add(self, stats) -> None:
         self.errors += stats.errors
         self.skipped += stats.skipped
         self.duplicates += stats.duplicates
+        self.removed += stats.removed
+        self.updated += stats.updated
         self.tasks += stats.tasks
         self.converted += stats.converted
         self.copied += stats.copied
-        self.updated += stats.updated
-        self.removed += stats.removed
 
 # Main converter class. Thread safe.
 class Converter:
@@ -428,14 +428,13 @@ class Converter:
 
         self._log("From " + str(trackCount) + " tracks in "
              + str(len(libPlaylists)) + " playlists:"
-             + " Errors " + str(stats.errors)
-             + " Skipped " + str(stats.skipped)
-             + " Duplicates " + str(stats.duplicates)
-             + " Tasks " + str(stats.tasks)
-             + " Converted " + str(stats.converted)
-             + " Copied " + str(stats.copied)
-             + " Updated " + str(stats.updated)
-             + " Removed " + str(stats.removed) + ".")
+             + " Errors " + str(stats.errors) + ","
+             + " Skipped " + str(stats.skipped) + ","
+             + " Duplicates " + str(stats.duplicates) + ","
+             + " Removed " + str(stats.removed) + ","
+             + " Updated " + str(stats.updated) + ","
+             + " Converted " + str(stats.converted) + ","
+             + " Copied " + str(stats.copied) + ".")
 
     # Main function started by threads. Process queue elements
     # until 'None' is found or stop signal is received.