From 0e6b7cccbf79bb03561b0335182377b3bf305349 Mon Sep 17 00:00:00 2001 From: localhost_frssoft Date: Thu, 25 Jul 2024 19:32:34 +0300 Subject: [PATCH] add link to track in playlist --- funkwlplay.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/funkwlplay.py b/funkwlplay.py index 35af3ab..9c014d3 100755 --- a/funkwlplay.py +++ b/funkwlplay.py @@ -116,8 +116,8 @@ with concurrent.futures.ThreadPoolExecutor(max_workers=50) as executor: except Exception as E: print(E) for track in tracks_stor: - artist, album, title, play_url, track_duration = track['artist']['name'], track['album']['title'], track['title'], track['listen_url'], track.get('duration') + artist, album, title, play_url, track_duration, fid = track['artist']['name'], track['album']['title'], track['title'], track['listen_url'], track.get('duration'), track['fid'] if not track_duration: track_duration = -1 - playlist_files.append(f'#EXTINF:{track_duration},{artist} - {album} - {title}\n{play_url}') + playlist_files.append(f'#EXTINF:{track_duration},{artist} - {album} - {title} url="{fid}"\n{play_url}') create_playlist_file(playlist_files)