language-transfer / lt-app

React Native application for Language Transfer
https://www.languagetransfer.org/
Other
291 stars 26 forks source link

Automatically fetch course metadata updates #8

Open SyntaxBlitz opened 4 years ago

SyntaxBlitz commented 4 years ago

Right now, a course's metadata is only refreshed if the user manually refreshes the metadata (or clears the course data entirely). If corrections need to be shipped, especially for auto-pause data, it'd be nice to ship them automatically.

We store the download time of each course's metadata. This means we could easily invalidate metadata that's more than, say, a week old. Another option would be to store each course's most recent metadata version somewhere on the server in case we don't want the user to have to re-download the entire course metadata each time. For now, it's not a huge deal, but if we store auto-pause information in the course metadata, these files may get to a few hundred kilobytes, which we may not want to download willy-nilly (since we do these downloads over mobile data without asking, even if lesson audio is configured to download only over wifi).