Count installations that run: the update check goes through the site
The programs (desktop, Android) ask https://chess.vrubel.xyz/api/update for the latest release instead of GitHub, with a random id of the installation (made once, kept in the settings), the version and the platform; the site passes GitHub's answer on and keeps one row per installation and day (no IP; the country of the address). Without the site the programs ask GitHub, uncounted; with the update check off nothing is sent. /stats shows installations that ran today, in 7 and 30 days, in all and new ones, by platform and version. The texts about the update check and the site's privacy line say so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
04bd7c08a1
commit
1edbbda368
30 changed files with 284 additions and 44 deletions
|
|
@ -167,6 +167,10 @@ impl App {
|
|||
.last_version
|
||||
.clone()
|
||||
.filter(|v| crate::update::parse_version(v) < crate::update::parse_version(current));
|
||||
if settings.install_id.is_empty() {
|
||||
settings.install_id = crate::update::new_install_id();
|
||||
}
|
||||
crate::update::set_install_id(&settings.install_id);
|
||||
if settings.last_version.as_deref() != Some(current) {
|
||||
settings.last_version = Some(current.to_owned());
|
||||
let _ = settings.save();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue