fix: playcount reset to 1 on remap

This commit is contained in:
cwilvx
2024-09-08 12:08:52 +03:00
parent 30cc5bad0b
commit 3e61d86a19
5 changed files with 10 additions and 10 deletions
+2 -2
View File
@@ -31,12 +31,12 @@ class TrackGroup:
"""
self.tracks.remove(track)
def increment_playcount(self, duration: int, timestamp: int):
def increment_playcount(self, duration: int, timestamp: int, playcount: int = 1):
"""
Increments the playcount of all tracks in the group.
"""
for track in self.tracks:
track.playcount += 1
track.playcount += playcount
track.lastplayed = timestamp
track.playduration += duration