Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recently Imported Episodes Panel: Guarantee a Unique Key Per Element #672

Merged

Conversation

Queuecumbr
Copy link
Contributor

@Queuecumbr Queuecumbr commented Nov 10, 2023

This fixes an edge case where duplicate keys may end up used in instances where a regular episode and an O episode is imported. Take my case for example:

image

Both O1 and O2 have the file IDs 10126 and 10127 respectively. However E1 would have both 10126 and 10127 linked to it. So when rendering O1, O2, and both instances of E1, duplicate keys will be used since it was based on the FileID.

The following warning will be displayed when running the code in development mode as a result:
Screenshot 2023-11-10 at 3 12 51 PM

This pull request should fix this issue by setting the key to EpisodeID-FileID instead of just to FileID.

Copy link
Member

@revam revam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@ElementalCrisis
Copy link
Member

Could have sworn I fixed this, thanks for the PR!

@ElementalCrisis ElementalCrisis merged commit 106db77 into ShokoAnime:master Nov 11, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants