mirror of
https://github.com/Neocky/pluGET.git
synced 2024-04-29 16:12:30 +00:00
Better output & first part of new config handling
Changes: - better output when downloading files - optimization when getting values from the config
This commit is contained in:
@@ -6,7 +6,7 @@ import requests
|
||||
from pathlib import Path
|
||||
|
||||
from utils.consoleoutput import oColors
|
||||
from handlers.handle_config import checkConfig
|
||||
from handlers.handle_config import checkConfig, configurationValues
|
||||
from handlers.handle_sftp import createSFTPConnection
|
||||
|
||||
|
||||
@@ -160,3 +160,9 @@ def calculateFileSizeMb(downloadFileSize):
|
||||
fileSizeMb = fileSizeDownload / 1024 / 1024
|
||||
roundedFileSize = round(fileSizeMb, 2)
|
||||
return roundedFileSize
|
||||
|
||||
def calculateFileSizeKb(downloadFileSize):
|
||||
fileSizeDownload = int(downloadFileSize)
|
||||
fileSizeKb = fileSizeDownload / 1024
|
||||
roundedFileSize = round(fileSizeKb, 2)
|
||||
return roundedFileSize
|
Reference in New Issue
Block a user