mirror of
https://github.com/nathom/streamrip.git
synced 2025-05-22 11:15:30 -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
|
:type dl_info: dict
|
||||||
:rtype: str
|
:rtype: str
|
||||||
"""
|
"""
|
||||||
|
logger.debug("dl_info: %s", dl_info)
|
||||||
if dl_info["type"] == "mp3":
|
if dl_info["type"] == "mp3":
|
||||||
self.path += ".mp3"
|
self.path += ".mp3"
|
||||||
# convert hls stream to mp3
|
# convert hls stream to mp3
|
||||||
|
|
|
@ -77,8 +77,8 @@ class DownloadStream:
|
||||||
)
|
)
|
||||||
self.file_size = int(self.request.headers.get("Content-Length", 0))
|
self.file_size = int(self.request.headers.get("Content-Length", 0))
|
||||||
|
|
||||||
if self.file_size == 0:
|
if self.file_size == 0 and not self.url.endswith(".jpg"):
|
||||||
raise NonStreamable
|
raise NonStreamable("File not found.")
|
||||||
|
|
||||||
def __iter__(self) -> Iterator:
|
def __iter__(self) -> Iterator:
|
||||||
"""Iterate through chunks of the stream.
|
"""Iterate through chunks of the stream.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue