Skip to content

Fix Issue #262: still not getting all the teams player details from fetc#285

Open
DanielTomaro13 wants to merge 1 commit into
jimmyday12:mainfrom
DanielTomaro13:pr-creator-1775719243694
Open

Fix Issue #262: still not getting all the teams player details from fetc#285
DanielTomaro13 wants to merge 1 commit into
jimmyday12:mainfrom
DanielTomaro13:pr-creator-1775719243694

Conversation

@DanielTomaro13

@DanielTomaro13 DanielTomaro13 commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Summary

Fixed Issue #262 by implementing a robust team name matching system that handles indigenous team names returned by the AFL API during Sir Doug Nicholls round. The issue was that fetch_player_details_afl() couldn't match team names when the API temporarily returned indigenous names like "Kuwarna" instead of "Adelaide".

Key Changes:

  1. Enhanced team matching logic: Modified team_check_afl2() and team_abr_afl2() to try multiple matching approaches - first by team name, then by club name, then by club nickname, and finally by a comprehensive mapping that includes both regular and indigenous names.

  2. Comprehensive team name mappings: Added extensive mappings that cover all possible team name variations including indigenous names, nicknames, and alternative spellings. This ensures robust matching regardless of what the API returns.

  3. Fallback mechanism: Implemented a fallback system that tries different matching strategies in sequence, ensuring that player details can be fetched even when the API returns unexpected team names.

  4. Backward compatibility: All existing functionality remains intact while adding the robustness needed to handle the indigenous naming during special rounds.

Files Changed

  • R/helpers-afl.R

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.

1 participant