Update hydrabase_client.py
This commit is contained in:
parent
7a4cbc066f
commit
0b9fe879f8
1 changed files with 2 additions and 3 deletions
|
|
@ -10,7 +10,6 @@ import json
|
||||||
import logging
|
import logging
|
||||||
import re
|
import re
|
||||||
import time
|
import time
|
||||||
import uuid
|
|
||||||
from typing import List, Optional, Callable, Tuple
|
from typing import List, Optional, Callable, Tuple
|
||||||
|
|
||||||
from core.itunes_client import Track, Artist, Album
|
from core.itunes_client import Track, Artist, Album
|
||||||
|
|
@ -84,7 +83,7 @@ class HydrabaseClient:
|
||||||
except Exception:
|
except Exception:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
nonce = uuid.uuid4().hex
|
nonce = int(time.time() * 1000)
|
||||||
payload = json.dumps({
|
payload = json.dumps({
|
||||||
'request': {
|
'request': {
|
||||||
'type': request_type,
|
'type': request_type,
|
||||||
|
|
@ -249,7 +248,7 @@ class HydrabaseClient:
|
||||||
|
|
||||||
def get_album_tracks(self, album_id: str, limit: int = 50) -> List[Track]:
|
def get_album_tracks(self, album_id: str, limit: int = 50) -> List[Track]:
|
||||||
"""Fetch tracks for an album from Hydrabase by soul_id."""
|
"""Fetch tracks for an album from Hydrabase by soul_id."""
|
||||||
results = self._send_and_recv('album_tracks', album_id)
|
results = self._send_and_recv('album.tracks', album_id)
|
||||||
if not results:
|
if not results:
|
||||||
return []
|
return []
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue