mirror of
https://github.com/Neocky/pluGET.git
synced 2024-04-29 16:12:30 +00:00
Changed output when checking and removed debug output
Changes: -removed update available columm and integrated it with colors of the plugin name - removed leftover debug output
This commit is contained in:
parent
a4b1b7acf9
commit
1e7b30a1be
@ -149,9 +149,9 @@ def checkInstalledPackage(inputSelectedObject="all", inputOptionalParam=None):
|
||||
print(oColors.brightBlack + f"Checking: {inputSelectedObject}" + oColors.standardWhite)
|
||||
if inputOptionalParam != "changelog":
|
||||
print(oColors.brightBlack + f"Use 'check {inputSelectedObject} changelog' to get the latest changelog from plugins" + oColors.standardWhite)
|
||||
print("┌─────┬────────────────────────────────┬──────────────┬──────────────┬───────────────────┐")
|
||||
print("│ No. │ Name │ Installed V. │ Latest V. │ Update available │")
|
||||
print("└─────┴────────────────────────────────┴──────────────┴──────────────┴───────────────────┘")
|
||||
print("┌─────┬────────────────────────────────┬──────────────┬──────────────┐")
|
||||
print("│ No. │ Name │ Installed V. │ Latest V. │")
|
||||
print("└─────┴────────────────────────────────┴──────────────┴──────────────┘")
|
||||
try:
|
||||
for plugin in track(pluginList, description="Checking for updates" ,transient=True, complete_style="bright_yellow"):
|
||||
if not configValues.localPluginFolder:
|
||||
@ -222,10 +222,15 @@ def checkInstalledPackage(inputSelectedObject="all", inputOptionalParam=None):
|
||||
else:
|
||||
print(f" [{i+1}]".rjust(6), end='')
|
||||
print(" ", end='')
|
||||
if pluginIsOutdated == True:
|
||||
print(oColors.brightGreen + f"{fileName}".ljust(33) + oColors.standardWhite, end='')
|
||||
elif pluginIsOutdated == False:
|
||||
print(oColors.brightRed + f"{fileName}".ljust(33) + oColors.standardWhite, end='')
|
||||
else:
|
||||
print(f"{fileName}".ljust(33), end='')
|
||||
|
||||
print(f"{fileVersion}".ljust(15), end='')
|
||||
print(f"{pluginLatestVersion}".ljust(15), end='')
|
||||
print(f"{pluginIsOutdated}".ljust(5) + oColors.standardWhite)
|
||||
print(f"{pluginLatestVersion}".ljust(15))
|
||||
if (inputOptionalParam == "changelog" and pluginLatestVersion != 'N/A'):
|
||||
print(oColors.brightYellow + f"CHANGELOG {fileName}:" + oColors.standardWhite)
|
||||
description = getUpdateDescription(pluginId)
|
||||
@ -252,9 +257,10 @@ def updateInstalledPackage(inputSelectedObject='all'):
|
||||
connection = createFTPConnection()
|
||||
|
||||
try:
|
||||
print(oColors.brightBlack + "Selected plugins:" + oColors.standardWhite)
|
||||
print(oColors.brightBlack + "Selected plugins with available Updates:" + oColors.standardWhite)
|
||||
if inputSelectedObject == "all" or inputSelectedObject == "*":
|
||||
for pluginIndex in range(len(INSTALLEDPLUGINLIST)):
|
||||
if INSTALLEDPLUGINLIST[pluginIndex][4] == True:
|
||||
fileName = getFileName(INSTALLEDPLUGINLIST[pluginIndex][0])
|
||||
print(fileName, end=' ')
|
||||
else:
|
||||
|
@ -142,7 +142,6 @@ def paperCheckForUpdate(installedServerjarFullName):
|
||||
if not paperVersionBehind:
|
||||
print(oColors.brightRed + f"ERR: An error was encountered while detecting how many versions behind you are. "
|
||||
f"Will display as 'N/A'." + oColors.standardWhite)
|
||||
print(paperVersionBehind)
|
||||
paperVersionBehind = "N/A" # Sets paperVersionBehind to N/A while still letting the versionBehind check return
|
||||
# False for error-handing reasons.
|
||||
|
||||
@ -195,7 +194,6 @@ def papermc_downloader(paperBuild='latest', installedServerjarName=None, mcVersi
|
||||
downloadPath = createTempPluginFolder()
|
||||
|
||||
url = f"https://papermc.io/api/v2/projects/paper/versions/{mcVersion}/builds/{paperBuild}/downloads/{downloadFileName}"
|
||||
print(url)
|
||||
remotefile = urllib.request.urlopen(url)
|
||||
filesize = remotefile.info()['Content-Length']
|
||||
print(f"Getting Paper {paperBuild} for {mcVersion}")
|
||||
|
Loading…
Reference in New Issue
Block a user