Skip to content

Commit

Permalink
修复启动客户端时设置客户端路径的错误
Browse files Browse the repository at this point in the history
  • Loading branch information
Zzaphkiel committed Jun 22, 2024
1 parent 5cd8fad commit d9c0cda
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion app/common/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class Config(QConfig):
careerGamesNumber = RangeConfigItem("Functions", "CareerGamesNumber", 20,
RangeValidator(10, 100))
apiConcurrencyNumber = RangeConfigItem("Functions", "ApiConcurrencyNumber", 1,
RangeValidator(1, 5), restart=True)
RangeValidator(1, 20), restart=True)

gameInfoFilter = ConfigItem(
"Functions", "GameInfoFilter", False, BoolValidator())
Expand Down
3 changes: 0 additions & 3 deletions app/lol/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,6 @@ async def parseAllyGameInfo(session, currentSummonerId, useSGP=False):
tasks = [getSummonerGamesInfoViaSGP(item, isRank, currentSummonerId)
for item in session['myTeam']]
summoners = await asyncio.gather(*tasks)
print('hi')
except:
tasks = [parseSummonerGameInfo(item, isRank, currentSummonerId)
for item in session['myTeam']]
Expand Down Expand Up @@ -1642,8 +1641,6 @@ def patchDpiChangedMessage(hWnd):
SWP_SHOWWINDOW
)

print('hi')

win32gui.SetWindowPos(
windowCefHWnd,
0,
Expand Down
11 changes: 6 additions & 5 deletions app/view/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import sys
import traceback
import time
import webbrowser
import copy
from pathlib import Path

import pyperclip
Expand Down Expand Up @@ -586,11 +586,12 @@ def __setLolInstallFolder(self, folder: str):
folder = folder.replace("LeagueClient", "TCLS")
folder = f"{folder[:1].upper()}{folder[1:]}"

current = cfg.get(cfg.lolFolder)
current: list = cfg.get(cfg.lolFolder)

if folder not in current:
current.append(current)
cfg.set(cfg.lolFolder, current)
if folder.lower() not in [item.lower() for item in current]:
new = copy.deepcopy(current)
new.append(folder)
cfg.set(cfg.lolFolder, new)

@asyncSlot(dict)
async def __onCurrentSummonerProfileChanged(self, data: dict):
Expand Down
2 changes: 1 addition & 1 deletion app/view/setting_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def __init__(self, parent=None):
cfg.apiConcurrencyNumber,
self.tr("LCU API concurrency number"),
self.tr("Number of concurrency:"),
1, 1, 5,
1, 1, 20,
Icon.APPLIST,
self.tr("Setting the maximum number of API concurrency."),
self.functionGroup)
Expand Down

0 comments on commit d9c0cda

Please sign in to comment.