mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
fixed broken return / redirect after downloading jar and adding server
This commit is contained in:
parent
66d7c6f10a
commit
fbc8e7fc2a
@ -141,7 +141,8 @@ class ServerJars:
|
|||||||
response = self._get_api_result(url)
|
response = self._get_api_result(url)
|
||||||
return response
|
return response
|
||||||
|
|
||||||
def download_jar(self, server, version, path):
|
@staticmethod
|
||||||
|
def download_jar(server, version, path):
|
||||||
base_url = "https://serverjars.com/api/fetchJar/{server}/{version}".format(server=server, version=version)
|
base_url = "https://serverjars.com/api/fetchJar/{server}/{version}".format(server=server, version=version)
|
||||||
|
|
||||||
# open a file stream
|
# open a file stream
|
||||||
|
@ -181,9 +181,10 @@ class Controller:
|
|||||||
server_stop = "stop"
|
server_stop = "stop"
|
||||||
|
|
||||||
# download the jar
|
# download the jar
|
||||||
server_jar_obj.download_jar(server, version, full_jar_path, server_command, server_file)
|
server_jar_obj.download_jar(server, version, full_jar_path)
|
||||||
|
|
||||||
self.register_server(name, server_id, server_dir, server_command, server_file, server_log_file, server_stop)
|
new_id = self.register_server(name, server_id, server_dir, server_command, server_file, server_log_file, server_stop)
|
||||||
|
return new_id
|
||||||
|
|
||||||
# todo - Do import server
|
# todo - Do import server
|
||||||
def import_server(self):
|
def import_server(self):
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"last_refreshed": "09/08/2020, 07:56:16",
|
"last_refreshed": "09/10/2020, 11:57:02",
|
||||||
"servers": {
|
"servers": {
|
||||||
"nukkitx": [
|
"nukkitx": [
|
||||||
"1.14"
|
"1.14"
|
||||||
@ -177,6 +177,7 @@
|
|||||||
"1.1620w08a",
|
"1.1620w08a",
|
||||||
"1.1620w07a",
|
"1.1620w07a",
|
||||||
"1.1620w06a",
|
"1.1620w06a",
|
||||||
|
"1.16.3",
|
||||||
"1.16.2rc2",
|
"1.16.2rc2",
|
||||||
"1.16.3rc1",
|
"1.16.3rc1",
|
||||||
"1.16.2rc1",
|
"1.16.2rc1",
|
||||||
@ -269,6 +270,7 @@
|
|||||||
"1.14.1pre1"
|
"1.14.1pre1"
|
||||||
],
|
],
|
||||||
"vanilla": [
|
"vanilla": [
|
||||||
|
"1.16.3",
|
||||||
"1.16.2",
|
"1.16.2",
|
||||||
"1.16.1",
|
"1.16.1",
|
||||||
"1.16",
|
"1.16",
|
||||||
|
Loading…
Reference in New Issue
Block a user