mirror of
https://github.com/nathom/streamrip.git
synced 2025-05-09 14:11:55 -04:00
Handle 404 error for tidal (#623)
This commit is contained in:
parent
9d6a2be49e
commit
b01382f267
1 changed files with 4 additions and 0 deletions
|
@ -8,6 +8,7 @@ import time
|
||||||
import aiohttp
|
import aiohttp
|
||||||
|
|
||||||
from ..config import Config
|
from ..config import Config
|
||||||
|
from ..exceptions import NonStreamableError
|
||||||
from .client import Client
|
from .client import Client
|
||||||
from .downloadable import TidalDownloadable
|
from .downloadable import TidalDownloadable
|
||||||
|
|
||||||
|
@ -321,5 +322,8 @@ class TidalClient(Client):
|
||||||
|
|
||||||
async with self.rate_limiter:
|
async with self.rate_limiter:
|
||||||
async with self.session.get(f"{BASE}/{path}", params=params) as resp:
|
async with self.session.get(f"{BASE}/{path}", params=params) as resp:
|
||||||
|
if resp.status == 404:
|
||||||
|
logger.warning("TIDAL: track not found", resp)
|
||||||
|
raise NonStreamableError("TIDAL: Track not found")
|
||||||
resp.raise_for_status()
|
resp.raise_for_status()
|
||||||
return await resp.json()
|
return await resp.json()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue