mirror of
https://github.com/nathom/streamrip.git
synced 2025-05-22 03:05:26 -04:00
Fix soundcloud "File not found"
This commit is contained in:
parent
076a4be114
commit
f98ee5c8f7
2 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue