Added file option instead of an URL in the CLI

Depending what you give it it will download accordingly
This commit is contained in:
RemixDev 2020-05-15 17:46:50 +02:00
parent 4c80b73433
commit 36316e69e5
2 changed files with 6 additions and 0 deletions

View File

@ -3,6 +3,7 @@ import click
import deemix.app.cli as app
from deemix.app.settings import initSettings
from os.path import isfile
@click.command()
@ -11,6 +12,10 @@ from deemix.app.settings import initSettings
def download(bitrate, url):
settings = initSettings()
app.login()
if isfile(url[0]):
filename = url[0]
with open(filename) as f:
url = f.readlines()
for u in url:
app.downloadLink(u, settings, bitrate)
click.echo("All done!")

View File

@ -35,4 +35,5 @@ def login():
def downloadLink(url, settings, bitrate=None):
url = url.strip()
addToQueue(dz, sp, url, settings, bitrate)