calculate playlist duration

- use python's `sum()` method to add durations instead of for loop
This commit is contained in:
geoffrey45 authored and Mungai Geoffrey committed 2022-07-06 17:38:33 +03:00
1 parent 5bc0eaf8e6
commit b318c0d324
7 files changed
+27 -25

No files matched your search

-13
View File
@@ -85,19 +85,6 @@ class ValidateAlbumThumbs:
self.find_lost_thumbnails()
def get_album_duration(album: List[models.Track]) -> int:
"""
Gets the duration of an album.
"""
album_duration = 0
for track in album:
album_duration += track.length
return album_duration
def use_defaults() -> str:
"""
Returns a path to a random image in the defaults directory.