mirror of
https://github.com/KevinMidboe/spotify-downloader.git
synced 2025-12-08 20:39:08 +00:00
Add support for .m3u playlists (#401)
* Add support for .m3u playlists * Run black code formatter on changes * Stay consistent with Spotify test track
This commit is contained in:
@@ -124,6 +124,12 @@ def get_arguments(raw_args=None, to_group=True, to_merge=True):
|
||||
"-V", "--version", help="show version and exit", action="store_true"
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
'--write-m3u',
|
||||
help="generate an .m3u playlist file with youtube links given "
|
||||
"a text file containing tracks",
|
||||
action='store_true'
|
||||
)
|
||||
parser.add_argument(
|
||||
"-m",
|
||||
"--manual",
|
||||
@@ -257,6 +263,9 @@ def get_arguments(raw_args=None, to_group=True, to_merge=True):
|
||||
if parsed.config is not None and to_merge:
|
||||
parsed = override_config(parsed.config, parser)
|
||||
|
||||
if parsed.write_m3u and not parsed.list:
|
||||
parser.error('--write-m3u can only be used with --list')
|
||||
|
||||
parsed.log_level = log_leveller(parsed.log_level)
|
||||
|
||||
return parsed
|
||||
|
||||
Reference in New Issue
Block a user