Add nightly/prerelease warnings

This commit is contained in:
Pk11
2022-02-21 04:26:35 -06:00
committed by Dark98
parent c91372f66b
commit 0a2848158c
9 changed files with 41 additions and 8 deletions
+20
View File
@@ -506,6 +506,26 @@ std::string Store::GetFileSizes(int index, const std::string &entry) const {
return "";
}
/*
Get file script type for each download entry.
int index: The index.
const std::string &entry: The entry name.
*/
std::string Store::GetFileTypes(int index, const std::string &entry) const {
if (!this->valid) return "";
if (index > (int)this->storeJson["storeContent"].size() - 1) return "";
if (this->storeJson["storeContent"][index].contains(entry) && this->storeJson["storeContent"][index][entry].type() == nlohmann::json::value_t::object) {
if (this->storeJson["storeContent"][index][entry].contains("type") && this->storeJson["storeContent"][index][entry]["type"].is_string()) {
return this->storeJson["storeContent"][index][entry]["type"];
}
}
return "";
}
/*
Get Screenshot URL list.
+1
View File
@@ -61,6 +61,7 @@ StoreEntry::StoreEntry(const std::unique_ptr<Store> &store, const std::unique_pt
if (!entries.empty()) {
for (int i = 0; i < (int)entries.size(); i++) {
this->Sizes.push_back( store->GetFileSizes(index, entries[i]) );
this->Types.push_back( store->GetFileTypes(index, entries[i]) );
}
}