Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed m3u again #1444

Merged
merged 1 commit into from
Dec 28, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions spotdl/search/song_gatherer.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,11 @@ def get_tracks(track):
return None, None
except OSError:
if generate_m3u:
song_obj = SongObject({*track}, album_response, {}, None, "", None)
file_path = _parse_path_template(path_template, song_obj, output_format)
song_obj = SongObject(track, album_response, {}, None, "", None)
if path_template:
file_path = _parse_path_template(path_template, song_obj, output_format)
else:
file_path = _get_converted_file_path(song_obj, output_format)

return None, f"{file_path}\n"

Expand Down Expand Up @@ -318,9 +321,12 @@ def get_song(track):
except OSError:
if generate_m3u:
song_obj = SongObject(
{*track["track"]}, {}, {}, None, "", playlist_response
track["track"], {}, {}, None, "", playlist_response
)
file_path = _parse_path_template(path_template, song_obj, output_format)
if path_template:
file_path = _parse_path_template(path_template, song_obj, output_format)
else:
file_path = _get_converted_file_path(song_obj, output_format)

return None, f"{file_path}\n"

Expand Down