mirror of
https://github.com/nathom/streamrip.git
synced 2025-05-22 03:05:26 -04:00
Fix bug where db.add called on list
This commit is contained in:
parent
4173c2c27e
commit
b25de984f7
1 changed files with 6 additions and 4 deletions
|
@ -98,9 +98,9 @@ class MusicDL(list):
|
||||||
"""
|
"""
|
||||||
for source, url_type, item_id in self.parse_urls(url):
|
for source, url_type, item_id in self.parse_urls(url):
|
||||||
if item_id in self.db:
|
if item_id in self.db:
|
||||||
logger.info(f"{url} already downloaded, use --no-db to override.")
|
logger.info(f"ID {item_id} already downloaded, use --no-db to override.")
|
||||||
click.secho(f"{url} already downloaded, use --no-db to override.", fg='magenta')
|
click.secho(f"ID {item_id} already downloaded, use --no-db to override.", fg='magenta')
|
||||||
break
|
continue
|
||||||
|
|
||||||
self.handle_item(source, url_type, item_id)
|
self.handle_item(source, url_type, item_id)
|
||||||
|
|
||||||
|
@ -138,7 +138,9 @@ class MusicDL(list):
|
||||||
else:
|
else:
|
||||||
item.download(**arguments)
|
item.download(**arguments)
|
||||||
|
|
||||||
|
if self.db != []:
|
||||||
self.db.add(item.id)
|
self.db.add(item.id)
|
||||||
|
|
||||||
if self.config.session["conversion"]["enabled"]:
|
if self.config.session["conversion"]["enabled"]:
|
||||||
click.secho(
|
click.secho(
|
||||||
f"Converting {item!s} to {self.config.session['conversion']['codec']}",
|
f"Converting {item!s} to {self.config.session['conversion']['codec']}",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue