Compare commits

...

2 Commits

Author SHA1 Message Date
Neocky
496334a2fa Fixed check with seperatedownloadpath issue
Changes:
- fixed issue with seperate downloadpath and checking
2021-06-22 00:08:57 +02:00
Neocky
42be836928 Fixed wrong folder was used when trying to download plugin
Changes:
- fixed wrong folder use while downloading plugins
- made code a little bit cleaner
2021-06-21 10:18:52 +02:00
2 changed files with 13 additions and 19 deletions

View File

@@ -78,21 +78,19 @@ def searchPackage(ressourceName):
ressourceSelected = ressourceSelected - 1
ressourceId = packageName[ressourceSelected]["id"]
if not configValues.localPluginFolder:
try:
if configValues.sftp_seperateDownloadPath is True:
getSpecificPackage(ressourceId, configValues.sftp_pathToSeperateDownloadPath)
else:
getSpecificPackage(ressourceId, configValues.sftp_folderPath)
except HTTPError as err:
print(oColors.brightRed + f"Error: {err.code} - {err.reason}" + oColors.standardWhite)
if configValues.sftp_seperateDownloadPath is True:
pluginDownloadPath = configValues.sftp_pathToSeperateDownloadPath
else:
pluginDownloadPath = configValues.sftp_folderPath
else:
try:
if configValues.seperateDownloadPath is True:
getSpecificPackage(ressourceId, configValues.pathToPluginFolder)
else:
getSpecificPackage(ressourceId, configValues.pathToSeperateDownloadPath)
except HTTPError as err:
print(oColors.brightRed + f"Error: {err.code} - {err.reason}" + oColors.standardWhite)
if configValues.seperateDownloadPath is True:
pluginDownloadPath = configValues.pathToSeperateDownloadPath
else:
pluginDownloadPath = configValues.pathToPluginFolder
try:
getSpecificPackage(ressourceId, pluginDownloadPath)
except HTTPError as err:
print(oColors.brightRed + f"Error: {err.code} - {err.reason}" + oColors.standardWhite)
def downloadSpecificVersion(ressourceId, downloadPath, versionID='latest'):

View File

@@ -155,11 +155,7 @@ def checkInstalledPackage(inputSelectedObject="all", inputOptionalParam=None):
try:
for plugin in track(pluginList, description="Checking for updates" ,transient=True, complete_style="bright_yellow"):
if not configValues.localPluginFolder:
if configValues.sftp_seperateDownloadPath is True:
pluginFile = f"{configValues.sftp_pathToSeperateDownloadPath}/{plugin}"
else:
pluginFile = f"{configValues.sftp_folderPath}/{plugin}"
pluginFile = f"{configValues.sftp_folderPath}/{plugin}"
if configValues.sftp_useSftp:
pluginAttributes = sftp_validateFileAttributes(connection, pluginFile)
if pluginAttributes == False: