summaryrefslogtreecommitdiffstats
path: root/api/logic/minecraft/Library.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2016-06-13 21:53:56 +0200
committerPetr Mrázek <peterix@gmail.com>2016-06-13 21:53:56 +0200
commitd4109938fe254aab9c37db5ba942482d365c4977 (patch)
treeaeb305a13bd3f4035431dda16fc260f8bcbbd6d6 /api/logic/minecraft/Library.cpp
parent56394f93e59b41c1de56ac3c53ebb7224dbc31c8 (diff)
downloadMultiMC-d4109938fe254aab9c37db5ba942482d365c4977.tar
MultiMC-d4109938fe254aab9c37db5ba942482d365c4977.tar.gz
MultiMC-d4109938fe254aab9c37db5ba942482d365c4977.tar.lz
MultiMC-d4109938fe254aab9c37db5ba942482d365c4977.tar.xz
MultiMC-d4109938fe254aab9c37db5ba942482d365c4977.zip
NOISSUE implement 'always-stale' cache entries
Diffstat (limited to 'api/logic/minecraft/Library.cpp')
-rw-r--r--api/logic/minecraft/Library.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/api/logic/minecraft/Library.cpp b/api/logic/minecraft/Library.cpp
index 584c7ac5..c516edb7 100644
--- a/api/logic/minecraft/Library.cpp
+++ b/api/logic/minecraft/Library.cpp
@@ -72,12 +72,17 @@ void Library::getApplicableFiles(OpSys system, QStringList& jar, QStringList& na
QList<NetActionPtr> Library::getDownloads(OpSys system, HttpMetaCache * cache, QStringList &failedFiles) const
{
QList<NetActionPtr> out;
+ bool isAlwaysStale = (hint() == "always-stale");
bool isLocal = (hint() == "local");
bool isForge = (hint() == "forge-pack-xz");
auto add_download = [&](QString storage, QString url, QString sha1 = QString())
{
auto entry = cache->resolveEntry("libraries", storage);
+ if(isAlwaysStale)
+ {
+ entry->setStale(true);
+ }
if (!entry->isStale())
return true;
if(isLocal)