mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-05 13:03:02 +00:00
fix: playcount reset to 1 on remap
This commit is contained in:
+2
-2
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user