feat: show skip offer countdown and transitions
This commit is contained in:
@@ -293,12 +293,12 @@ ProgressReports::ProgressReports(const std::string &path)
|
||||
: single(std::make_unique<ProgressReporter>(path)), active(single.get()) {}
|
||||
|
||||
void ProgressReports::registerFile(const std::string &identity, const std::string &path) {
|
||||
std::lock_guard lock(mutex);
|
||||
if (single || !ProgressReporter::validMediaIdentity(identity) || entries.size() >= 4096 ||
|
||||
path.empty() || path.front() != '/' || path.find('\0') != std::string::npos ||
|
||||
entries.contains(identity))
|
||||
throw std::runtime_error("Invalid or duplicate queue progress registration");
|
||||
for (const auto &[key, entry] : entries)
|
||||
if (entry.path == path) throw std::runtime_error("Duplicate queue progress report path");
|
||||
if (!paths.insert(path).second) throw std::runtime_error("Duplicate queue progress report path");
|
||||
entries.emplace(identity, Entry{path, nullptr});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user