xTVaser / src-twitch-ext

An Extension for Twitch.tv to Display a Runner's Personal Bests
https://www.twitch.tv/ext/u2nvainvlx73h5a7cnxpiodpfcbmo1
GNU General Public License v3.0
10 stars 4 forks source link

Individual Levels with Categories do not display each properly as their own entry #76

Closed KeithDeRuiter closed 1 year ago

KeithDeRuiter commented 3 years ago

This is a...

Brief Description

Individual Levels do not account for level Categories (e.g. an Easy vs. Hard mode for the same level). They all just display as one row in the extension when they should each display as their own submission/row.

Steps to Reproduce

Speedrun.com Name - AlteranQuidem Twitch.tv Profile Link - AlteranQuidem

List Steps: Prerequisites- A game with Individual Levels that have multiple Categories (I noticed with Blasphemous)

  1. Submit (or have) a run for multiple categories of the same level. image

  2. Configure the extension to show that game and individual levels (Screenshot shows only one submission for "First XYZ..." in the "Pilgrim" category, ignore the "Second XYZ..." entry). image

  3. Observe that the Submission for the "True Torment" category of that First level is not present.

The JSON for the game's list of levels shows one entry for each of the different levels (in this game that's 5 levels) https://www.speedrun.com/api/v1/games/lde39mx6/levels

But the missing information is at data.links.categories which brings you to this response: https://www.speedrun.com/api/v1/levels/ywex57l9/categories

That payload does list the two separate categories which each have their own ID. If a level has categories, then those should be iterated through to grab runs and display separately vs. just lumping everything together in one category.

xTVaser commented 1 year ago

V2 fixes this: image