mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 06:35:52 +08:00
Fixes an issue reported by @rphohl that XSwiftBus is not found
* only download non-restricted versions * utility functions to find non-restricted versions
This commit is contained in:
@@ -56,6 +56,11 @@ namespace BlackMisc
|
||||
return m_platform.matchesAny(platform);
|
||||
}
|
||||
|
||||
bool CArtifact::hasUnrestrictedDistribution() const
|
||||
{
|
||||
return m_distributions.containsUnrestricted();
|
||||
}
|
||||
|
||||
bool CArtifact::isWithDistribution(const CDistribution &distribution, bool acceptMoreStableDistributions) const
|
||||
{
|
||||
if (distribution.isEmpty() || !this->hasDistributions()) { return false; }
|
||||
@@ -73,6 +78,7 @@ namespace BlackMisc
|
||||
CRemoteFile rf(this->getName(), this->getFileSize());
|
||||
const CDistribution d = this->getMostStableDistribution();
|
||||
const CUrl url = d.getDownloadUrls().getRandomUrl();
|
||||
if (url.isEmpty()) { return CRemoteFile(); }
|
||||
rf.setUtcTimestamp(this->getUtcTimestamp());
|
||||
rf.setUrl(url);
|
||||
rf.setDescription(this->getPlatform().toQString() + " " + d.getChannel());
|
||||
|
||||
Reference in New Issue
Block a user