Merge pull request #94 from Vencorr/dev

Add support for multiple -u arguments
This commit is contained in:
Nathan Thomas 2021-06-22 14:18:38 -07:00 committed by GitHub
commit 8132a269a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -31,6 +31,7 @@ if not os.path.isdir(CACHE_DIR):
"--urls", "--urls",
metavar="URLS", metavar="URLS",
help="Url from Qobuz, Tidal, SoundCloud, or Deezer", help="Url from Qobuz, Tidal, SoundCloud, or Deezer",
multiple=True,
) )
@click.option( @click.option(
"-q", "-q",

View file

@ -111,7 +111,7 @@ class MusicDL(list):
else: else:
self.db = [] self.db = []
def handle_urls(self, url: str): def handle_urls(self, urls):
"""Download a url. """Download a url.
:param url: :param url:
@ -119,6 +119,7 @@ class MusicDL(list):
:raises InvalidSourceError :raises InvalidSourceError
:raises ParsingError :raises ParsingError
""" """
url = ' '.join(urls)
# youtube is handled by youtube-dl, so much of the # youtube is handled by youtube-dl, so much of the
# processing is not necessary # processing is not necessary
youtube_urls = self.youtube_url_parse.findall(url) youtube_urls = self.youtube_url_parse.findall(url)