added total_tracks to SoundCloudAlbum

This commit is contained in:
Frank 2022-04-28 11:07:11 -04:00
parent 82810cfff2
commit e8e1daaec2

View file

@ -121,6 +121,11 @@ class SoundcloudAlbum(Entry):
"""Returns the album's year, computed by the max upload year amongst all album tracks"""
return max(track.upload_year for track in self._single_tracks)
@property
def total_tracks(self) -> int:
"""Returns total tracks in album, for singles this is 1"""
return len(self.album_tracks(self, False))
@property
def track_count(self) -> int:
return self.kwargs("playlist_count")