add new files import_vod and move_vod for use on old vods before this program was created
This commit is contained in:
1 parent
7f1f1e7b4f
commit
20acb4bc9f
4 files changed
+190
No files matched your search
@@ -14,6 +14,20 @@ GAME_CACHE = {} # Local cache dictionary to store game_id -> game_name mapping
|
||||
|
||||
CHANNEL_NAME = "teampgp"
|
||||
|
||||
async def get_game_id_by_name(game_name: str) -> str:
|
||||
if SECRETS is None:
|
||||
await get_twitch()
|
||||
# Query the 'get_games' endpoint using the names parameter
|
||||
# The API expects a list, even for a single game name
|
||||
async for game in TWITCH.get_games(names=[game_name]):
|
||||
print(f"Game Name: {game.name}")
|
||||
print(f"Game ID: {game.id}")
|
||||
print(f"IGDB ID: {game.igdb_id}")
|
||||
return game.id
|
||||
|
||||
print(f"No game found with the exact name: '{game_name}'")
|
||||
return None
|
||||
|
||||
async def get_twitch():
|
||||
global SECRETS, TWITCH, USER
|
||||
if SECRETS is None:
|
||||
|
||||
Reference in new issue
Block a user