Fix soundcloud "File not found"

This commit is contained in:
nathom 2021-07-29 12:36:25 -07:00
parent 076a4be114
commit f98ee5c8f7
2 changed files with 3 additions and 2 deletions

View file

@ -422,6 +422,7 @@ class Track(Media):
:type dl_info: dict
:rtype: str
"""
logger.debug("dl_info: %s", dl_info)
if dl_info["type"] == "mp3":
self.path += ".mp3"
# convert hls stream to mp3

View file

@ -77,8 +77,8 @@ class DownloadStream:
)
self.file_size = int(self.request.headers.get("Content-Length", 0))
if self.file_size == 0:
raise NonStreamable
if self.file_size == 0 and not self.url.endswith(".jpg"):
raise NonStreamable("File not found.")
def __iter__(self) -> Iterator:
"""Iterate through chunks of the stream.