added total_tracks to SoundCloudAlbum
This commit is contained in:
parent
82810cfff2
commit
e8e1daaec2
1 changed files with 5 additions and 0 deletions
|
|
@ -121,6 +121,11 @@ class SoundcloudAlbum(Entry):
|
||||||
"""Returns the album's year, computed by the max upload year amongst all album tracks"""
|
"""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)
|
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
|
@property
|
||||||
def track_count(self) -> int:
|
def track_count(self) -> int:
|
||||||
return self.kwargs("playlist_count")
|
return self.kwargs("playlist_count")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue