This commit is contained in:
nathom 2021-08-10 18:18:42 -07:00
parent 767e3c844e
commit 2980a2a722
3 changed files with 1189 additions and 1185 deletions

File diff suppressed because it is too large Load diff

View file

@ -1561,6 +1561,8 @@ class Album(Tracklist, Media):
)
if stat1 is not None and stat2 is not None
)
logger.debug("Sampling rate, bit depth = %s", stats)
if not stats:
stats = (None, None)

View file

@ -63,6 +63,7 @@ class TrackMetadata:
:type album: Optional[dict]
"""
# embedded information
# TODO: add this to static attrs
self.title: str
self.album: str
self.albumartist: str
@ -193,13 +194,14 @@ class TrackMetadata:
self.albumartist = safe_get(resp, "artist", "name")
self.label = resp.get("label")
self.url = resp.get("link")
self.explicit = bool(resp.get("parental_warning"))
# not embedded
self.explicit = bool(resp.get("parental_warning"))
self.quality = 2
self.bit_depth = None
self.bit_depth = 16
self.sampling_rate = 44100
self.cover_urls = get_cover_urls(resp, self.__source)
self.sampling_rate = None
self.streamable = True
elif self.__source == "soundcloud":