Пример #1
0
        private void QueueDownload(ExtendedMod mod)
        {
            var matchingModObject = MissingMods.First(x => x.FileId == mod.FileId && x.ModId == mod.ModId);

            MissingMods.First(x => x == matchingModObject).IsIndeterminateProcess = true;

            _downloadClient.QueueDownload(mod, string.Empty);
        }
Пример #2
0
        private async void QueueDownload(object caller, PipedData pipedData)
        {
            if (!MissingMods.Any(x => x.FileId == pipedData.FileId && x.ModId == pipedData.ModId) || !_apiBase.IsUserLoggedIn())
            {
                return;
            }

            var downloadUrl = await _apiEndpoints.GenerateModDownloadLinkAsync(pipedData);

            var matchingModObject = MissingMods.First(x => x.FileId == pipedData.FileId && x.ModId == pipedData.ModId);

            MissingMods.First(x => x == matchingModObject).IsIndeterminateProcess = true;

            if (matchingModObject == null)
            {
                return;
            }

            _downloadClient.QueueDownload(downloadUrl, matchingModObject);
        }