Commit 70d7d6de authored by Gerion Entrup's avatar Gerion Entrup
Browse files

backend: use urls as cache identifier

parent cb7c1e79
......@@ -153,14 +153,14 @@ class YouTubeLibraryProvider(backend.LibraryProvider):
name=ytdl['display_id'],
images=thumbnail
),
uri=self.backend.uri_schemes[0] + ':' + ytdl['display_id'] + ' ' + ytdl['url']
uri=self.backend.uri_schemes[0] + ':' + ytdl['webpage_url'] + ' ' + ytdl['url']
)
return track
def _get_ytdl_tracks(self, uri, y_id=None):
def _get_ytdl_tracks(self, uri):
"""Return a list of tracks given an ari based on ytdl."""
if y_id is not None and y_id in cache:
return get_cache(y_id)
if uri in cache:
return get_cache(uri)
try:
yt_uri = call_ytdl(uri)
except:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment