mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-12 15:37:23 +01:00
adjust random order of files
This commit is contained in:
parent
f8c9d1e64f
commit
8878295f93
1 changed files with 1 additions and 2 deletions
|
|
@ -59,8 +59,7 @@ public partial class MareHub
|
|||
{
|
||||
var forbiddenFile = forbiddenFiles.SingleOrDefault(f => string.Equals(f.Hash, file.Hash, StringComparison.OrdinalIgnoreCase));
|
||||
|
||||
shardConfig.Shuffle();
|
||||
var matchedShardConfig = shardConfig.Find(f => f.FileMatchRegex.Match(file.Hash).Success);
|
||||
var matchedShardConfig = shardConfig.OrderBy(g => Guid.NewGuid()).FirstOrDefault(f => f.FileMatchRegex.Match(file.Hash).Success);
|
||||
var baseUrl = matchedShardConfig?.CdnFullUrl ?? _mainCdnFullUrl;
|
||||
|
||||
response.Add(new DownloadFileDto
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue