Repository navigation
Rework playlist loop detection, validate against loops when adding playlist via API - #1162
Open
Toastbrot236 wants to merge 17 commits into
Open
Toastbrot236 wants to merge 17 commits into
Toastbrot236 wants to merge 17 commits into
Conversation
Contributor
Author
|
Seems to work for the LBP1 endpoint (tested using the actual game), so it'll likely also work for the API endpoint. Still need unit tests for this though. Also, I bumped a related rate-limit bucket's max requests up because turns out, LBP1's playlist caching isn't that good. |
Contributor
Author
|
I've now added unit tests for both adding a playlist to playlist via LBP1, and via API, should be enough for now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refactors and rewrites the way loops in playlists get detected (primarily by iteratively looking for the parent playlist in the child playlist's sub-playlist tree), makes the game endpoint only add the playlist after failing to find loops, instead of adding first and then immediately removing when it does find a loop, and also makes the playlist addition API endpoint use this loop detection method aswell, since I forgot to validate against that when initially writing the API endpoints.
Is missing unit and real tests currently. Also, some comments and parameter namings may still be weird or unfitting.