Skip to content

Commit

Permalink
Update League Connector to use oscr.stobuilds.com (HTTP) (#31)
Browse files Browse the repository at this point in the history
* Added Combat Time to Copy Summary.

* Updated league connector for new backend.

* Update League Connector to use oscr.stobuilds.com (HTTP)
  • Loading branch information
Kraust authored May 27, 2024
1 parent 933c0a8 commit 6b4a6c8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion OSCRUI/callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def save_combat(self, combat_num: int):
filename = combat.map
if combat.difficulty is not None and combat.difficulty != '':
filename += ' ' + combat.difficulty
filename += f' {combat.start_time.strftime('%Y-%m-%d %H.%M')}.log'
filename += f' {combat.start_time.strftime("%Y-%m-%d %H.%M")}.log'
base_dir = f'{os.path.dirname(self.entry.text())}/{filename}'
if not base_dir:
base_dir = self.app_dir
Expand Down
8 changes: 4 additions & 4 deletions OSCRUI/leagueconnector.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ def extend_ladder(self):
return

ladder_data = self.league_api.ladder_entries(
self.league_api.current_ladder_id, self.league_api.pages_loaded + 1)
self.league_api.current_ladder_id, self.league_api.pages_loaded + 1
)
if ladder_data is not None:
if len(ladder_data.results) < 50:
self.league_api.entire_ladder_loaded = True
Expand All @@ -162,8 +163,7 @@ def extend_ladder(self):
row.get("build", "Unknown"),
)
)
self.widgets.ladder_table.model().sourceModel().extend_data(
table_index, table_data, logfile_ids)
self.widgets.ladder_table.model().sourceModel().extend_data(table_index, table_data, logfile_ids)


def download_and_view_combat(self):
Expand Down Expand Up @@ -213,7 +213,7 @@ def __init__(self, address=None):

# TODO: This is a test domain and not for production.
if not address:
self.address = "http://127.0.0.1:8000"
self.address = "http://oscr.stobuilds.com"

self.api_client = OSCR_django_client.api_client.ApiClient()
self.api_client.configuration.host = self.address
Expand Down

0 comments on commit 6b4a6c8

Please sign in to comment.