Skip to content

Commit

Permalink
Fixed #160 causing issues with the url generator
Browse files Browse the repository at this point in the history
  • Loading branch information
Evolution0 committed Jan 11, 2021
1 parent cf50787 commit f4f972a
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions bandcamp_dl/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,24 +92,29 @@ def main():
exit()
else:
urls = arguments['URL']
for url in urls:
logging.debug("\n\tURL: {}".format(url))
# url is now a list of URLs. So lets make an albumList and append each parsed album to it.
albumList = []
for url in urls:
albumList.append(bandcamp.parse(url, not arguments['--no-art'], arguments['--embed-lyrics'], arguments['--debug']))

for album in albumList:

# url is now a list of URLs. So lets make an album_list and append each parsed album to it.
album_list = []
if type(urls) is str:
album_list.append(bandcamp.parse(urls, not arguments['--no-art'], arguments['--embed-lyrics'],
arguments['--debug']))
else:
for url in urls:
logging.debug("\n\tURL: {}".format(url))
album_list.append(bandcamp.parse(url, not arguments['--no-art'], arguments['--embed-lyrics'],
arguments['--debug']))

for album in album_list:
logging.debug(" Album data:\n\t{}".format(album))

for album in albumList:
for album in album_list:
if arguments['--full-album'] and not album['full']:
print("Full album not available. Skipping ", album['title'], " ...")
albumList.remove(album) # Remove not-full albums BUT continue with the rest of the albums.
album_list.remove(album) # Remove not-full albums BUT continue with the rest of the albums.

if arguments['URL'] or arguments['--artist']:
logging.debug("Preparing download process..")
for album in albumList:
for album in album_list:
bandcamp_downloader = BandcampDownloader(arguments['--template'], basedir, arguments['--overwrite'],
arguments['--embed-lyrics'], arguments['--group'],
arguments['--embed-art'], arguments['--no-slugify'],
Expand Down

0 comments on commit f4f972a

Please sign in to comment.