Skip to content

Commit

Permalink
Fixed a geventbug, added log files
Browse files Browse the repository at this point in the history
  • Loading branch information
CookieDecide committed Aug 26, 2024
1 parent 3291a9e commit 0c08d2e
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 11 deletions.
4 changes: 2 additions & 2 deletions LeagueBuilds_client/src/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ def set_position(position):

def start():
try:
print("start")
# print("start")
eel.start(
"index.html",
mode="chrome",
Expand All @@ -530,7 +530,7 @@ def start():
close_callback=close_callback,
)
except EnvironmentError:
print("exe")
# print("exe")
eel.start(
"index.html",
mode="default",
Expand Down
7 changes: 4 additions & 3 deletions LeagueBuilds_client/src/lcu.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@


def start():
print("Please start LoL client for LCU API to start.")
# print("Please start LoL client for LCU API to start.")
connector.start()


@connector.ready
async def connect(connection):
global old_action, champion
print("LCU API is ready to be used.")
# print("LCU API is ready to be used.")
page_session = await connection.request("get", "/lol-champ-select/v1/session")
page_session = await page_session.content.read()
page_session = json.loads(page_session)
Expand Down Expand Up @@ -48,7 +48,8 @@ async def connect(connection):

@connector.close
async def disconnect(_):
print("The client has been closed!")
# print("The client has been closed!")
return


@connector.ws.register(
Expand Down
8 changes: 8 additions & 0 deletions LeagueBuilds_client/src/main_client.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
import sys, os

if not os.path.exists("logs"):
os.mkdir("logs")

sys.stdout = open('logs/output.txt', 'w')
sys.stderr = open('logs/error.txt', 'w')

import lcu, gui, client, version
import threading, time
import statics
Expand Down
10 changes: 5 additions & 5 deletions LeagueBuilds_client/src/statics.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def update_summoner():

SUMMONER.insert_many(summoner).on_conflict_replace().execute()

print("Static Summoner")
# print("Static Summoner")


def update_maps():
Expand All @@ -75,7 +75,7 @@ def update_maps():

MAPS.insert_many(maps).on_conflict_replace().execute()

print("Static Map")
# print("Static Map")


def update_runes():
Expand Down Expand Up @@ -130,7 +130,7 @@ def update_runes():
RUNESLOTS.insert_many(runeslots).on_conflict_replace().execute()
RUNEKEYS.insert_many(runekeys).on_conflict_replace().execute()

print("Static Runes")
# print("Static Runes")


def update_items():
Expand Down Expand Up @@ -189,7 +189,7 @@ def update_items():

ITEMS.insert_many(items).on_conflict_replace().execute()

print("Static Items")
# print("Static Items")


def update_champions():
Expand Down Expand Up @@ -266,4 +266,4 @@ def update_champions():

CHAMPIONS.insert_many(champions).on_conflict_replace().execute()

print("Static Champion")
# print("Static Champion")
4 changes: 3 additions & 1 deletion LeagueBuilds_client/src/web/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,9 @@ function reset_position() {
img[i].style.background = "var(--color_background)";
}

document.getElementById(role).style.background = "var(--color_hover_background)";
if (role != "") {
document.getElementById(role).style.background = "var(--color_hover_background)";
}
}

function force_position(position) {
Expand Down

0 comments on commit 0c08d2e

Please sign in to comment.