jpmayer / fantasy-chrome-extension

Chrome Extension for Creating LM Note Content in ESPN Fantasy Football Leagues
MIT License
39 stars 13 forks source link

Owner name collisions #76

Open willbuck opened 6 years ago

willbuck commented 6 years ago

Hey there!

I noticed when importing my family league that my dad and grandfather (who have the same first & last name on ESPN) got their all-time stats rolled together. I'd love to find a way to help in utilizing something besides user name as the key for generating those pages! LMK How I can help

bizzleburger commented 6 years ago

Hey man, thanks for opening the issue! Feel free to branch the repo and hack away if you'd like. We definitely need to explore the API more, because if ESPN can keep them separate than we can as well.

jpmayer commented 6 years ago

Espn uses an integer ID that is equivalent to the order in which you joined the league. We would need to add that column to our database and stop using the manager name as a look up key

jpmayer commented 6 years ago

I.e the first creator of the league is 1. The next guy to join is 2. So on. Added replaced owner Ids don't get reused. If manger 3 leaves a 10 team league his replacement is ID 11

SkolV1kes commented 6 years ago

Is there any way to track by franchise rather than owner? One year a guy quit midseason so I took over his team as commish, but because I was listed as owner for both teams, both scores are being credited to me so I show as the high season long scorer.

jpmayer commented 6 years ago

I have another league with a similar issue for using one ESPN account on two teams for two brothers. Going by teamId instead of owner name or id may be the way to go. We cant go on team name because its too easy to change