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:
Ritiek Malhotra
2018-10-20 16:19:14 +05:30
committed by GitHub
parent 7d321d9616
commit b12ca8c785
7 changed files with 107 additions and 22 deletions

View File

@@ -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