PythonistaGuild / TwitchIO

An Async Bot/API wrapper for Twitch made in Python.
https://twitchio.dev
MIT License
785 stars 163 forks source link

Fix fetch_markers passing list instead of dict #451

Closed Zarithya closed 2 months ago

Zarithya commented 3 months ago

Description

The Twitch API describes the "videos" element in the response as "A list of videos that contain markers. The list contains a single video." Currently, that list is being passed when creating the VideoMarkers object, when only the first element of that "list" should be.

This fixes this issue that arises when retrieving markers:

    self.markers = [Marker(d) for d in data["markers"]]
                                       ~~~~^^^^^^^^^^^
TypeError: list indices must be integers or slices, not str

Checklist