diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7425c89..de36220 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,7 +36,7 @@ jobs: autopep8 --in-place --recursive --max-line-length=100 . - name: Commit AutoPEP8 - uses: stefanzweifel/git-auto-commit-action@v4 + uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: "[ci] auto-format" branch: ${{ github.head_ref }} @@ -46,7 +46,7 @@ jobs: python test/auto_apply_version_metadata.py $(git log --pretty=format:'%h' -n 1) - name: Commit Version Metadata - uses: stefanzweifel/git-auto-commit-action@v4 + uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: "[ci] apply-version-metadata" branch: ${{ github.head_ref }} diff --git a/plugins/utilities.json b/plugins/utilities.json index a54692a..6d89910 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -692,6 +692,12 @@ } ], "versions": { + "3.0.1": { + "api_version": 9, + "commit_sha": "a93fda3", + "released_on": "25-01-2025", + "md5sum": "96d7f2fd3e503e8a80fb4a761d5f6caf" + }, "3.0.0": { "api_version": 9, "commit_sha": "32e5180", @@ -735,6 +741,12 @@ } ], "versions": { + "2.1.1": { + "api_version": 9, + "commit_sha": "a93fda3", + "released_on": "25-01-2025", + "md5sum": "7db9b514d97df4c672d5e8ef72b6be6c" + }, "2.1.0": { "api_version": 9, "commit_sha": "bb129cc", @@ -1421,6 +1433,12 @@ } ], "versions": { + "1.5.1": { + "api_version": 9, + "commit_sha": "a93fda3", + "released_on": "25-01-2025", + "md5sum": "d33cd8c65833278f35bd87013a80e883" + }, "1.5.0": { "api_version": 9, "commit_sha": "bb129cc", diff --git a/plugins/utilities/advanced_party_window.py b/plugins/utilities/advanced_party_window.py index 6a1cef9..15c6dd7 100644 --- a/plugins/utilities/advanced_party_window.py +++ b/plugins/utilities/advanced_party_window.py @@ -77,11 +77,11 @@ def newconnect_to_party(address, port=43210, print_progress=False): global ip_add global p_port bs.chatmessage(" Joined IP "+ip_add+" PORT "+str(p_port)) - dd = bs.get_connection_to_host_info() - if dd.get('name', '') != '': + dd = bs.get_connection_to_host_info_2() + if dd != None and dd.get('name', '') != '': title = dd['name'] bs.chatmessage(title) - if (dd != {}): + if (bool(dd)): bs.disconnect_from_host() ip_add = address @@ -240,8 +240,8 @@ class mututalServerThread(): self.timer = babase.AppTimer(10, self.checkPlayers, repeat=True) def checkPlayers(self): - if bs.get_connection_to_host_info() != {}: - server_name = bs.get_connection_to_host_info()["name"] + if bool(bs.get_connection_to_host_info_2()): + server_name = bs.get_connection_to_host_info_2().name players = [] for ros in bs.get_game_roster(): players.append(ros["display_string"]) @@ -460,9 +460,9 @@ class ModifiedPartyWindow(bascenev1lib_party.PartyWindow): icon=bui.gettexture('menuButton'), iconscale=1.2) - info = bs.get_connection_to_host_info() - if info.get('name', '') != '': - title = info['name'] + info = bs.get_connection_to_host_info_2() + if info != None: + title = info.name else: title = babase.Lstr(resource=self._r + '.titleText') @@ -907,10 +907,10 @@ class ModifiedPartyWindow(bascenev1lib_party.PartyWindow): bui.textwidget(edit=self._text_field, text="") return elif sendtext == ".info": - if bs.get_connection_to_host_info() == {}: + if bs.get_connection_to_host_info_2() == None: s_build = 0 else: - s_build = bs.get_connection_to_host_info()['build_number'] + s_build = bs.get_connection_to_host_info_2()['build_number'] s_v = "0" if s_build <= 14365: s_v = " 1.4.148 or below" @@ -930,9 +930,9 @@ class ModifiedPartyWindow(bascenev1lib_party.PartyWindow): bui.textwidget(edit=self._text_field, text="") return elif sendtext == ".save": - info = bs.get_connection_to_host_info() + info = bs.get_connection_to_host_info_2() config = babase.app.config - if info.get('name', '') != '': + if info != None and info.get('name', '') != '': title = info['name'] if not isinstance(config.get('Saved Servers'), dict): config['Saved Servers'] = {} @@ -1163,8 +1163,9 @@ class ModifiedPartyWindow(bascenev1lib_party.PartyWindow): """ else: # kick-votes appeared in build 14248 - if (bs.get_connection_to_host_info().get('build_number', 0) < - 14248): + info = bs.get_connection_to_host_info_2() + if bool(info) and (info.get('build_number', 0) < + 14248): bui.getsound('error').play() bs.broadcastmessage( babase.Lstr(resource='getTicketsWindow.unavailableText'), @@ -1554,12 +1555,12 @@ class ModifiedPartyWindow(bascenev1lib_party.PartyWindow): current_choice=Quickreply[0], delegate=self) self._popup_type = "removeQuickReplySelect" - elif choice in ("hostInfo_Debug",) and isinstance(bs.get_connection_to_host_info(), dict): - if len(bs.get_connection_to_host_info()) > 0: + elif choice in ("hostInfo_Debug",) and isinstance(bs.get_connection_to_host_info_2(), dict): + if bs.get_connection_to_host_info_2() != None: # print(_babase.get_connection_to_host_info(),type(_babase.get_connection_to_host_info())) - ChoiceDis = list(bs.get_connection_to_host_info().keys()) - NewChoices = ["bs.broadcastmessage(str(bs.get_connection_to_host_info().get('%s')))" % ( + ChoiceDis = list(bs.get_connection_to_host_info_2().keys()) + NewChoices = ["bs.broadcastmessage(str(bs.get_connection_to_host_info_2().get('%s')))" % ( (str(i)).replace("'", r"'").replace('"', r'\\"')) for i in ChoiceDis] PopupMenuWindow(position=popup_window.root_widget.get_screen_space_center(), scale=_get_popup_window_scale(), diff --git a/plugins/utilities/discord_richpresence.py b/plugins/utilities/discord_richpresence.py index 323dc4c..30f567f 100644 --- a/plugins/utilities/discord_richpresence.py +++ b/plugins/utilities/discord_richpresence.py @@ -372,8 +372,7 @@ def get_event_loop(force_fresh=False): def _generate_join_secret(self): # resp = requests.get('https://legacy.ballistica.net/bsAccessCheck').text try: - connection_info = bs.get_connection_to_host_info( - ) if build_number < 21727 else bs.get_connection_to_host_info_2() + connection_info = bs.get_connection_to_host_info_2() if connection_info: addr = _last_server_addr port = _last_server_port @@ -872,8 +871,7 @@ class DiscordRP(babase.Plugin): def update_status(self) -> None: roster = bs.get_game_roster() - connection_info = bs.get_connection_to_host_info( - ) if build_number < 21727 else bs.get_connection_to_host_info_2() + connection_info = bs.get_connection_to_host_info_2() self.rpc_thread.large_image_key = "bombsquadicon" self.rpc_thread.large_image_text = "BombSquad" diff --git a/plugins/utilities/easy_connect.py b/plugins/utilities/easy_connect.py index 7faf647..550b833 100644 --- a/plugins/utilities/easy_connect.py +++ b/plugins/utilities/easy_connect.py @@ -274,7 +274,7 @@ def new_on_favorites_connect_press(self) -> None: call=bs.WeakCall( self._host_lookup_result)).start() - if self.retry_inter > 0 and (bs.get_connection_to_host_info() == {} or bs.get_connection_to_host_info()['build_number'] == 0): + if self.retry_inter > 0 and (bs.get_connection_to_host_info_2() == {} or bs.get_connection_to_host_info_2() == None or bs.get_connection_to_host_info_2()['build_number'] == 0): bui.screenmessage("Server full or unreachable, Retrying....") self._retry_timer = bs.AppTimer(self.retry_inter, babase.Call( self._on_favorites_connect_press)) @@ -714,7 +714,7 @@ class PartyQuickConnect(bui.Window): self.direction = "right" def connect(self, address, port): - if not self.closed and (bs.get_connection_to_host_info() == {} or bs.get_connection_to_host_info()['build_number'] == 0): + if not self.closed and (bs.get_connection_to_host_info_2() == {} or bs.get_connection_to_host_info_2() == None or bs.get_connection_to_host_info_2()['build_number'] == 0): bui.textwidget(edit=self._title_text, text="Retrying....("+str(self.retry_count)+")") self.retry_count += 1 bs.connect_to_party(address, port=port)