Removed sleep timer and made a successful download green
This commit is contained in:
parent
6d3fdb1734
commit
6189258a6f
@ -74,7 +74,6 @@ class CalibreTools:
|
|||||||
TerminalInterface.appendInterface("Info", "Downloading Books " + str(downloaded_books) + " out of " + str(len(download_links)), 2)
|
TerminalInterface.appendInterface("Info", "Downloading Books " + str(downloaded_books) + " out of " + str(len(download_links)), 2)
|
||||||
else:
|
else:
|
||||||
TerminalInterface.runInterfaceSchedule()
|
TerminalInterface.runInterfaceSchedule()
|
||||||
time.sleep(0.2)
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def getBooksLink(ip_port, library_name, multiple, max=None):
|
def getBooksLink(ip_port, library_name, multiple, max=None):
|
||||||
@ -110,7 +109,7 @@ class CalibreTools:
|
|||||||
if not os.path.exists(directory_name + "/" + filename):
|
if not os.path.exists(directory_name + "/" + filename):
|
||||||
TerminalInterface.appendInterface("Info", f"Thread-{line-3} Downloading {filename}", line)
|
TerminalInterface.appendInterface("Info", f"Thread-{line-3} Downloading {filename}", line)
|
||||||
urlretrieve(link, directory_name + "/" + filename)
|
urlretrieve(link, directory_name + "/" + filename)
|
||||||
TerminalInterface.appendInterface("Info", f"Thread-{line-3} Completed", line)
|
TerminalInterface.appendInterface("Success", f"Thread-{line-3} Completed", line)
|
||||||
elif not int(filesize) == os.path.getsize(directory_name + "/" + filename):
|
elif not int(filesize) == os.path.getsize(directory_name + "/" + filename):
|
||||||
TerminalInterface.appendInterface("Warning", f'Thread-{line-3} Filesize does not match... Downloading file. {filename}', line)
|
TerminalInterface.appendInterface("Warning", f'Thread-{line-3} Filesize does not match... Downloading file. {filename}', line)
|
||||||
os.remove(directory_name + "/" + filename)
|
os.remove(directory_name + "/" + filename)
|
||||||
|
Loading…
Reference in New Issue
Block a user