From 7766812e6b75e1fa37d22f4b4de1896232db724a Mon Sep 17 00:00:00 2001 From: Gabriel Tabasco <41172833+Greenylie@users.noreply.github.com> Date: Sun, 27 Oct 2024 12:02:11 +0100 Subject: [PATCH] Fixed an issue that caused longer game names to not be selected --- Stream.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Stream.py b/Stream.py index 9182e24..24f64d4 100644 --- a/Stream.py +++ b/Stream.py @@ -12,6 +12,7 @@ def __init__(self, token): def search(self, game): if not game: return [] + game = game[:25] # If the game name exceeds 25 characters, the API will return error 500 url = f"https://streamlabs.com/api/v5/slobs/tiktok/info?category={game}" info = self.s.get(url).json() info["categories"].append({"full_name": "Other", "game_mask_id": ""})