From f21bd307e28973846ee0b9d14d15bca1d37559f3 Mon Sep 17 00:00:00 2001 From: morguldir Date: Mon, 2 Mar 2020 00:00:59 +0100 Subject: [PATCH] Fix get_track_url not returning anything. Resolves #28 --- tests/test_api.py | 4 ++-- tidalapi/__init__.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_api.py b/tests/test_api.py index 5f1e704..0016751 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -143,12 +143,12 @@ def test_playlist_picture(session): def test_get_track_url(session): track = session.get_track(108043415) - session.get_track_url(track.id) + assert session.get_track_url(track.id) != None def test_get_video_url(session): video = session.get_video(108046194) - session.get_video_url(video.id) + assert session.get_video_url(video.id) != None def test_load_session(session): diff --git a/tidalapi/__init__.py b/tidalapi/__init__.py index 96ca9ed..58f494d 100644 --- a/tidalapi/__init__.py +++ b/tidalapi/__init__.py @@ -244,7 +244,7 @@ def get_media_url(self, track_id): return r.json()['url'] def get_track_url(self, track_id): - self.get_media_url(track_id) + return self.get_media_url(track_id) def get_video_url(self, video_id): params = {