motzel / ScoreSaberCountryLeaderboard

ScoreSaber.com enhancements
https://scoresaber.com
MIT License
21 stars 2 forks source link

Update PPs when song is ranked/unranked/nerfed #18

Closed motzel closed 4 years ago

motzel commented 4 years ago

PPs are changed when song is ranked/unranked/nerfed, but scores cache is kept forever and not updated as it's not a new play.

https://scoresaber.com/api.php?function=get-leaderboards&cat=1&page=1&limit=5000&ranked=1

AFTER refresh:

  1. Fetch all ranked songs
  2. Find differences from the cached ones (added, removed, star rating changed)
  3. Find all users that played any of songs from point 2
  4. Find exact recent plays pages for each user for that songs and fetch&update - should be quite easy (sort user's songs by timeset, find song position in sorted array, divide by 8, voila!)