Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion FModel/Framework/FRestRequest.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
using System;
using FModel.Settings;
using RestSharp;

namespace FModel.Framework;

public class FRestRequest : RestRequest
{
private const int TimeoutSeconds = 5;
private int TimeoutSeconds = UserSettings.Default.HttpRequestTimeout;

public FRestRequest(string url, Method method = Method.Get) : base(url, method)
{
Expand Down
7 changes: 7 additions & 0 deletions FModel/Settings/UserSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -544,5 +544,12 @@ public bool PreviewTexturesAssetExplorer
get => _previewTexturesAssetExplorer;
set => SetProperty(ref _previewTexturesAssetExplorer, value);
}

private int _httpRequestTimeout = 60;
public int HttpRequestTimeout
{
get => _httpRequestTimeout;
set => SetProperty(ref _httpRequestTimeout, value);
}
}
}
2 changes: 1 addition & 1 deletion FModel/ViewModels/CUE4ParseViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ await _threadWorkerView.Begin(cancellationToken =>
{
ChunkHostUri = new Uri("https://download.epicgames.com/", UriKind.Absolute),
ChunkCacheDirectory = Directory.CreateDirectory(Path.Combine(UserSettings.Default.OutputDirectory, ".data")),
Timeout = TimeSpan.FromSeconds(30)
Timeout = TimeSpan.FromSeconds(UserSettings.Default.HttpRequestTimeout)
};

switch (Provider)
Expand Down
2 changes: 1 addition & 1 deletion FModel/ViewModels/SettingsViewModel.cs
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dont need this

Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ public bool Save(out List<SettingsOut> whatShouldIDo)
UserSettings.Default.CurrentDir.Versioning.Options = SelectedOptions;
UserSettings.Default.CurrentDir.Versioning.MapStructTypes = SelectedMapStructTypes;
UserSettings.Default.CurrentDir.CriwareDecryptionKey = CriwareDecryptionKey;

UserSettings.Default.AssetLanguage = SelectedAssetLanguage;
UserSettings.Default.CompressedAudioMode = SelectedCompressedAudio;
UserSettings.Default.CosmeticStyle = SelectedCosmeticStyle;
Expand Down
1 change: 0 additions & 1 deletion FModel/Views/SettingsView.xaml
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use the correct input control

Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,6 @@
TextAlignment="Right"
TextChanged="CriwareKeyBox_TextChanged"
Loaded="CriwareKeyBox_Loaded"/>

</Grid>
</DataTemplate>
<DataTemplate x:Key="CreatorTemplate">
Expand Down
1 change: 1 addition & 0 deletions FModel/Views/SettingsView.xaml.cs
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dont need this

Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using FModel.Services;
using FModel.Settings;
using FModel.ViewModels;
Expand Down