소스 검색

Fix adding up of total play back time

Colin Powell 2 년 전
부모
커밋
f8628f7826
1개의 변경된 파일1개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 3
      vrobbler/apps/scrobbles/models.py

+ 1 - 3
vrobbler/apps/scrobbles/models.py

@@ -648,9 +648,7 @@ class Scrobble(TimeStampedModel):
             ).last()
             self.long_play_seconds = self.playback_position_seconds
             if last_scrobble:
-                self.long_play_seconds = int(
-                    last_scrobble.playback_position_seconds
-                ) + int(self.playback_position_seconds)
+                self.long_play_seconds = last_scrobble.long_play_seconds + self.playback_position_seconds
 
             self.save(
                 update_fields=[