Implement some sort of filtering

This commit is contained in:
2025-02-26 21:02:07 +01:00
parent 795060a05b
commit 336cb87a06
2 changed files with 113 additions and 44 deletions

View File

@@ -55,10 +55,17 @@ class Game {
throw Exception('No version found for $name');
}
actualVersion = version;
lastUpdated =
parseRfc822Date(
response.headers['last-modified'] ?? '',
).toIso8601String();
try {
// Some sites use weird ass dogshit fucking formats
// We cannot really reliably parse every single one of them
// So - fuck it
lastUpdated =
parseRfc822Date(
response.headers['last-modified'] ?? '',
).toIso8601String();
} catch (e) {
lastUpdated = DateTime.now().toIso8601String();
}
}
}