Skip to content

Commit

Permalink
add encoding track's name in deezer provider
Browse files Browse the repository at this point in the history
  • Loading branch information
yomguy committed Nov 21, 2019
1 parent 30d5ed6 commit 574c5ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions timeside/plugins/provider/deezer.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def get_source_from_id(self, external_id, path, download=False):
if download:
file_name = request_json['artist']['name'] + '-' + request_json['title_short'] + '-' + external_id
file_name = file_name.replace(' ','_') + '.mp3'
file_path = os.path.join(path,file_name)
file_path = os.path.join(path,file_name).encode('utf-8')
r = get(source_uri)
if not os.path.exists(path):
os.makedirs(path)
Expand All @@ -42,4 +42,4 @@ def get_source_from_url(self, url, path, download=False):
return self.get_source_from_id(deezer_track_id, path, download)

def get_id_from_url(self, url):
return url.split("/")[-1:][0]
return url.split("/")[-1:][0]

0 comments on commit 574c5ce

Please sign in to comment.