Skip to content

Commit

Permalink
Bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
developers192 committed Nov 1, 2023
1 parent 64a920c commit e8d519a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
10 changes: 7 additions & 3 deletions DetailedLoLRPC.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from multiprocessing import Process, freeze_support
from subprocess import Popen, PIPE
from nest_asyncio import apply
from json import loads

if __name__ == "__main__":

Expand Down Expand Up @@ -55,9 +56,9 @@ async def connect(connection):
addLog({"internalName": internalName, "displayName": displayName, "summonerId": summonerId, "locale": locale})

async with request("GET", localeDiscordStrings(locale)) as resp:
discord_strings = await resp.json()
discord_strings = loads((await resp.text()).encode().decode('utf-8-sig'))
async with request("GET", localeChatStrings(locale)) as resp:
chat_strings = await resp.json()
chat_strings = loads((await resp.text()).encode().decode('utf-8-sig'))

discStrings = {
"bot": discord_strings["Disc_Pres_QueueType_BOT"],
Expand All @@ -81,12 +82,15 @@ async def disconnect(_):
@connector.ws.register("/lol-gameflow/v1/session", event_types = ("CREATE", "UPDATE", "DELETE"))
async def gameFlow(connection, event):
data = event.data
phase = data['phase']

if phase not in ("Lobby", "Matchmaking", "ChampSelect", "InProgress"): return

gameData = data['gameData']
queueData = gameData['queue']
mapData = data['map']
mapIconData = mapData["assets"]["game-select-icon-active"]
phase = data['phase']


lobbyMem = len(await (await connection.request('get', '/lol-lobby/v2/lobby/members')).json())

Expand Down
4 changes: 3 additions & 1 deletion tray_icon.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from os import _exit, system, startfile, path as op
from PIL import Image
from pystray import Icon, Menu, MenuItem
from utilities import editConfig, fetchConfig, resourcePath, resetConfig, ISSUESURL, LOGDIR
from utilities import editConfig, fetchConfig, resourcePath, resetConfig, ISSUESURL, LOGDIR, VERSION

img = Image.open(resourcePath("icon.ico"))

Expand Down Expand Up @@ -32,6 +32,8 @@ def rpbug(icon: Icon, query):

icon = Icon("DetailedLoLRPC", img, "DetailedLoLRPC",
Menu(
MenuItem(f"DetailedLoLRPC {VERSION} - by Ria", None, enabled=False),
Menu.SEPARATOR,
MenuItem("Use Skin's splash and name", skinSplash, checked = lambda item: fetchConfig("useSkinSplash")),
MenuItem('Show "View splash art" button', viewSplash, checked = lambda item: fetchConfig("showViewArtButton")),
MenuItem("Idle status", Menu(
Expand Down
2 changes: 1 addition & 1 deletion utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from json import load as loadj, dump as dumpj
from easygui import enterbox

VERSION = "v2.6"
VERSION = "v2.7"
GITHUBURL = "https://github.com/developers192/DetailedLoLRPC/releases/latest"
ISSUESURL = "https://github.com/developers192/DetailedLoLRPC/issues/new"
DEFAULTCONFIG = {
Expand Down

0 comments on commit e8d519a

Please sign in to comment.