Compare commits

...

11 Commits

Author SHA1 Message Date
Neocky
88b897716a Changed version 2022-07-19 10:42:02 +02:00
Neocky
a7b528d25d Merge pull request #57 from Neocky/dev/1.7.1
Dev/1.7.2
2022-07-19 10:30:04 +02:00
Jan-Luca Bogdan | BEL NET GmbH
1c11b0df83 Delete install_requirements.py 2022-07-19 10:29:34 +02:00
Neocky
653dac6c2c Merge pull request #54 from smcclennon/dev/1.7.1
Handle Spiget api errors, use best-practice, disable incompatible code
2022-07-19 10:22:37 +02:00
Jan-Luca Bogdan | BEL NET GmbH
a5eeca7d9a Changed formating and print method
- Changed formating to have no lines longer than 120 characters
- replaced print() with richt_print_error() to print formatted error message
2022-07-19 10:17:59 +02:00
Neocky
1fc53d907d Merge pull request #56 from smile-minecraft/patch-1
update README.md
2022-07-19 10:06:05 +02:00
smile-minecraft
32aabefdf1 update README.md
velocity not waterfall
2022-07-16 13:07:01 +08:00
Shiraz
18ca3104a5 Handle Spiget api errors
so plugins with special characters such as "InvSee++" don't crash pluGET
due to unexpected Spiget api data structure response:
{'error': '', 'msg': ''}

Root cause may be special chracters not being URL-escaped by Spiget
2022-07-09 19:59:44 +01:00
Shiraz
8227c12bf1 Only rename console title on Windows
Prevent "sh: line 1: title: command not found" error on Linux
2022-07-09 10:17:21 +01:00
Shiraz
18e012540c Pip install on posix using python3 -m
as per the official documentation:
packaging.python.org/en/latest/tutorials/installing-packages/#id22
2022-07-09 10:14:18 +01:00
Shiraz
526ccf72cb Show error message on requirements install failure 2022-07-09 10:07:34 +01:00
4 changed files with 59 additions and 46 deletions

View File

@@ -175,7 +175,7 @@ get-paper [paperBuild] [minecraftVersion]
get-waterfall [waterfallBuild] [minecraftVersion]
```
### • Download specific waterfall version:
### • Download specific velocity version:
```
get-velocity [velocityBuild] [minecraftVersion]
```

View File

@@ -520,6 +520,18 @@ def search_plugin_spiget(plugin_file: str, plugin_file_name: str, plugin_file_ve
"""
url = f"https://api.spiget.org/v2/search/resources/{plugin_file_name}?field=name&sort=-downloads"
plugin_list = api_do_request(url)
# Handle failed api request
"""
{'error': 'Unexpected Exception', 'msg': 'Unexpected Exception. Please report this to
https://github.com/SpiGetOrg/api.spiget.org/issues'}
"""
if "error" in plugin_list:
rich_print_error(
f"[not bold]Error: Spiget error occurred whilst searching for plugin '{plugin_file}': {plugin_list['msg']}"
)
return plugin_list['msg']
else:
plugin_file_version2 = plugin_file_version
for i in range(4):
if i == 1:

View File

@@ -5,4 +5,4 @@ PLUGETVERSION = current version of pluGET
"""
# constant values
PLUGETVERSION = "1.7.1"
PLUGETVERSION = "1.7.2"

View File

@@ -21,6 +21,7 @@ def rename_console_title() -> None:
"""
Renames the console title on first startup
"""
if os.name == "nt":
os.system("title " + "pluGET │ By Neocky")
return None