From 74bd0e13e48288bdc74bf959e6b6158f7b258485 Mon Sep 17 00:00:00 2001 From: IridiumIO Date: Sun, 23 Aug 2026 18:33:26 +1000 Subject: [PATCH 001/134] Add support for folders in exclusion list - Uses globbing for wildcard support - Also fix bug where a full fileneame would be *included* not excluded from the exclusions - whoops --- CompactGUI.Core/CompactGUI.Core.csproj | 1 + CompactGUI.Core/Compactor.cs | 14 +++-- CompactGUI.Core/SkipListMatcher.cs | 61 +++++++++++++++++++ .../Settings/Settings_skiplistflyout.xaml.vb | 2 +- .../CompressableFolders/CompressableFolder.vb | 6 +- 5 files changed, 75 insertions(+), 9 deletions(-) create mode 100644 CompactGUI.Core/SkipListMatcher.cs diff --git a/CompactGUI.Core/CompactGUI.Core.csproj b/CompactGUI.Core/CompactGUI.Core.csproj index a60df545..b28d8054 100644 --- a/CompactGUI.Core/CompactGUI.Core.csproj +++ b/CompactGUI.Core/CompactGUI.Core.csproj @@ -14,6 +14,7 @@ + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/CompactGUI.Core/Compactor.cs b/CompactGUI.Core/Compactor.cs index 0c6071f9..7b43e3d1 100644 --- a/CompactGUI.Core/Compactor.cs +++ b/CompactGUI.Core/Compactor.cs @@ -15,7 +15,7 @@ public sealed class Compactor : ICompressor, IDisposable { private readonly string workingDirectory; - private readonly HashSet excludedFileExtensions; + private readonly HashSet exclusionList; private readonly WOFCompressionAlgorithm wofCompressionAlgorithm; @@ -33,7 +33,7 @@ public sealed class Compactor : ICompressor, IDisposable public Compactor(string folderPath, WOFCompressionAlgorithm compressionLevel, string[] excludedFileTypes, Analyser analyser, ILogger? logger = null) { workingDirectory = folderPath; - excludedFileExtensions = new HashSet(excludedFileTypes); + exclusionList = new HashSet(excludedFileTypes, StringComparer.OrdinalIgnoreCase); wofCompressionAlgorithm = compressionLevel; _logger = logger ?? NullLogger.Instance; _analyser = analyser; @@ -128,16 +128,18 @@ public async Task> BuildWorkingFilesList() var analysedFiles = await _analyser.GetAnalysedFilesAsync(cancellationTokenSource.Token); - var filesList = analysedFiles? + if (analysedFiles is null) return Enumerable.Empty(); + + var excludedFiles = SkipListMatcher.GetExcludedFiles(workingDirectory, analysedFiles.Select(f => f.FileName), exclusionList); + + return analysedFiles .Where(fl => fl.CompressionMode != wofCompressionAlgorithm && fl.UncompressedSize > clusterSize - && ((fl.FileInfo != null && !excludedFileExtensions.Contains(fl.FileInfo.Extension)) || excludedFileExtensions.Contains(fl.FileName)) + && !excludedFiles.Contains(fl.FileName) ) .Select(fl => new FileDetails(fl.FileName, fl.UncompressedSize)) .ToList(); - - return filesList; } diff --git a/CompactGUI.Core/SkipListMatcher.cs b/CompactGUI.Core/SkipListMatcher.cs new file mode 100644 index 00000000..79a52ef0 --- /dev/null +++ b/CompactGUI.Core/SkipListMatcher.cs @@ -0,0 +1,61 @@ +using Microsoft.Extensions.FileSystemGlobbing; + +namespace CompactGUI.Core; + +public static class SkipListMatcher +{ + public static HashSet GetExcludedFiles(string rootDirectory, IEnumerable allFiles, IEnumerable patterns) + { + var excluded = new HashSet(StringComparer.OrdinalIgnoreCase); + if (!patterns.Any()) return excluded; + + var matcher = new Matcher(StringComparison.OrdinalIgnoreCase); + foreach (string glob in NormalisePatterns(patterns)) + { + matcher.AddInclude(glob); + } + + var relativeFiles = allFiles.Select(f => Path.GetRelativePath(rootDirectory, f).Replace('\\', '/')); + + foreach (FilePatternMatch match in matcher.Match(relativeFiles).Files) + { + excluded.Add(Path.GetFullPath(Path.Combine(rootDirectory, match.Path))); + } + + return excluded; + } + + private static IEnumerable NormalisePatterns(IEnumerable entries) + { + foreach (string entry in entries) + { + string pattern = entry.Trim().Trim(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar); + if (pattern.Length == 0) continue; + + bool hasWildcard = pattern.Contains('*') || pattern.Contains('?'); + bool hasSeparator = pattern.Contains(Path.DirectorySeparatorChar) || pattern.Contains(Path.AltDirectorySeparatorChar); + + if (!hasSeparator && IsExtensionPattern(pattern)) + { + // Extension patterns (".mp4", "*.mp4") match any file with that extension at any depth to keep existnig skips working. + yield return "**/*" + (pattern.StartsWith('.') ? pattern : pattern[1..]); + } + else if (!hasWildcard && !hasSeparator) + { + // Legacy exact file names ("Thumbs.db"), matched at any depth. + yield return "**/" + pattern; + } + else + { + yield return NormalisePath(pattern); + } + } + } + + private static bool IsExtensionPattern(string pattern) + { + return pattern.StartsWith('.') || pattern.StartsWith("*."); + } + + private static string NormalisePath(string path) => path.Replace(Path.DirectorySeparatorChar, '/').Replace(Path.AltDirectorySeparatorChar, '/'); +} diff --git a/CompactGUI/Components/Settings/Settings_skiplistflyout.xaml.vb b/CompactGUI/Components/Settings/Settings_skiplistflyout.xaml.vb index 749ec77a..47bb2e1a 100644 --- a/CompactGUI/Components/Settings/Settings_skiplistflyout.xaml.vb +++ b/CompactGUI/Components/Settings/Settings_skiplistflyout.xaml.vb @@ -36,7 +36,7 @@ Public Class Settings_skiplistflyout Return cl.Content.ToString End Function).ToList - _settingsService.AppSettings.NonCompressableList = allObj.Where(Function(c) c.StartsWith("."c) AndAlso c.Length > 1).Distinct().ToList + _settingsService.AppSettings.NonCompressableList = allObj.Select(Function(c) c.Trim()).Where(Function(c) c.Length > 0).Distinct().ToList _settingsService.SaveSettings() PopulateTokens() diff --git a/CompactGUI/Models/CompressableFolders/CompressableFolder.vb b/CompactGUI/Models/CompressableFolders/CompressableFolder.vb index 815050f0..1c25870c 100644 --- a/CompactGUI/Models/CompressableFolders/CompressableFolder.vb +++ b/CompactGUI/Models/CompressableFolders/CompressableFolder.vb @@ -60,8 +60,10 @@ Public MustInherit Class CompressableFolder : Inherits ObservableObject : Implem Public ReadOnly Property GlobalPoorlyCompressedFileCount Get - If AnalysisResults Is Nothing OrElse Application.GetService(Of ISettingsService).AppSettings.NonCompressableList.Count = 0 Then Return 0 - Return AnalysisResults.Where(Function(fl) Application.GetService(Of ISettingsService).AppSettings.NonCompressableList.Contains(New IO.FileInfo(fl.FileName).Extension)).Count + Dim skipList = Application.GetService(Of ISettingsService).AppSettings.NonCompressableList + If AnalysisResults Is Nothing OrElse skipList.Count = 0 Then Return 0 + Dim excluded = SkipListMatcher.GetExcludedFiles(FolderName, AnalysisResults.Select(Function(fl) fl.FileName), skipList) + Return AnalysisResults.Where(Function(fl) excluded.Contains(fl.FileName)).Count End Get End Property From 86e32c4658dbd9ecc6e526229af3c01ffb41c987 Mon Sep 17 00:00:00 2001 From: IridiumIO Date: Sun, 23 Aug 2026 18:37:27 +1000 Subject: [PATCH 002/134] Switch skiplist tokeniser to use semicolon and comma instead of space to allow spaces in folder names to work --- CompactGUI/Components/Custom/TokenizedTextBox.vb | 4 +++- .../Components/Settings/Settings_skiplistflyout.xaml.vb | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CompactGUI/Components/Custom/TokenizedTextBox.vb b/CompactGUI/Components/Custom/TokenizedTextBox.vb index 68a26f00..ad4123d8 100644 --- a/CompactGUI/Components/Custom/TokenizedTextBox.vb +++ b/CompactGUI/Components/Custom/TokenizedTextBox.vb @@ -14,6 +14,8 @@ Public Class TokenizedTextBox : Inherits RichTextBox Public Property TokenMatcher As Func(Of String, Object) + Public Property TokenDelimiter As String = ";" + Public Sub New() AddHandler TextChanged, AddressOf OnTokenTextChanged @@ -32,7 +34,7 @@ Public Class TokenizedTextBox : Inherits RichTextBox End Sub Public Sub InsertText(text As String) - text &= " " + text &= TokenDelimiter AppendText(text) If TokenMatcher Is Nothing Then Return Dim token = TokenMatcher(text) diff --git a/CompactGUI/Components/Settings/Settings_skiplistflyout.xaml.vb b/CompactGUI/Components/Settings/Settings_skiplistflyout.xaml.vb index 47bb2e1a..611a907d 100644 --- a/CompactGUI/Components/Settings/Settings_skiplistflyout.xaml.vb +++ b/CompactGUI/Components/Settings/Settings_skiplistflyout.xaml.vb @@ -8,7 +8,7 @@ Public Class Settings_skiplistflyout InitializeComponent() _settingsService = Application.GetService(Of ISettingsService)() - UiTokenizedText.TokenMatcher = Function(text) If(text.EndsWith(" "c) OrElse text.EndsWith(";"c) OrElse text.EndsWith(","c), text.Substring(0, text.Length - 1).Trim(), Nothing) + UiTokenizedText.TokenMatcher = Function(text) If(text.EndsWith(";"c) OrElse text.EndsWith(","c), text.Substring(0, text.Length - 1).Trim(), Nothing) PopulateTokens() End Sub From 45827007355a37b4313558fb274d6ac51b70b592 Mon Sep 17 00:00:00 2001 From: IridiumIO Date: Sun, 23 Aug 2026 19:12:30 +1000 Subject: [PATCH 003/134] Updated skiplist editor to remove laggy tokenized box --- .../Components/Custom/TokenizedTextBox.vb | 86 ----------- .../Settings/Settings_skiplistflyout.xaml | 134 ++++++++++++------ .../Settings/Settings_skiplistflyout.xaml.vb | 98 +++++++++++-- CompactGUI/Themes/Generic.xaml | 17 +-- 4 files changed, 175 insertions(+), 160 deletions(-) delete mode 100644 CompactGUI/Components/Custom/TokenizedTextBox.vb diff --git a/CompactGUI/Components/Custom/TokenizedTextBox.vb b/CompactGUI/Components/Custom/TokenizedTextBox.vb deleted file mode 100644 index ad4123d8..00000000 --- a/CompactGUI/Components/Custom/TokenizedTextBox.vb +++ /dev/null @@ -1,86 +0,0 @@ -'Credit: https://blog.pixelingene.com/2010/10/tokenizing-control-convert-text-to-tokens - -Public Class TokenizedTextBox : Inherits RichTextBox - - Public Shared ReadOnly TokenTemplateProperty As DependencyProperty = DependencyProperty.Register("TokenTemplate", GetType(DataTemplate), GetType(TokenizedTextBox)) - Public Property TokenTemplate As DataTemplate - Get - Return GetValue(TokenTemplateProperty) - End Get - Set(value As DataTemplate) - SetValue(TokenTemplateProperty, value) - End Set - End Property - - Public Property TokenMatcher As Func(Of String, Object) - - Public Property TokenDelimiter As String = ";" - - Public Sub New() - - AddHandler TextChanged, AddressOf OnTokenTextChanged - - End Sub - - Private Sub OnTokenTextChanged(sender As Object, e As TextChangedEventArgs) - Dim text = CaretPosition.GetTextInRun(LogicalDirection.Backward) - If TokenMatcher Is Nothing Then Return - - Dim token = TokenMatcher(text) - If token IsNot Nothing Then - ReplaceTextWithToken(text, token) - End If - - End Sub - - Public Sub InsertText(text As String) - text &= TokenDelimiter - AppendText(text) - If TokenMatcher Is Nothing Then Return - Dim token = TokenMatcher(text) - If token IsNot Nothing Then - ReplaceTextWithToken(text, token) - End If - End Sub - - Private Sub ReplaceTextWithToken(inputText As String, token As Object) - - RemoveHandler TextChanged, AddressOf OnTokenTextChanged - - Dim para = CaretPosition.Paragraph - - Dim matchedRun As Run = para.Inlines.FirstOrDefault(Function(inline) - Dim run = TryCast(inline, Run) - Return (run IsNot Nothing AndAlso run.Text.EndsWith(inputText)) - End Function) - - If matchedRun IsNot Nothing Then - - Dim tokenContainer = CreateTokenContainer(inputText, token) - para.Inlines.InsertBefore(matchedRun, tokenContainer) - - If matchedRun.Text = inputText Then - para.Inlines.Remove(matchedRun) - Else - Dim index = matchedRun.Text.IndexOf(inputText) + inputText.Length - Dim tailEnd = New Run(matchedRun.Text.Substring(index)) - para.Inlines.InsertAfter(matchedRun, tailEnd) - para.Inlines.Remove(matchedRun) - End If - - End If - - AddHandler TextChanged, AddressOf OnTokenTextChanged - - End Sub - - Private Function CreateTokenContainer(inputText As String, token As Object) As InlineUIContainer - Dim presenter = New ContentPresenter() With { - .Content = token, - .ContentTemplate = TokenTemplate - } - - Return New InlineUIContainer(presenter) With {.BaselineAlignment = BaselineAlignment.Bottom} - - End Function -End Class diff --git a/CompactGUI/Components/Settings/Settings_skiplistflyout.xaml b/CompactGUI/Components/Settings/Settings_skiplistflyout.xaml index cca0717c..7e09c35a 100644 --- a/CompactGUI/Components/Settings/Settings_skiplistflyout.xaml +++ b/CompactGUI/Components/Settings/Settings_skiplistflyout.xaml @@ -5,14 +5,18 @@ xmlns:local="clr-namespace:CompactGUI" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml" - Width="620" Height="400" - d:DesignHeight="400" d:DesignWidth="500" - Background="{DynamicResource ApplicationBackgroundBrush}" + Width="620" + Height="400" + d:DesignHeight="400" + d:DesignWidth="500" ui:Design.Foreground="{DynamicResource TextFillColorPrimaryBrush}" + Background="{DynamicResource ApplicationBackgroundBrush}" ExtendsContentIntoTitleBar="True" Foreground="{DynamicResource TextFillColorPrimaryBrush}" - RenderOptions.BitmapScalingMode="HighQuality" RenderOptions.ClearTypeHint="Enabled" - WindowBackdropType="Mica" WindowStartupLocation="CenterScreen" + RenderOptions.BitmapScalingMode="HighQuality" + RenderOptions.ClearTypeHint="Enabled" + WindowBackdropType="Mica" + WindowStartupLocation="CenterScreen" mc:Ignorable="d"> @@ -25,17 +29,51 @@ - - - + Height="28" MinWidth="70" + Margin="5 8 5 0" Padding="10 0" + Background="#7AB3C6D8" BorderThickness="0" CornerRadius="5" Cursor="Hand"> + + + + + + + + + + + @@ -43,39 +81,47 @@ - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -112,7 +112,7 @@ + diff --git a/CompactGUI/Views/Pages/PendingCompression.xaml b/CompactGUI/Views/Pages/PendingCompression.xaml index 1a00997c..8035e357 100644 --- a/CompactGUI/Views/Pages/PendingCompression.xaml +++ b/CompactGUI/Views/Pages/PendingCompression.xaml @@ -4,6 +4,7 @@ xmlns:core="clr-namespace:CompactGUI.Core;assembly=CompactGUI.Core" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:CompactGUI" + xmlns:loc="clr-namespace:LazyTranslate;assembly=LazyTranslate" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml" d:DataContext="{d:DesignInstance Type=local:FolderViewModel}" @@ -21,9 +22,8 @@ - + --> - + @@ -140,16 +138,14 @@ Foreground="{StaticResource CardForeground}" Text="{Binding Folder.SkippedFileCount, StringFormat={} {0} files will be skipped}" /> - @@ -161,11 +157,11 @@ + diff --git a/CompactGUI/Views/Pages/ResultsTemplate.xaml b/CompactGUI/Views/Pages/ResultsTemplate.xaml index 29fc7cad..40511184 100644 --- a/CompactGUI/Views/Pages/ResultsTemplate.xaml +++ b/CompactGUI/Views/Pages/ResultsTemplate.xaml @@ -3,6 +3,7 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:CompactGUI" + xmlns:loc="clr-namespace:LazyTranslate;assembly=LazyTranslate" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml" d:DesignHeight="450" @@ -23,9 +24,8 @@ - + - + loc:L.Context="Compression size" + loc:L.Value="Before" /> - + loc:L.Context="Compression size" + loc:L.Value="After" /> @@ -69,9 +69,8 @@ Margin="0 0 20 20" Padding="10 20 10 20" Background="#30FFFFFF" BorderThickness="0"> - + @@ -81,9 +80,8 @@ Margin="0 0 20 20" Padding="10 20 10 20" Background="#30FFFFFF" BorderThickness="0"> - + @@ -96,9 +94,8 @@ Margin="0 0 20 20" Padding="10 20 10 20" Background="#30FFFFFF" BorderThickness="0"> - + @@ -115,25 +112,22 @@ @@ -151,3 +145,4 @@ + diff --git a/CompactGUI/Views/Pages/WatcherPage.xaml b/CompactGUI/Views/Pages/WatcherPage.xaml index 936422bf..663d0ef1 100644 --- a/CompactGUI/Views/Pages/WatcherPage.xaml +++ b/CompactGUI/Views/Pages/WatcherPage.xaml @@ -4,12 +4,13 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:CompactGUI" + xmlns:loc="clr-namespace:LazyTranslate;assembly=LazyTranslate" xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml" mc:Ignorable="d" d:DesignHeight="450" d:DesignWidth="800" - Title="{local:Localize PageNameWatcher}" - d:Title="WatcherPage"> + Title="{loc:T 'WatcherPage'}"> + diff --git a/CompactGUI/Views/SettingsPage.xaml b/CompactGUI/Views/SettingsPage.xaml index 6e2515c0..aefa4e57 100644 --- a/CompactGUI/Views/SettingsPage.xaml +++ b/CompactGUI/Views/SettingsPage.xaml @@ -4,6 +4,7 @@ xmlns:Flags="clr-namespace:FamFamFam.Flags.Wpf;assembly=FamFamFam.Flags.Wpf" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:i="http://schemas.microsoft.com/xaml/behaviors" + xmlns:loc="clr-namespace:LazyTranslate;assembly=LazyTranslate" xmlns:local="clr-namespace:CompactGUI" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml" @@ -20,11 +21,9 @@ - + - + @@ -36,6 +35,7 @@ + @@ -53,7 +53,7 @@ + Text="{Binding NativeName}" /> @@ -62,8 +62,20 @@ + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - Date: Sat, 5 Sep 2026 17:02:12 +1000 Subject: [PATCH 053/134] Disable details view for now --- .../ViewModels/SteamMonitorViewModel.vb | 2 +- CompactGUI/Views/Pages/SteamMonitorPage.xaml | 21 +++++++++---------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/CompactGUI/ViewModels/SteamMonitorViewModel.vb b/CompactGUI/ViewModels/SteamMonitorViewModel.vb index d86408a7..62bfd04a 100644 --- a/CompactGUI/ViewModels/SteamMonitorViewModel.vb +++ b/CompactGUI/ViewModels/SteamMonitorViewModel.vb @@ -423,7 +423,7 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject Await RunGameOperationAsync(game, True) End Function - + 'TODO: Fix the issue with creating a new StandardFolder - this does not allow the extensions to show up in the skiplist. Need to retain a thin version of the analyser results for this. Private Sub EditSkipList(game As SteamDetailedResult) If game Is Nothing OrElse game.IsWorking Then Return diff --git a/CompactGUI/Views/Pages/SteamMonitorPage.xaml b/CompactGUI/Views/Pages/SteamMonitorPage.xaml index c8b268e3..df8c3bb6 100644 --- a/CompactGUI/Views/Pages/SteamMonitorPage.xaml +++ b/CompactGUI/Views/Pages/SteamMonitorPage.xaml @@ -104,7 +104,7 @@ - + @@ -138,8 +138,7 @@ ItemsSource="{Binding FilteredSteamGames}" ScrollViewer.CanContentScroll="True" ScrollViewer.HorizontalScrollBarVisibility="Disabled" SelectedItem="{Binding SelectedGame, Mode=TwoWay}" - VirtualizingPanel.IsVirtualizing="True" VirtualizingPanel.ScrollUnit="Pixel" VirtualizingPanel.VirtualizationMode="Recycling" - Visibility="{Binding HasSelectedGame, Converter={StaticResource BooleanToInverseVisibilityConverter}}"> + VirtualizingPanel.IsVirtualizing="True" VirtualizingPanel.ScrollUnit="Pixel" VirtualizingPanel.VirtualizationMode="Recycling" Visibility="Visible"> + + + + + + + + + + + + + + + + + + + + + + + @@ -355,7 +394,7 @@ + Visibility="Collapsed"> From 3a6023b5ba7db66ed55f5c8face028addd7413ee Mon Sep 17 00:00:00 2001 From: IridiumIO Date: Sat, 5 Sep 2026 19:09:29 +1000 Subject: [PATCH 055/134] Steam Library - Add checkboxes and add multiple to queue --- .../Messages/SteamGamesAddedToQueueMessage.vb | 17 ++++ CompactGUI/Resources/Localisation/en-AU.toml | 6 ++ CompactGUI/Resources/Localisation/es-ES.toml | 6 ++ CompactGUI/Resources/Localisation/ru-RU.toml | 6 ++ CompactGUI/Resources/Localisation/zh-CN.toml | 6 ++ CompactGUI/ViewModels/HomeViewModel.vb | 27 ++++-- .../ViewModels/SteamMonitorViewModel.vb | 55 ++++++++++++ CompactGUI/Views/Pages/SteamMonitorPage.xaml | 83 ++++++++++++++++++- .../Views/Pages/SteamMonitorPage.xaml.vb | 57 +++++++++++++ 9 files changed, 254 insertions(+), 9 deletions(-) create mode 100644 CompactGUI/Messages/SteamGamesAddedToQueueMessage.vb diff --git a/CompactGUI/Messages/SteamGamesAddedToQueueMessage.vb b/CompactGUI/Messages/SteamGamesAddedToQueueMessage.vb new file mode 100644 index 00000000..ed3048ad --- /dev/null +++ b/CompactGUI/Messages/SteamGamesAddedToQueueMessage.vb @@ -0,0 +1,17 @@ +Imports CommunityToolkit.Mvvm.Messaging.Messages + +Public Class SteamGamesAddedToQueueMessage : Inherits ValueChangedMessage(Of IReadOnlyList(Of SteamQueueItem)) + Public Sub New(value As IReadOnlyList(Of SteamQueueItem)) + MyBase.New(value) + End Sub +End Class + +Public Class SteamQueueItem + Public ReadOnly Property FolderPath As String + Public ReadOnly Property CompressionOptions As CompressionOptions + + Public Sub New(folderPath As String, compressionOptions As CompressionOptions) + Me.FolderPath = folderPath + Me.CompressionOptions = compressionOptions + End Sub +End Class diff --git a/CompactGUI/Resources/Localisation/en-AU.toml b/CompactGUI/Resources/Localisation/en-AU.toml index f58dbbdf..475defa7 100644 --- a/CompactGUI/Resources/Localisation/en-AU.toml +++ b/CompactGUI/Resources/Localisation/en-AU.toml @@ -7,6 +7,7 @@ "Add" = "Add" "Add Folder to Queue" = "Add Folder to Queue" "Add a custom folder to the watchlist" = "Add a custom folder to the watchlist" +"Add all to queue" = "Add all to queue" "Add to Compression Queue" = "Add to Compression Queue" "Add to compression queue" = "Add to compression queue" "Add to right-click context menu" = "Add to right-click context menu" @@ -108,8 +109,10 @@ "Scanning installed Steam games..." = "Scanning installed Steam games..." "Search by game name or SteamID..." = "Search by game name or SteamID..." "Select a folder to compress" = "Select a folder to compress" +"Select all visible games" = "Select all visible games" "Settings" = "Settings" "Show notification on completion" = "Show notification on completion" +"Sort" = "Sort" "Sort By" = "Sort By" "Space Saved" = "Space Saved" "Start CompactGUI in system tray" = "Start CompactGUI in system tray" @@ -133,7 +136,10 @@ "Update Available ▸ Version {0}" = "Update Available ▸ Version {0}" "Update Settings" = "Update Settings" "Update in Steam" = "Update in Steam" +"Use global skiplist" = "Use global skiplist" +"Use recommended compression level" = "Use recommended compression level" "Use skip list" = "Use skip list" +"Use smart skiplist" = "Use smart skiplist" "Version" = "Version" "Watch folder for changes" = "Watch folder for changes" "Watched Folders" = "Watched Folders" diff --git a/CompactGUI/Resources/Localisation/es-ES.toml b/CompactGUI/Resources/Localisation/es-ES.toml index 725760bb..d39f24c8 100644 --- a/CompactGUI/Resources/Localisation/es-ES.toml +++ b/CompactGUI/Resources/Localisation/es-ES.toml @@ -7,6 +7,7 @@ "Add" = "Añadir " "Add Folder to Queue" = "Añadir carpeta a la cola" "Add a custom folder to the watchlist" = "Añadir carpeta personalizada a la lista" +"Add all to queue" = "Add all to queue" # LOC:TODO "Add to Compression Queue" = "Add to Compression Queue" # LOC:TODO "Add to compression queue" = "Añadir a la cola de compresión" "Add to right-click context menu" = "Añadir al menú contextual" @@ -108,8 +109,10 @@ "Scanning installed Steam games..." = "Scanning installed Steam games..." # LOC:TODO "Search by game name or SteamID..." = "Buscar por nombre o SteamID..." "Select a folder to compress" = "Select a folder to compress" # LOC:TODO +"Select all visible games" = "Select all visible games" # LOC:TODO "Settings" = "Ajustes" "Show notification on completion" = "Mostrar notificación al finalizar" +"Sort" = "Sort" # LOC:TODO "Sort By" = "Ordenar por" "Space Saved" = "Espacio ahorrado" "Start CompactGUI in system tray" = "Iniciar CompactGUI en la bandeja del sistema" @@ -133,7 +136,10 @@ "Update Available ▸ Version {0}" = "Actualización disponible ▸ Versión {0}" "Update Settings" = "Ajustes de actualización" "Update in Steam" = "Update in Steam" # LOC:TODO +"Use global skiplist" = "Use global skiplist" # LOC:TODO +"Use recommended compression level" = "Use recommended compression level" # LOC:TODO "Use skip list" = "Usar lista de exclusión" +"Use smart skiplist" = "Use smart skiplist" # LOC:TODO "Version" = "Versión" "Watch folder for changes" = "Monitorizar cambios en carpeta" "Watched Folders" = "Carpetas monitorizadas" diff --git a/CompactGUI/Resources/Localisation/ru-RU.toml b/CompactGUI/Resources/Localisation/ru-RU.toml index c77f2947..83ceb7d2 100644 --- a/CompactGUI/Resources/Localisation/ru-RU.toml +++ b/CompactGUI/Resources/Localisation/ru-RU.toml @@ -7,6 +7,7 @@ "Add" = "Добавить" "Add Folder to Queue" = "Добавить папку в очередь" "Add a custom folder to the watchlist" = "Добавить свою папку в список отслеживания" +"Add all to queue" = "Add all to queue" # LOC:TODO "Add to Compression Queue" = "Add to Compression Queue" # LOC:TODO "Add to compression queue" = "Добавить в очередь сжатия" "Add to right-click context menu" = "Добавить в контекстное меню правой кнопки мыши" @@ -108,8 +109,10 @@ "Scanning installed Steam games..." = "Scanning installed Steam games..." # LOC:TODO "Search by game name or SteamID..." = "Поиск по названию игры или SteamID..." "Select a folder to compress" = "Select a folder to compress" # LOC:TODO +"Select all visible games" = "Select all visible games" # LOC:TODO "Settings" = "Настройки" "Show notification on completion" = "Показывать уведомление о завершении" +"Sort" = "Sort" # LOC:TODO "Sort By" = "Сортировать по" "Space Saved" = "Сэкономлено места" "Start CompactGUI in system tray" = "Запускать CompactGUI в области уведомлений" @@ -133,7 +136,10 @@ "Update Available ▸ Version {0}" = "Доступно обновление ▸ Версия {0}" "Update Settings" = "Настройки обновлений" "Update in Steam" = "Update in Steam" # LOC:TODO +"Use global skiplist" = "Use global skiplist" # LOC:TODO +"Use recommended compression level" = "Use recommended compression level" # LOC:TODO "Use skip list" = "Использовать список исключений" +"Use smart skiplist" = "Use smart skiplist" # LOC:TODO "Version" = "Версия" "Watch folder for changes" = "Отслеживать изменения в папке" "Watched Folders" = "Отслеживаемые папки" diff --git a/CompactGUI/Resources/Localisation/zh-CN.toml b/CompactGUI/Resources/Localisation/zh-CN.toml index eeb43661..650aa888 100644 --- a/CompactGUI/Resources/Localisation/zh-CN.toml +++ b/CompactGUI/Resources/Localisation/zh-CN.toml @@ -7,6 +7,7 @@ "Add" = "添加" "Add Folder to Queue" = "添加文件夹到队列" "Add a custom folder to the watchlist" = "添加自定义文件夹到监控列表" +"Add all to queue" = "Add all to queue" # LOC:TODO "Add to Compression Queue" = "Add to Compression Queue" # LOC:TODO "Add to compression queue" = "添加到压缩队列" "Add to right-click context menu" = "添加到右键菜单" @@ -108,8 +109,10 @@ "Scanning installed Steam games..." = "Scanning installed Steam games..." # LOC:TODO "Search by game name or SteamID..." = "按游戏名称或 SteamID 搜索..." "Select a folder to compress" = "Select a folder to compress" # LOC:TODO +"Select all visible games" = "Select all visible games" # LOC:TODO "Settings" = "设置" "Show notification on completion" = "完成后显示通知" +"Sort" = "Sort" # LOC:TODO "Sort By" = "排序方式" "Space Saved" = "节省空间" "Start CompactGUI in system tray" = "在系统托盘启动 CompactGUI" @@ -133,7 +136,10 @@ "Update Available ▸ Version {0}" = "更新可用 ▸ 版本 {0}" "Update Settings" = "更新设置" "Update in Steam" = "Update in Steam" # LOC:TODO +"Use global skiplist" = "Use global skiplist" # LOC:TODO +"Use recommended compression level" = "Use recommended compression level" # LOC:TODO "Use skip list" = "使用跳过列表" +"Use smart skiplist" = "Use smart skiplist" # LOC:TODO "Version" = "版本" "Watch folder for changes" = "监控文件夹更改" "Watched Folders" = "受监控文件夹" diff --git a/CompactGUI/ViewModels/HomeViewModel.vb b/CompactGUI/ViewModels/HomeViewModel.vb index ad565602..7571cb11 100644 --- a/CompactGUI/ViewModels/HomeViewModel.vb +++ b/CompactGUI/ViewModels/HomeViewModel.vb @@ -13,7 +13,7 @@ Imports CompactGUI.Logging Imports Microsoft.Extensions.Logging -Partial Public NotInheritable Class HomeViewModel : Inherits ObservableRecipient : Implements IRecipient(Of WatcherAddedFolderToQueueMessage) +Partial Public NotInheritable Class HomeViewModel : Inherits ObservableRecipient : Implements IRecipient(Of WatcherAddedFolderToQueueMessage), IRecipient(Of SteamGamesAddedToQueueMessage) Private ReadOnly _folderViewModels As New Dictionary(Of CompressableFolder, FolderViewModel) @@ -64,6 +64,7 @@ Partial Public NotInheritable Class HomeViewModel : Inherits ObservableRecipient Sub New(watcher As Watcher.Watcher, snackbarService As CustomSnackBarService, logger As ILogger(Of HomeViewModel), settingsService As ISettingsService, compressableFolderService As CompressableFolderService) WeakReferenceMessenger.Default.Register(Of WatcherAddedFolderToQueueMessage)(Me) + WeakReferenceMessenger.Default.Register(Of SteamGamesAddedToQueueMessage)(Me) AddHandler Folders.CollectionChanged, AddressOf OnFoldersCollectionChanged _watcher = watcher _snackbarService = snackbarService @@ -106,7 +107,7 @@ Partial Public NotInheritable Class HomeViewModel : Inherits ObservableRecipient - Public Async Function AddFoldersAsync(folderPaths As IEnumerable(Of String)) As Task + Public Async Function AddFoldersAsync(folderPaths As IEnumerable(Of String), Optional queueOptions As IReadOnlyDictionary(Of String, CompressionOptions) = Nothing) As Task HomeViewModelLog.AddingFolders(_logger, folderPaths) @@ -128,6 +129,10 @@ Partial Public NotInheritable Class HomeViewModel : Inherits ObservableRecipient newFolder.CompressionOptions.SkipPoorlyCompressedFileTypes = _settingsService.AppSettings.SkipNonCompressable newFolder.CompressionOptions.SkipUserSubmittedFiletypes = _settingsService.AppSettings.SkipUserNonCompressable + Dim requestedOptions As CompressionOptions = Nothing + Dim hasRequestedOptions = queueOptions?.TryGetValue(folderName, requestedOptions) + If hasRequestedOptions Then newFolder.CompressionOptions = requestedOptions.Clone() + If Not Folders.Any(Function(f) f.FolderName = newFolder.FolderName) Then Folders.Add(newFolder) Dim vm As New FolderViewModel(newFolder, _watcher, _snackbarService, _compressableFolderService) @@ -149,11 +154,13 @@ Partial Public NotInheritable Class HomeViewModel : Inherits ObservableRecipient If _watcher.WatchedFolders.Any(Function(w) w.Folder = newFolder.FolderName) Then Dim watchedFolder = _watcher.WatchedFolders.First(Function(w) w.Folder = newFolder.FolderName) newFolder.CompressionOptions.WatchFolderForChanges = True - If watchedFolder.CompressionLevel <> Core.WOFCompressionAlgorithm.NO_COMPRESSION Then - newFolder.CompressionOptions.SelectedCompressionMode = Core.WOFHelper.CompressionModeFromWOFMode(watchedFolder.CompressionLevel) - End If - If watchedFolder.SkipList IsNot Nothing Then - newFolder.CompressionOptions.SkipList = New List(Of String)(watchedFolder.SkipList) + If Not hasRequestedOptions Then + If watchedFolder.CompressionLevel <> Core.WOFCompressionAlgorithm.NO_COMPRESSION Then + newFolder.CompressionOptions.SelectedCompressionMode = Core.WOFHelper.CompressionModeFromWOFMode(watchedFolder.CompressionLevel) + End If + If watchedFolder.SkipList IsNot Nothing Then + newFolder.CompressionOptions.SkipList = New List(Of String)(watchedFolder.SkipList) + End If End If End If @@ -320,4 +327,10 @@ Partial Public NotInheritable Class HomeViewModel : Inherits ObservableRecipient Application.GetService(Of CustomSnackBarService).ShowAddedToQueue() Await AddFoldersAsync({message.Value}) End Sub + + Public Async Sub Receive(message As SteamGamesAddedToQueueMessage) Implements IRecipient(Of SteamGamesAddedToQueueMessage).Receive + Application.GetService(Of CustomSnackBarService).ShowAddedToQueue() + Dim options = message.Value.GroupBy(Function(item) item.FolderPath, StringComparer.OrdinalIgnoreCase).ToDictionary(Function(group) group.Key, Function(group) group.Last().CompressionOptions, StringComparer.OrdinalIgnoreCase) + Await AddFoldersAsync(options.Keys, options) + End Sub End Class diff --git a/CompactGUI/ViewModels/SteamMonitorViewModel.vb b/CompactGUI/ViewModels/SteamMonitorViewModel.vb index 8cbbaae8..a66c2f87 100644 --- a/CompactGUI/ViewModels/SteamMonitorViewModel.vb +++ b/CompactGUI/ViewModels/SteamMonitorViewModel.vb @@ -31,6 +31,7 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject Private ReadOnly _operationGate As New SemaphoreSlim(1, 1) Private ReadOnly _imageDownloadGate As New SemaphoreSlim(4, 4) Private ReadOnly _trackedSteamGames As New HashSet(Of SteamDetailedResult) + Private ReadOnly _selectedGames As New List(Of SteamDetailedResult) Private Shared ReadOnly SteamImageClient As New HttpClient() Private _activeFolder As StandardFolder Private _activeGame As SteamDetailedResult @@ -56,12 +57,35 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject Private _selectedGame As SteamDetailedResult + + + Private _selectedGameCount As Integer + + + + Private _useRecommendedCompressionLevel As Boolean = True + + + Private _queueCompressionMode As Core.CompressionMode = Core.CompressionMode.XPRESS4K + + + Private _useGlobalSkiplist As Boolean + + + Private _useSmartSkiplist As Boolean + Public ReadOnly Property HasSelectedGame As Boolean Get Return SelectedGame IsNot Nothing End Get End Property + Public ReadOnly Property HasSelectedGames As Boolean + Get + Return SelectedGameCount > 0 + End Get + End Property + Public ReadOnly Property SteamGamesData As New ObservableCollection(Of SteamDetailedResult) Public ReadOnly Property LibraryLocations As New ObservableCollection(Of SteamLibraryFilterOption) Public ReadOnly Property FilteredSteamGames As ICollectionView @@ -97,6 +121,9 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject _analyserLogger = analyserLogger _navigationService = navigationService _settingsService = settingsService + QueueCompressionMode = settingsService.AppSettings.SelectedCompressionMode + UseGlobalSkiplist = settingsService.AppSettings.SkipNonCompressable + UseSmartSkiplist = settingsService.AppSettings.SkipUserNonCompressable FilteredSteamGames = CollectionViewSource.GetDefaultView(SteamGamesData) FilteredSteamGames.Filter = AddressOf FilterGames AddHandler SteamGamesData.CollectionChanged, AddressOf OnSteamGamesCollectionChanged @@ -150,6 +177,8 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject Private Async Function RefreshAll() As Task SelectedGame = Nothing + _selectedGames.Clear() + SelectedGameCount = 0 SteamGamesData.Clear() _hasLoaded = False Await LoadGamesAsync() @@ -197,6 +226,32 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject Return True End Function + Friend Sub UpdateSelectedGames(selectedItems As IList) + _selectedGames.Clear() + _selectedGames.AddRange(selectedItems.Cast(Of SteamDetailedResult)) + SelectedGameCount = _selectedGames.Count + AddSelectedToQueueCommand.NotifyCanExecuteChanged() + End Sub + + + Private Sub AddSelectedToQueue() + Dim requests = _selectedGames.Select(Function(game) + Dim mode = If(UseRecommendedCompressionLevel, game.RecommendedCompressionMode.Value, QueueCompressionMode) + Dim options As New CompressionOptions With { + .SelectedCompressionMode = mode, + .SkipPoorlyCompressedFileTypes = UseGlobalSkiplist, + .SkipUserSubmittedFiletypes = UseSmartSkiplist, + .SkipListEnabled = UseGlobalSkiplist OrElse UseSmartSkiplist + } + Return New SteamQueueItem(game.GamePath, options) + End Function).ToList() + WeakReferenceMessenger.Default.Send(New SteamGamesAddedToQueueMessage(requests)) + End Sub + + Private Function CanAddSelectedToQueue() As Boolean + Return _selectedGames.Count > 0 AndAlso (Not UseRecommendedCompressionLevel OrElse _selectedGames.All(Function(game) game.RecommendedCompressionMode.HasValue)) + End Function + Private Sub FilterLibrary(path As String) _libraryFilter = If(String.Equals(_libraryFilter, path, StringComparison.OrdinalIgnoreCase), Nothing, path) diff --git a/CompactGUI/Views/Pages/SteamMonitorPage.xaml b/CompactGUI/Views/Pages/SteamMonitorPage.xaml index 1293f292..84e00c00 100644 --- a/CompactGUI/Views/Pages/SteamMonitorPage.xaml +++ b/CompactGUI/Views/Pages/SteamMonitorPage.xaml @@ -12,6 +12,7 @@ d:DesignHeight="600" d:DesignWidth="1100" Loaded="OnLoaded" + Unloaded="OnUnloaded" mc:Ignorable="d"> @@ -152,6 +153,10 @@ + - + SelectionChanged="OnSteamGamesSelectionChanged" SelectionMode="Extended" VirtualizingPanel.IsVirtualizing="True" VirtualizingPanel.ScrollUnit="Pixel" VirtualizingPanel.VirtualizationMode="Recycling" + Visibility="Visible"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 AndAlso visibleGames.All(Function(game) SteamGamesList.SelectedItems.Contains(game)) + + _isUpdatingSelection = True + If allVisibleSelected Then + For Each game In visibleGames + SteamGamesList.SelectedItems.Remove(game) + Next + Else + For Each game In visibleGames + If Not SteamGamesList.SelectedItems.Contains(game) Then SteamGamesList.SelectedItems.Add(game) + Next + End If + _isUpdatingSelection = False + + _viewModel.UpdateSelectedGames(SteamGamesList.SelectedItems) + UpdateMasterCheckbox() + End Sub + + Private Sub OnVisibleGamesChanged(sender As Object, e As System.Collections.Specialized.NotifyCollectionChangedEventArgs) + Dispatcher.BeginInvoke(New Action(AddressOf UpdateMasterCheckbox)) + End Sub + + Private Sub UpdateMasterCheckbox() + Dim visibleGames = SteamGamesList.Items.Cast(Of Object).ToList() + Dim selectedCount = visibleGames.Where(Function(game) SteamGamesList.SelectedItems.Contains(game)).Count() + + If selectedCount = 0 Then + SelectAllVisibleCheckBox.IsChecked = False + ElseIf selectedCount = visibleGames.Count Then + SelectAllVisibleCheckBox.IsChecked = True + Else + SelectAllVisibleCheckBox.IsChecked = Nothing + End If End Sub Private Sub OnCompressSplitButtonLoaded(sender As Object, e As RoutedEventArgs) From 59fc241c9b2a049ec6401a910fc8d770d23b5ae6 Mon Sep 17 00:00:00 2001 From: IridiumIO Date: Sat, 5 Sep 2026 19:11:07 +1000 Subject: [PATCH 056/134] add a margin to last item in steam library view so selection banner doesn't hide it --- CompactGUI/Views/Pages/SteamMonitorPage.xaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/CompactGUI/Views/Pages/SteamMonitorPage.xaml b/CompactGUI/Views/Pages/SteamMonitorPage.xaml index 84e00c00..a63a031a 100644 --- a/CompactGUI/Views/Pages/SteamMonitorPage.xaml +++ b/CompactGUI/Views/Pages/SteamMonitorPage.xaml @@ -185,6 +185,22 @@ SelectedItem="{Binding SelectedGame, Mode=TwoWay}" SelectionChanged="OnSteamGamesSelectionChanged" SelectionMode="Extended" VirtualizingPanel.IsVirtualizing="True" VirtualizingPanel.ScrollUnit="Pixel" VirtualizingPanel.VirtualizationMode="Recycling" Visibility="Visible"> + + + + + + + + + + @@ -83,6 +93,7 @@ + + + + + + + + + + + + + + + + + + @@ -992,58 +1029,69 @@ - + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Content="{loc:T Add selected to queue}" /> diff --git a/CompactGUI/Views/Pages/SteamMonitorPage.xaml.vb b/CompactGUI/Views/Pages/SteamMonitorPage.xaml.vb index 662da1a2..6c5e7c21 100644 --- a/CompactGUI/Views/Pages/SteamMonitorPage.xaml.vb +++ b/CompactGUI/Views/Pages/SteamMonitorPage.xaml.vb @@ -32,20 +32,35 @@ Public Class SteamMonitorPage UpdateMasterCheckbox() End Sub + 'Today I learned about Func and this seems like a perfectly dumb place to use it Private Sub OnSelectAllVisibleClick(sender As Object, e As RoutedEventArgs) Dim visibleGames = SteamGamesList.Items.Cast(Of Object).ToList() Dim allVisibleSelected = visibleGames.Count > 0 AndAlso visibleGames.All(Function(game) SteamGamesList.SelectedItems.Contains(game)) + SetVisibleSelection(Function(game) Not allVisibleSelected) + End Sub + + Private Sub OnSelectAllClick(sender As Object, e As RoutedEventArgs) + SetVisibleSelection(Function(game) True) + End Sub + + Private Sub OnSelectAllCompressableClick(sender As Object, e As RoutedEventArgs) + SetVisibleSelection(Function(game) game.CanCompress) + End Sub + + Private Sub OnDeselectAllClick(sender As Object, e As RoutedEventArgs) + SetVisibleSelection(Function(game) False) + End Sub + + Private Sub SetVisibleSelection(shouldSelect As Func(Of SteamDetailedResult, Boolean)) _isUpdatingSelection = True - If allVisibleSelected Then - For Each game In visibleGames - SteamGamesList.SelectedItems.Remove(game) - Next - Else - For Each game In visibleGames + For Each game As SteamDetailedResult In SteamGamesList.Items + If shouldSelect(game) Then If Not SteamGamesList.SelectedItems.Contains(game) Then SteamGamesList.SelectedItems.Add(game) - Next - End If + Else + SteamGamesList.SelectedItems.Remove(game) + End If + Next _isUpdatingSelection = False _viewModel.UpdateSelectedGames(SteamGamesList.SelectedItems) From ccdac2258916ef8f3d6973677adcad6a29e1705d Mon Sep 17 00:00:00 2001 From: IridiumIO Date: Sun, 6 Sep 2026 10:41:50 +1000 Subject: [PATCH 058/134] Split Queue into its own view and added it to all pages --- CompactGUI/MainWindow.xaml | 30 ++- CompactGUI/MainWindow.xaml.vb | 2 + CompactGUI/Resources/Localisation/en-AU.toml | 1 - CompactGUI/Resources/Localisation/es-ES.toml | 2 +- CompactGUI/Resources/Localisation/ru-RU.toml | 2 +- CompactGUI/Resources/Localisation/zh-CN.toml | 2 +- CompactGUI/ViewModels/MainWindowViewModel.vb | 8 + CompactGUI/Views/Pages/FolderView.xaml | 2 +- CompactGUI/Views/Pages/HomePage.xaml | 254 ++++-------------- CompactGUI/Views/Pages/HomePage.xaml.vb | 2 +- .../Views/Pages/PendingCompression.xaml | 32 ++- CompactGUI/Views/Pages/QueueSidebar.xaml | 159 +++++++++++ CompactGUI/Views/Pages/QueueSidebar.xaml.vb | 32 +++ 13 files changed, 296 insertions(+), 232 deletions(-) create mode 100644 CompactGUI/Views/Pages/QueueSidebar.xaml create mode 100644 CompactGUI/Views/Pages/QueueSidebar.xaml.vb diff --git a/CompactGUI/MainWindow.xaml b/CompactGUI/MainWindow.xaml index 94a3af12..28bd0202 100644 --- a/CompactGUI/MainWindow.xaml +++ b/CompactGUI/MainWindow.xaml @@ -63,8 +63,7 @@ Tag="{Binding}" TargetPageType="{x:Type local:SteamMonitorPage}"> - @@ -114,7 +113,32 @@ - + + + + + + + + + + + + + + + + + + + diff --git a/CompactGUI/MainWindow.xaml.vb b/CompactGUI/MainWindow.xaml.vb index 185b3d03..565cd587 100644 --- a/CompactGUI/MainWindow.xaml.vb +++ b/CompactGUI/MainWindow.xaml.vb @@ -52,10 +52,12 @@ Class MainWindow : Implements INavigationWindow, INotifyPropertyChanged Private Sub OnNavigated(sender As NavigationView, args As NavigatedEventArgs) If args.Page.GetType Is GetType(HomePage) Then _isOnHomePage = True + QueueOverlayHost.Visibility = Visibility.Collapsed _MainWindowViewModel.IsActive = True HVPropertyChanged(Application.GetService(Of HomeViewModel)(), New PropertyChangedEventArgs(NameOf(HomeViewModel.HomeViewIsFresh))) Else _isOnHomePage = False + QueueOverlayHost.Visibility = Visibility.Visible _MainWindowViewModel.IsActive = False ProgTitle.Visibility = Visibility.Visible End If diff --git a/CompactGUI/Resources/Localisation/en-AU.toml b/CompactGUI/Resources/Localisation/en-AU.toml index a1e08304..aa8bc85e 100644 --- a/CompactGUI/Resources/Localisation/en-AU.toml +++ b/CompactGUI/Resources/Localisation/en-AU.toml @@ -5,7 +5,6 @@ # Translations "Add" = "Add" -"Add Folder to Queue" = "Add Folder to Queue" "Add a custom folder to the watchlist" = "Add a custom folder to the watchlist" "Add selected to queue" = "Add selected to queue" "Add to Compression Queue" = "Add to Compression Queue" diff --git a/CompactGUI/Resources/Localisation/es-ES.toml b/CompactGUI/Resources/Localisation/es-ES.toml index 033c454c..0a003c0f 100644 --- a/CompactGUI/Resources/Localisation/es-ES.toml +++ b/CompactGUI/Resources/Localisation/es-ES.toml @@ -5,7 +5,6 @@ # Translations "Add" = "Añadir " -"Add Folder to Queue" = "Añadir carpeta a la cola" "Add a custom folder to the watchlist" = "Añadir carpeta personalizada a la lista" "Add selected to queue" = "Add selected to queue" # LOC:TODO "Add to Compression Queue" = "Add to Compression Queue" # LOC:TODO @@ -229,6 +228,7 @@ "saved" = "ahorrado" [obsolete] +"Add Folder to Queue" = "Añadir carpeta a la cola" "Add all to queue" = "Add all to queue" # LOC:TODO "Custom list — {0} entries" = "Lista personalizada — {0} entradas" "Custom: {0} entries" = "Personalizada: {0} entradas" diff --git a/CompactGUI/Resources/Localisation/ru-RU.toml b/CompactGUI/Resources/Localisation/ru-RU.toml index 282c4269..91d3e511 100644 --- a/CompactGUI/Resources/Localisation/ru-RU.toml +++ b/CompactGUI/Resources/Localisation/ru-RU.toml @@ -5,7 +5,6 @@ # Translations "Add" = "Добавить" -"Add Folder to Queue" = "Добавить папку в очередь" "Add a custom folder to the watchlist" = "Добавить свою папку в список отслеживания" "Add selected to queue" = "Add selected to queue" # LOC:TODO "Add to Compression Queue" = "Add to Compression Queue" # LOC:TODO @@ -229,6 +228,7 @@ "saved" = "сэкономлено" [obsolete] +"Add Folder to Queue" = "Добавить папку в очередь" "Add all to queue" = "Add all to queue" # LOC:TODO "Custom list — {0} entries" = "Свой список — {0} записей" "Custom: {0} entries" = "Свой: {0} записей" diff --git a/CompactGUI/Resources/Localisation/zh-CN.toml b/CompactGUI/Resources/Localisation/zh-CN.toml index 46c5cd77..20934ac5 100644 --- a/CompactGUI/Resources/Localisation/zh-CN.toml +++ b/CompactGUI/Resources/Localisation/zh-CN.toml @@ -5,7 +5,6 @@ # Translations "Add" = "添加" -"Add Folder to Queue" = "添加文件夹到队列" "Add a custom folder to the watchlist" = "添加自定义文件夹到监控列表" "Add selected to queue" = "Add selected to queue" # LOC:TODO "Add to Compression Queue" = "Add to Compression Queue" # LOC:TODO @@ -229,6 +228,7 @@ "saved" = "已节省" [obsolete] +"Add Folder to Queue" = "添加文件夹到队列" "Add all to queue" = "Add all to queue" # LOC:TODO "Custom list — {0} entries" = "自定义列表 — {0} 条" "Custom: {0} entries" = "自定义: {0} 条" diff --git a/CompactGUI/ViewModels/MainWindowViewModel.vb b/CompactGUI/ViewModels/MainWindowViewModel.vb index bf6f914c..3855106d 100644 --- a/CompactGUI/ViewModels/MainWindowViewModel.vb +++ b/CompactGUI/ViewModels/MainWindowViewModel.vb @@ -12,6 +12,9 @@ Partial Public Class MainWindowViewModel : Inherits ObservableRecipient : Implem Private _BackgroundImage As BitmapImage + + Private _IsQueueSidebarOpen As Boolean + Private ReadOnly _watcher As Watcher.Watcher Private ReadOnly _windowService As IWindowService Private ReadOnly _settingsService As ISettingsService @@ -35,6 +38,11 @@ Partial Public Class MainWindowViewModel : Inherits ObservableRecipient : Implem _windowService.ShowMainWindow() End Sub + + Private Sub ToggleQueueSidebar() + IsQueueSidebarOpen = Not IsQueueSidebarOpen + End Sub + Private Async Function NotifyIconExit() As Task diff --git a/CompactGUI/Views/Pages/FolderView.xaml b/CompactGUI/Views/Pages/FolderView.xaml index 14ff352a..3d1d4e5c 100644 --- a/CompactGUI/Views/Pages/FolderView.xaml +++ b/CompactGUI/Views/Pages/FolderView.xaml @@ -198,7 +198,7 @@ CanContentScroll="True" Focusable="False" IsDeferredScrollingEnabled="False"> - diff --git a/CompactGUI/Views/Pages/HomePage.xaml b/CompactGUI/Views/Pages/HomePage.xaml index b64d9713..e326089c 100644 --- a/CompactGUI/Views/Pages/HomePage.xaml +++ b/CompactGUI/Views/Pages/HomePage.xaml @@ -2,22 +2,28 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" - xmlns:local="clr-namespace:CompactGUI" xmlns:loc="clr-namespace:LazyTranslate;assembly=LazyTranslate" + xmlns:local="clr-namespace:CompactGUI" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml" Background="Transparent" - x:Name="Root" Title="HomePage" AllowDrop="True" DragOver="Root_DragOver" Drop="Root_Drop" + xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml" + x:Name="Root" + Title="HomePage" d:DataContext="{d:DesignInstance Type=local:HomeViewModel}" - d:DesignHeight="450" d:DesignWidth="800" + d:DesignHeight="450" + d:DesignWidth="800" + AllowDrop="True" + Background="Transparent" + DragOver="Root_DragOver" + Drop="Root_Drop" mc:Ignorable="d"> - diff --git a/CompactGUI/Views/Pages/ResultsTemplate.xaml b/CompactGUI/Views/Pages/ResultsTemplate.xaml index df3318dd..59d7de19 100644 --- a/CompactGUI/Views/Pages/ResultsTemplate.xaml +++ b/CompactGUI/Views/Pages/ResultsTemplate.xaml @@ -26,7 +26,7 @@ + loc:L.Value="Compression Summary" FontSize="14" FontWeight="SemiBold" TextOptions.TextFormattingMode="Display" /> @@ -45,8 +45,8 @@ - @@ -97,8 +97,8 @@ From 38eff0029f2682560781443a9ba3338ae6555c73 Mon Sep 17 00:00:00 2001 From: IridiumIO Date: Sat, 12 Sep 2026 13:41:40 +1000 Subject: [PATCH 074/134] Minor tweaks to compression radios --- .../Components/CompressionMode_Radio.xaml | 126 +++++++----------- 1 file changed, 45 insertions(+), 81 deletions(-) diff --git a/CompactGUI/Views/Components/CompressionMode_Radio.xaml b/CompactGUI/Views/Components/CompressionMode_Radio.xaml index dcce8b3f..f9e9c108 100644 --- a/CompactGUI/Views/Components/CompressionMode_Radio.xaml +++ b/CompactGUI/Views/Components/CompressionMode_Radio.xaml @@ -3,19 +3,20 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:i="http://schemas.microsoft.com/xaml/behaviors" + xmlns:loc="clr-namespace:LazyTranslate;assembly=LazyTranslate" xmlns:local="clr-namespace:CompactGUI" - xmlns:loc="clr-namespace:LazyTranslate;assembly=LazyTranslate" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml" x:Name="Root" - Width="185" Height="85" + Width="185" + Height="85" mc:Ignorable="d"> @@ -32,9 +33,9 @@ + FontSize="14" FontWeight="SemiBold" + Text="{Binding CompressionMode, FallbackValue=XPRESS4K, RelativeSource={RelativeSource TemplatedParent}}"> @@ -42,11 +43,11 @@ @@ -54,22 +55,21 @@ - + - @@ -77,7 +77,7 @@ @@ -87,7 +87,7 @@ @@ -101,7 +101,7 @@ @@ -115,7 +115,7 @@ @@ -125,9 +125,8 @@ + Margin="-15 -5" VerticalAlignment="Bottom" + Background="Transparent" ClipToBounds="True" CornerRadius="5" RenderTransformOrigin="0.5 1"> @@ -139,8 +138,7 @@ - + - + @@ -169,52 +165,36 @@ - + - - - - - + + + + + - + - + - + - + @@ -224,47 +204,31 @@ - - - - - - + + + + + + - + - + - + - + From e69f24306c0cbeaf45b707735fd6bec54206ca43 Mon Sep 17 00:00:00 2001 From: IridiumIO Date: Sat, 12 Sep 2026 14:05:57 +1000 Subject: [PATCH 075/134] Improve animations in Queue sidebar --- CompactGUI/Views/Pages/QueueSidebar.xaml | 36 +++++++++++++++--------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/CompactGUI/Views/Pages/QueueSidebar.xaml b/CompactGUI/Views/Pages/QueueSidebar.xaml index df6e1d92..635d9383 100644 --- a/CompactGUI/Views/Pages/QueueSidebar.xaml +++ b/CompactGUI/Views/Pages/QueueSidebar.xaml @@ -32,11 +32,11 @@ - - + IsHitTestVisible="False" Text="⋮⋮"> + @@ -165,6 +169,9 @@ BorderBrush="{StaticResource PaletteRedBrush}" Command="{Binding Tag.RemoveFolderCommand, RelativeSource={RelativeSource AncestorType=Border}}" CommandParameter="{Binding}"> + + + + + Background="Transparent" BorderThickness="2" CornerRadius="6" + Style="{StaticResource QueueOverlayFadeStyle}"> @@ -136,10 +181,12 @@ - + local:LiveBlurBackground.BlurRadius="50" local:LiveBlurBackground.EnableBlur="True" Background="#FF445667" BorderBrush="#40FFFFFF" + BorderThickness="1" CornerRadius="6" + Style="{StaticResource QueueOverlayFadeStyle}"> + + + diff --git a/CompactGUI/Views/Pages/QueueSidebar.xaml b/CompactGUI/Views/Pages/QueueSidebar.xaml index 2a149582..595f1da2 100644 --- a/CompactGUI/Views/Pages/QueueSidebar.xaml +++ b/CompactGUI/Views/Pages/QueueSidebar.xaml @@ -335,7 +335,7 @@ From ff099b61a2cd8d1a7a59a841fb3324a8dd0caa8b Mon Sep 17 00:00:00 2001 From: IridiumIO Date: Sun, 13 Sep 2026 15:33:21 +1000 Subject: [PATCH 083/134] Fix #659 --- CompactGUI.Core/SharedMethods.cs | 29 ++++++++++++++++++- .../ViewModels/SteamMonitorViewModel.vb | 13 +++++++-- 2 files changed, 39 insertions(+), 3 deletions(-) diff --git a/CompactGUI.Core/SharedMethods.cs b/CompactGUI.Core/SharedMethods.cs index 79a37426..d1416924 100644 --- a/CompactGUI.Core/SharedMethods.cs +++ b/CompactGUI.Core/SharedMethods.cs @@ -26,6 +26,8 @@ public enum FolderVerificationResult public static FolderVerificationResult VerifyFolder(string folder) { + folder = NormalizeLocalPath(folder); + if (!Directory.Exists(folder)) return FolderVerificationResult.DirectoryDoesNotExist; else if (folder.ToLowerInvariant().Contains(Environment.GetFolderPath(Environment.SpecialFolder.Windows).ToLowerInvariant())) @@ -36,7 +38,7 @@ public static FolderVerificationResult VerifyFolder(string folder) return FolderVerificationResult.DirectoryEmptyOrUnauthorized; else if (IsOneDriveFolder(folder)) return FolderVerificationResult.OneDriveFolder; - else if (DriveInfo.GetDrives().First(f => folder.StartsWith(f.Name)).DriveFormat != "NTFS") + else if (!IsSupportedLocalNtfsDrive(folder)) return FolderVerificationResult.NonNTFSDrive; else if (!HasDirectoryWritePermission(folder)) return FolderVerificationResult.InsufficientPermission; @@ -46,6 +48,31 @@ public static FolderVerificationResult VerifyFolder(string folder) return FolderVerificationResult.Valid; } + public static string NormalizeLocalPath(string folder) + { + try + { + return NormalizeLocalDrivePath(new DirectoryInfo(folder).FullName); + } + catch (ArgumentException) + { + return folder; + } + } + + private static string NormalizeLocalDrivePath(string folder) + { + if (folder.Length < 2 || folder[1] != ':' || !char.IsAsciiLetter(folder[0])) return folder; + + return char.ToUpperInvariant(folder[0]) + folder[1..]; + } + + private static bool IsSupportedLocalNtfsDrive(string folder) + { + var drive = DriveInfo.GetDrives().FirstOrDefault(f => folder.StartsWith(f.Name, StringComparison.OrdinalIgnoreCase)); + return drive is not null && drive.DriveType != DriveType.Network && drive.DriveFormat == "NTFS"; + } + public static string GetFolderVerificationMessage(FolderVerificationResult result) { return result switch diff --git a/CompactGUI/ViewModels/SteamMonitorViewModel.vb b/CompactGUI/ViewModels/SteamMonitorViewModel.vb index f16a6a44..41495e12 100644 --- a/CompactGUI/ViewModels/SteamMonitorViewModel.vb +++ b/CompactGUI/ViewModels/SteamMonitorViewModel.vb @@ -756,8 +756,11 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject End Function Private Shared Sub AddSteamLibrary(results As List(Of SteamLibraryACFEntry), knownPaths As HashSet(Of String), steamAppsPath As String) - If Not Directory.Exists(steamAppsPath) OrElse Not knownPaths.Add(steamAppsPath) Then Return - results.Add(New SteamLibraryACFEntry With {.Path = steamAppsPath}) + If Not Directory.Exists(steamAppsPath) Then Return + + Dim normalizedSteamAppsPath = Core.SharedMethods.NormalizeLocalPath(steamAppsPath) + If Not knownPaths.Add(normalizedSteamAppsPath) Then Return + results.Add(New SteamLibraryACFEntry(normalizedSteamAppsPath)) End Sub Private Class RawSteamLibraryEntry @@ -768,6 +771,12 @@ End Class Public Class SteamLibraryACFEntry Public Property Path As String + + Public Sub New(steamAppsPath As String) + 'normalise drive letter to capitals so it doesn't look bad + Path = If(String.IsNullOrWhiteSpace(steamAppsPath), String.Empty, Char.ToUpperInvariant(steamAppsPath(0)) & steamAppsPath.Substring(1)) + End Sub + End Class Public Enum SteamGameStatus From cf1a7248c13a986f000f9725b724b1915ffc8ebb Mon Sep 17 00:00:00 2001 From: IridiumIO Date: Sun, 13 Sep 2026 15:48:09 +1000 Subject: [PATCH 084/134] Intentionally skip Sparse files when compressing --- CompactGUI.Core/Analyser.cs | 2 +- CompactGUI.Core/Compactor.cs | 1 + CompactGUI.Core/SharedObjects.cs | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CompactGUI.Core/Analyser.cs b/CompactGUI.Core/Analyser.cs index 920e308e..7b0f4337 100644 --- a/CompactGUI.Core/Analyser.cs +++ b/CompactGUI.Core/Analyser.cs @@ -116,7 +116,7 @@ private static bool GetContainsCompressedFiles(List fileCom ? WOFCompressionAlgorithm.NO_COMPRESSION : WOFHelper.DetectCompression(fileInfo); - return new AnalysedFileDetails { FileName = file, CompressedSize = compressedSize, UncompressedSize = uncompressedSize, CompressionMode = compressionMode}; + return new AnalysedFileDetails { FileName = file, Attributes = fileInfo.Attributes, CompressedSize = compressedSize, UncompressedSize = uncompressedSize, CompressionMode = compressionMode}; } catch (IOException ex) { diff --git a/CompactGUI.Core/Compactor.cs b/CompactGUI.Core/Compactor.cs index 7421ffd3..2374d475 100644 --- a/CompactGUI.Core/Compactor.cs +++ b/CompactGUI.Core/Compactor.cs @@ -136,6 +136,7 @@ public async Task> BuildWorkingFilesList() .Where(fl => fl.CompressionMode != wofCompressionAlgorithm && fl.UncompressedSize > clusterSize + && !fl.Attributes.HasFlag(FileAttributes.SparseFile) && !excludedFiles.Contains(fl.FileName) ) .Select(fl => new FileDetails(fl.FileName, fl.UncompressedSize)) diff --git a/CompactGUI.Core/SharedObjects.cs b/CompactGUI.Core/SharedObjects.cs index 60d557fb..797c9180 100644 --- a/CompactGUI.Core/SharedObjects.cs +++ b/CompactGUI.Core/SharedObjects.cs @@ -4,6 +4,7 @@ public sealed class AnalysedFileDetails { public required string FileName { get; set; } + public FileAttributes Attributes { get; set; } public long UncompressedSize { get; set; } public long CompressedSize { get; set; } public WOFCompressionAlgorithm CompressionMode { get; set; } From 0c420db7f73f85289955acdaf8422b1d9c79442a Mon Sep 17 00:00:00 2001 From: IridiumIO Date: Sun, 13 Sep 2026 16:10:10 +1000 Subject: [PATCH 085/134] Add safety net: Prevent compression of a folder if there isn't enough free space on the disk to handle: 50% of the folder size + size of the largest file in the folder --- CompactGUI.Core/SharedMethods.cs | 25 +++++++++++++++++ CompactGUI.Logging/Core/CompactorLog.cs | 3 ++ CompactGUI.Watcher/BackgroundCompactor.vb | 11 ++++++-- .../CompressableFolders/CompressableFolder.vb | 3 +- .../Services/CompressableFolderService.vb | 8 ++++++ CompactGUI/ViewModels/HomeViewModel.vb | 22 ++++++++++----- .../ViewModels/SteamMonitorViewModel.vb | 6 +++- CompactGUI/Views/Pages/FolderView.xaml | 28 ++++++++++++++----- CompactGUI/Views/Pages/QueueSidebar.xaml | 17 ++++++++++- 9 files changed, 103 insertions(+), 20 deletions(-) diff --git a/CompactGUI.Core/SharedMethods.cs b/CompactGUI.Core/SharedMethods.cs index d1416924..13a79c86 100644 --- a/CompactGUI.Core/SharedMethods.cs +++ b/CompactGUI.Core/SharedMethods.cs @@ -193,6 +193,31 @@ public static unsafe uint GetClusterSize(string folderPath) } + public static bool HasSufficientFreeSpaceForCompression(string workingDirectory,IEnumerable analysedFiles,WOFCompressionAlgorithm compressionAlgorithm,IEnumerable exclusionList) + { + uint clusterSize = GetClusterSize(workingDirectory); + var excludedFiles = SkipListMatcher.GetExcludedFiles(workingDirectory, analysedFiles.Select(file => file.FileName), exclusionList); + var candidates = analysedFiles.Where(file => + file.CompressionMode != compressionAlgorithm && + file.UncompressedSize > clusterSize && + !file.Attributes.HasFlag(FileAttributes.SparseFile) && + !excludedFiles.Contains(file.FileName)) + .ToList(); + + //Safety check: Must have at least 50% of the folder size free and 1x the largest file in the folder free + long requiredBytes = candidates.Sum(file => file.CompressedSize) / 2 + candidates.Select(file => file.CompressedSize).DefaultIfEmpty().Max(); + + try + { + var root = Path.GetPathRoot(workingDirectory); + return string.IsNullOrWhiteSpace(root) || new DriveInfo(root).AvailableFreeSpace > requiredBytes; + } + catch (IOException) + { + return false; + } + } + public static unsafe long GetFileSizeOnDisk(string file) { diff --git a/CompactGUI.Logging/Core/CompactorLog.cs b/CompactGUI.Logging/Core/CompactorLog.cs index 0033d3f7..f17f5889 100644 --- a/CompactGUI.Logging/Core/CompactorLog.cs +++ b/CompactGUI.Logging/Core/CompactorLog.cs @@ -22,6 +22,9 @@ public static partial class CompactorLog [LoggerMessage(Level = LogLevel.Warning, Message = "File compression failed for: {FileName} with error: {ErrorMessage}")] public static partial void FileCompressionFailed(ILogger logger, string fileName, string errorMessage); + [LoggerMessage(Level = LogLevel.Warning, Message = "Compression did not start because the free-space reserve was not met on {Drive}. Available: {AvailableBytes} bytes; reserve: {ReserveBytes} bytes.")] + public static partial void FreeSpaceReserveReached(ILogger logger, string drive, long availableBytes, long reserveBytes); + [LoggerMessage(Level = LogLevel.Information, Message = "Compression paused.")] public static partial void CompressionPaused(ILogger logger); diff --git a/CompactGUI.Watcher/BackgroundCompactor.vb b/CompactGUI.Watcher/BackgroundCompactor.vb index cdd25343..ecaea1d4 100644 --- a/CompactGUI.Watcher/BackgroundCompactor.vb +++ b/CompactGUI.Watcher/BackgroundCompactor.vb @@ -43,17 +43,22 @@ Public Class BackgroundCompactor End Sub - Public Function BeginCompacting(folder As String, compressionLevel As Core.WOFCompressionAlgorithm, Optional excludedFileTypes As String() = Nothing) As Task(Of Boolean) + Public Async Function BeginCompacting(folder As String, compressionLevel As Core.WOFCompressionAlgorithm, Optional excludedFileTypes As String() = Nothing) As Task(Of Boolean) - If compressionLevel = Core.WOFCompressionAlgorithm.NO_COMPRESSION Then Return Task.FromResult(False) + If compressionLevel = Core.WOFCompressionAlgorithm.NO_COMPRESSION Then Return False Dim effectiveExclusions = If(excludedFileTypes Is Nothing, _excludedFileTypes, excludedFileTypes) _compactorAnalyser = New Core.Analyser(folder, NullLogger(Of Core.Analyser).Instance) + Dim analysedFiles = Await _compactorAnalyser.GetAnalysedFilesAsync(cancellationTokenSource.Token) + If cancellationTokenSource.IsCancellationRequested OrElse analysedFiles Is Nothing Then Return False + + If Not Core.SharedMethods.HasSufficientFreeSpaceForCompression(folder, analysedFiles, compressionLevel, effectiveExclusions) Then Return False + _compactor = New Core.Compactor(folder, compressionLevel, effectiveExclusions, _compactorAnalyser) If isCompactingPaused Then _compactor.Pause() - Return _compactor.RunAsync(Nothing) + Return Await _compactor.RunAsync(Nothing) End Function diff --git a/CompactGUI/Models/CompressableFolders/CompressableFolder.vb b/CompactGUI/Models/CompressableFolders/CompressableFolder.vb index 31e626a4..4ce35836 100644 --- a/CompactGUI/Models/CompressableFolders/CompressableFolder.vb +++ b/CompactGUI/Models/CompressableFolders/CompressableFolder.vb @@ -34,6 +34,7 @@ Public MustInherit Class CompressableFolder : Inherits ObservableObject : Implem Private _PoorlyCompressedFiles As List(Of ExtensionResult) Private _CompressionOptions As New CompressionOptions Private _IsFreshlyCompressed As Boolean + Private _HasInsufficientFreeSpace As Boolean Private _FolderBGImage As BitmapImage = Nothing @@ -149,4 +150,4 @@ Public Enum ActionState Results Paused Waiting -End Enum \ No newline at end of file +End Enum diff --git a/CompactGUI/Services/CompressableFolderService.vb b/CompactGUI/Services/CompressableFolderService.vb index de62a551..45dd0e09 100644 --- a/CompactGUI/Services/CompressableFolderService.vb +++ b/CompactGUI/Services/CompressableFolderService.vb @@ -19,6 +19,8 @@ Public Class CompressableFolderService Public Async Function CompressFolder(folder As CompressableFolder) As Task(Of Boolean) + If folder.HasInsufficientFreeSpace Then Return False + folder.Compressor = New Compactor(folder.FolderName, WOFHelper.WOFConvertCompressionLevel(folder.CompressionOptions.SelectedCompressionMode), GetSkipList(folder), folder.Analyser, CompactorLogger) Return Await RunCompressionAsync(folder, folder.Compressor, Nothing, True) @@ -106,6 +108,7 @@ Public Class CompressableFolderService folder.UncompressedBytes = folder.Analyser.UncompressedBytes folder.CompressedBytes = folder.Analyser.CompressedBytes folder.IsDirectStorage = folder.Analyser.IsDirectStorage + folder.HasInsufficientFreeSpace = Not HasSufficientFreeSpace(folder) If folder.Analyser.ContainsCompressedFiles OrElse folder.IsFreshlyCompressed Then folder.FolderActionState = ActionState.Results @@ -245,6 +248,11 @@ Public Class CompressableFolderService Return exclist End Function + Public Function HasSufficientFreeSpace(folder As CompressableFolder) As Boolean + Dim compressionAlgorithm = WOFHelper.WOFConvertCompressionLevel(folder.CompressionOptions.SelectedCompressionMode) + Return Core.SharedMethods.HasSufficientFreeSpaceForCompression(folder.FolderName, folder.AnalysisResults, compressionAlgorithm, GetSkipList(folder)) + End Function + Private Sub ReleaseToken(folder As CompressableFolder, cts As CancellationTokenSource) Dim current As CancellationTokenSource = Nothing diff --git a/CompactGUI/ViewModels/HomeViewModel.vb b/CompactGUI/ViewModels/HomeViewModel.vb index d37b7c28..695f2146 100644 --- a/CompactGUI/ViewModels/HomeViewModel.vb +++ b/CompactGUI/ViewModels/HomeViewModel.vb @@ -43,7 +43,7 @@ Partial Public NotInheritable Class HomeViewModel : Inherits ObservableRecipient Public ReadOnly Property AwaitingFolderCount As Integer Get - Return Folders.Where(Function(folder) folder.FolderActionState = ActionState.Idle).Count() + Return Folders.Where(Function(folder) folder.FolderActionState = ActionState.Idle AndAlso Not folder.HasInsufficientFreeSpace).Count() End Get End Property @@ -259,7 +259,8 @@ Partial Public NotInheritable Class HomeViewModel : Inherits ObservableRecipient e.PropertyName = NameOf(CompressableFolder.UncompressedBytes) OrElse e.PropertyName = NameOf(CompressableFolder.CompressedBytes) OrElse e.PropertyName = NameOf(CompressableFolder.WikiCompressionResults) OrElse - e.PropertyName = NameOf(CompressableFolder.CompressionOptions) Then + e.PropertyName = NameOf(CompressableFolder.CompressionOptions) OrElse + e.PropertyName = NameOf(CompressableFolder.HasInsufficientFreeSpace) Then NotifyQueueSummaryChanged() End If @@ -269,7 +270,11 @@ Partial Public NotInheritable Class HomeViewModel : Inherits ObservableRecipient End Sub Private Sub OnCompressionOptionsPropertyChanged(sender As Object, e As PropertyChangedEventArgs) - If e.PropertyName = NameOf(CompressionOptions.SelectedCompressionMode) Then NotifyQueueSummaryChanged() + If e.PropertyName = NameOf(CompressionOptions.SelectedCompressionMode) Then + Dim folder = Folders.FirstOrDefault(Function(item) ReferenceEquals(item.CompressionOptions, sender)) + If folder IsNot Nothing Then folder.HasInsufficientFreeSpace = Not _compressableFolderService.HasSufficientFreeSpace(folder) + NotifyQueueSummaryChanged() + End If End Sub Private Sub NotifyQueueSummaryChanged() @@ -513,11 +518,11 @@ Partial Public NotInheritable Class HomeViewModel : Inherits ObservableRecipient Compressing = True _cancelQueueRequested = False Core.SharedMethods.PreventSleep() - Dim queuedFolderCount = Folders.Where(Function(f) f.FolderActionState = ActionState.Idle).Count() + Dim queuedFolderCount = Folders.Where(Function(f) f.FolderActionState = ActionState.Idle AndAlso Not f.HasInsufficientFreeSpace).Count() HomeViewModelLog.StartingBatchCompression(_logger, queuedFolderCount) Do - Dim folder = Folders.FirstOrDefault(Function(f) f.FolderActionState = ActionState.Idle) + Dim folder = Folders.FirstOrDefault(Function(f) f.FolderActionState = ActionState.Idle AndAlso Not f.HasInsufficientFreeSpace) If folder Is Nothing Then Exit Do Dim completed = Await Task.Run(Async Function() @@ -542,7 +547,10 @@ Partial Public NotInheritable Class HomeViewModel : Inherits ObservableRecipient Return True End Function) - If _cancelQueueRequested OrElse Not completed Then Exit Do + If Not completed Then + Exit Do + End If + If _cancelQueueRequested Then Exit Do Loop Compressing = False @@ -557,7 +565,7 @@ Partial Public NotInheritable Class HomeViewModel : Inherits ObservableRecipient Private Function CanCompressAll() As Boolean - Return Folders.Any(Function(f) f.FolderActionState = ActionState.Idle) AndAlso + Return Folders.Any(Function(f) f.FolderActionState = ActionState.Idle AndAlso Not f.HasInsufficientFreeSpace) AndAlso HomeViewModelState <> ActionState.Working AndAlso Not Folders.Any(Function(f) f.FolderActionState = ActionState.Analysing) End Function diff --git a/CompactGUI/ViewModels/SteamMonitorViewModel.vb b/CompactGUI/ViewModels/SteamMonitorViewModel.vb index 41495e12..e4033098 100644 --- a/CompactGUI/ViewModels/SteamMonitorViewModel.vb +++ b/CompactGUI/ViewModels/SteamMonitorViewModel.vb @@ -683,6 +683,8 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject Else If game.SelectedCompressionOption Is Nothing Then Throw New InvalidOperationException("This game does not have a selected compression mode.") folder.CompressionOptions.SelectedCompressionMode = game.SelectedCompressionOption.Mode + folder.HasInsufficientFreeSpace = Not _compressableFolderService.HasSufficientFreeSpace(folder) + If folder.HasInsufficientFreeSpace Then Return succeeded = Await _compressableFolderService.CompressFolder(folder) Await _compressableFolderService.AnalyseFolderAsync(folder) End If @@ -696,7 +698,9 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject End If If succeeded AndAlso Not uncompress Then game.SetLastCompactGuiUpdate(DateTime.Now) - If Not succeeded Then game.SetStatus("The operation did not complete successfully.") + If Not succeeded Then + game.SetStatus("The operation did not complete successfully.") + End If Catch ex As Exception operationException = ex Finally diff --git a/CompactGUI/Views/Pages/FolderView.xaml b/CompactGUI/Views/Pages/FolderView.xaml index 3d1d4e5c..a592e16e 100644 --- a/CompactGUI/Views/Pages/FolderView.xaml +++ b/CompactGUI/Views/Pages/FolderView.xaml @@ -2,8 +2,8 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:loc="clr-namespace:LazyTranslate;assembly=LazyTranslate" xmlns:local="clr-namespace:CompactGUI" - xmlns:loc="clr-namespace:LazyTranslate;assembly=LazyTranslate" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml" d:DataContext="{d:DesignInstance Type=local:FolderViewModel}" @@ -87,6 +87,20 @@ + + + + + + + + + + + @@ -104,9 +118,9 @@ Padding="6 3" Background="#80FFAA00" CornerRadius="5" Visibility="{Binding Folder.IsDirectStorage, Converter={StaticResource BoolToVisConverter}}"> - + - + @@ -119,14 +133,14 @@ TextTrimming="WordEllipsis" /> - + - + diff --git a/CompactGUI/Views/Pages/QueueSidebar.xaml b/CompactGUI/Views/Pages/QueueSidebar.xaml index 595f1da2..90fdd5d9 100644 --- a/CompactGUI/Views/Pages/QueueSidebar.xaml +++ b/CompactGUI/Views/Pages/QueueSidebar.xaml @@ -63,6 +63,7 @@ + - + + + + + + + + + + + Date: Sun, 13 Sep 2026 17:13:43 +1000 Subject: [PATCH 086/134] Add same space safety check for uncompression as well --- CompactGUI.Core/SharedMethods.cs | 15 +++++++++++---- .../CompressableFolders/CompressableFolder.vb | 1 + CompactGUI/Resources/Localisation/en-AU.toml | 2 ++ CompactGUI/Resources/Localisation/es-ES.toml | 2 ++ CompactGUI/Resources/Localisation/it-IT.toml | 2 ++ CompactGUI/Resources/Localisation/ko-KR.toml | 2 ++ CompactGUI/Resources/Localisation/ru-RU.toml | 2 ++ CompactGUI/Resources/Localisation/zh-CN.toml | 2 ++ CompactGUI/Services/CompressableFolderService.vb | 7 +++++++ CompactGUI/ViewModels/FolderViewModel.vb | 7 +++++++ CompactGUI/ViewModels/SteamMonitorViewModel.vb | 12 +++++++++++- CompactGUI/Views/Pages/SteamMonitorPage.xaml | 3 ++- 12 files changed, 51 insertions(+), 6 deletions(-) diff --git a/CompactGUI.Core/SharedMethods.cs b/CompactGUI.Core/SharedMethods.cs index 13a79c86..c979f35d 100644 --- a/CompactGUI.Core/SharedMethods.cs +++ b/CompactGUI.Core/SharedMethods.cs @@ -193,7 +193,7 @@ public static unsafe uint GetClusterSize(string folderPath) } - public static bool HasSufficientFreeSpaceForCompression(string workingDirectory,IEnumerable analysedFiles,WOFCompressionAlgorithm compressionAlgorithm,IEnumerable exclusionList) + public static bool HasSufficientFreeSpaceForCompression(string workingDirectory, IEnumerable analysedFiles, WOFCompressionAlgorithm compressionAlgorithm, IEnumerable exclusionList, bool reserveUncompressedSize = false) { uint clusterSize = GetClusterSize(workingDirectory); var excludedFiles = SkipListMatcher.GetExcludedFiles(workingDirectory, analysedFiles.Select(file => file.FileName), exclusionList); @@ -204,13 +204,20 @@ public static bool HasSufficientFreeSpaceForCompression(string workingDirectory, !excludedFiles.Contains(file.FileName)) .ToList(); - //Safety check: Must have at least 50% of the folder size free and 1x the largest file in the folder free - long requiredBytes = candidates.Sum(file => file.CompressedSize) / 2 + candidates.Select(file => file.CompressedSize).DefaultIfEmpty().Max(); + long requiredBytes; + if (reserveUncompressedSize) + { + requiredBytes = candidates.Sum(file => file.UncompressedSize) /2 + candidates.Select(file => file.UncompressedSize).DefaultIfEmpty().Max(); + } + else + { + requiredBytes = candidates.Sum(file => file.CompressedSize) /2 + candidates.Select(file => file.CompressedSize).DefaultIfEmpty().Max(); + } try { var root = Path.GetPathRoot(workingDirectory); - return string.IsNullOrWhiteSpace(root) || new DriveInfo(root).AvailableFreeSpace > requiredBytes; + return !string.IsNullOrWhiteSpace(root) && new DriveInfo(root).AvailableFreeSpace > requiredBytes; } catch (IOException) { diff --git a/CompactGUI/Models/CompressableFolders/CompressableFolder.vb b/CompactGUI/Models/CompressableFolders/CompressableFolder.vb index 4ce35836..e1ac8d0c 100644 --- a/CompactGUI/Models/CompressableFolders/CompressableFolder.vb +++ b/CompactGUI/Models/CompressableFolders/CompressableFolder.vb @@ -35,6 +35,7 @@ Public MustInherit Class CompressableFolder : Inherits ObservableObject : Implem Private _CompressionOptions As New CompressionOptions Private _IsFreshlyCompressed As Boolean Private _HasInsufficientFreeSpace As Boolean + Private _HasInsufficientFreeSpaceForUncompression As Boolean Private _FolderBGImage As BitmapImage = Nothing diff --git a/CompactGUI/Resources/Localisation/en-AU.toml b/CompactGUI/Resources/Localisation/en-AU.toml index bfa97bf0..6efdc764 100644 --- a/CompactGUI/Resources/Localisation/en-AU.toml +++ b/CompactGUI/Resources/Localisation/en-AU.toml @@ -93,6 +93,7 @@ "No installed Steam games were found." = "No installed Steam games were found." "No wiki data" = "No wiki data" "Not Compressed" = "Not Compressed" +"Not enough space" = "Not enough space" "On Schedule" = "On Schedule" "On Schedule if system is also idle" = "On Schedule if system is also idle" "Open" = "Open" @@ -138,6 +139,7 @@ "Success" = "Success" "System Integration" = "System Integration" "The SnackbarPresenter was never set" = "The SnackbarPresenter was never set" +"There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." = "There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." "This game uses DirectStorage technology. If you are using this feature, you should not compress this game." = "This game uses DirectStorage technology. If you are using this feature, you should not compress this game." "Total Results" = "Total Results" "UI Settings" = "UI Settings" diff --git a/CompactGUI/Resources/Localisation/es-ES.toml b/CompactGUI/Resources/Localisation/es-ES.toml index 7519e26d..21452561 100644 --- a/CompactGUI/Resources/Localisation/es-ES.toml +++ b/CompactGUI/Resources/Localisation/es-ES.toml @@ -93,6 +93,7 @@ "No installed Steam games were found." = "No installed Steam games were found." # LOC:TODO "No wiki data" = "No wiki data" # LOC:TODO "Not Compressed" = "No comprimido" +"Not enough space" = "Not enough space" # LOC:TODO "On Schedule" = "Programado" "On Schedule if system is also idle" = "Programado (si el sistema está inactivo)" "Open" = "Abrir" @@ -138,6 +139,7 @@ "Success" = "Éxito" "System Integration" = "Integración del sistema" "The SnackbarPresenter was never set" = "The SnackbarPresenter was never set" # LOC:TODO +"There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." = "There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." # LOC:TODO "This game uses DirectStorage technology. If you are using this feature, you should not compress this game." = "Este juego usa tecnología DirectStorage. Si usa esta función, no debería comprimir este juego." "Total Results" = "Totales" "UI Settings" = "Ajustes de interfaz" diff --git a/CompactGUI/Resources/Localisation/it-IT.toml b/CompactGUI/Resources/Localisation/it-IT.toml index b56c89d8..97d7a9af 100644 --- a/CompactGUI/Resources/Localisation/it-IT.toml +++ b/CompactGUI/Resources/Localisation/it-IT.toml @@ -93,6 +93,7 @@ "No installed Steam games were found." = "Nessun gioco Steam installato trovato." "No wiki data" = "Nessun dato wiki" "Not Compressed" = "Non compresso" +"Not enough space" = "Not enough space" # LOC:TODO "On Schedule" = "Programmato" "On Schedule if system is also idle" = "Programmato se il sistema è inattivo" "Open" = "Apri" @@ -138,6 +139,7 @@ "Success" = "Successo" "System Integration" = "Integrazione di sistema" "The SnackbarPresenter was never set" = "The SnackbarPresenter non è stata mai settata" +"There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." = "There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." # LOC:TODO "This game uses DirectStorage technology. If you are using this feature, you should not compress this game." = "Questo gioco utilizza la tecnologia DirectStorage. Se utilizzi questa funzione, non dovresti comprimere questo gioco." "Total Results" = "Risultati totali" "UI Settings" = "Impostazioni interfaccia" diff --git a/CompactGUI/Resources/Localisation/ko-KR.toml b/CompactGUI/Resources/Localisation/ko-KR.toml index 5244487b..5442993c 100644 --- a/CompactGUI/Resources/Localisation/ko-KR.toml +++ b/CompactGUI/Resources/Localisation/ko-KR.toml @@ -93,6 +93,7 @@ "No installed Steam games were found." = "설치된 Steam 게임을 발견하지 못했습니다." "No wiki data" = "위키 데이터 없음" "Not Compressed" = "압축되지 않음" +"Not enough space" = "Not enough space" # LOC:TODO "On Schedule" = "예약한 시점에 수행" "On Schedule if system is also idle" = "예약한 시점인 동시에 시스템이 유휴 상태일 때 수행" "Open" = "열기" @@ -138,6 +139,7 @@ "Success" = "성공" "System Integration" = "시스템 연동" "The SnackbarPresenter was never set" = "SnackbarPresenter가 설정되어 있지 않습니다" +"There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." = "There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." # LOC:TODO "This game uses DirectStorage technology. If you are using this feature, you should not compress this game." = "이 게임은 DirectStorage 기술을 사용합니다. 이 기능을 사용 중이라면 이 게임을 압축하지 않는 것이 좋습니다." "Total Results" = "제출된 결과 수" "UI Settings" = "UI 설정" diff --git a/CompactGUI/Resources/Localisation/ru-RU.toml b/CompactGUI/Resources/Localisation/ru-RU.toml index 4735eac0..b0406d26 100644 --- a/CompactGUI/Resources/Localisation/ru-RU.toml +++ b/CompactGUI/Resources/Localisation/ru-RU.toml @@ -93,6 +93,7 @@ "No installed Steam games were found." = "No installed Steam games were found." # LOC:TODO "No wiki data" = "No wiki data" # LOC:TODO "Not Compressed" = "Не сжато" +"Not enough space" = "Not enough space" # LOC:TODO "On Schedule" = "По расписанию" "On Schedule if system is also idle" = "По расписанию, если система также бездействует" "Open" = "Открыть" @@ -138,6 +139,7 @@ "Success" = "Успешно" "System Integration" = "Интеграция в систему" "The SnackbarPresenter was never set" = "SnackbarPresenter не установлен" +"There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." = "There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." # LOC:TODO "This game uses DirectStorage technology. If you are using this feature, you should not compress this game." = "Эта игра использует технологию DirectStorage. Если вы используете эту функцию, вам не следует сжимать эту игру." "Total Results" = "Всего результатов" "UI Settings" = "Настройки интерфейса" diff --git a/CompactGUI/Resources/Localisation/zh-CN.toml b/CompactGUI/Resources/Localisation/zh-CN.toml index 741f27e4..ccec0cc3 100644 --- a/CompactGUI/Resources/Localisation/zh-CN.toml +++ b/CompactGUI/Resources/Localisation/zh-CN.toml @@ -93,6 +93,7 @@ "No installed Steam games were found." = "未发现已安装的Steam游戏。" "No wiki data" = "无wiki数据" "Not Compressed" = "未压缩" +"Not enough space" = "Not enough space" # LOC:TODO "On Schedule" = "按计划" "On Schedule if system is also idle" = "按计划且系统空闲时" "Open" = "打开" @@ -138,6 +139,7 @@ "Success" = "成功" "System Integration" = "系统集成" "The SnackbarPresenter was never set" = "SnackbarPresenter 从未被设置" +"There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." = "There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." # LOC:TODO "This game uses DirectStorage technology. If you are using this feature, you should not compress this game." = "此游戏使用 DirectStorage 技术。如果您正在使用此功能,则不应压缩此游戏。" "Total Results" = "总结果" "UI Settings" = "UI 设置" diff --git a/CompactGUI/Services/CompressableFolderService.vb b/CompactGUI/Services/CompressableFolderService.vb index 45dd0e09..9bd700a5 100644 --- a/CompactGUI/Services/CompressableFolderService.vb +++ b/CompactGUI/Services/CompressableFolderService.vb @@ -30,6 +30,8 @@ Public Class CompressableFolderService Public Async Function UncompressFolder(folder As CompressableFolder) As Task(Of Boolean) + If folder.HasInsufficientFreeSpaceForUncompression Then Return False + folder.Compressor = New Uncompactor(UncompactorLogger) Dim compressedFilesList = folder.AnalysisResults.Where(Function(rs) rs.CompressedSize < rs.UncompressedSize).Select(Of String)(Function(f) f.FileName).ToList Return Await RunCompressionAsync(folder, folder.Compressor, compressedFilesList, isCompressing:=False) @@ -109,6 +111,7 @@ Public Class CompressableFolderService folder.CompressedBytes = folder.Analyser.CompressedBytes folder.IsDirectStorage = folder.Analyser.IsDirectStorage folder.HasInsufficientFreeSpace = Not HasSufficientFreeSpace(folder) + folder.HasInsufficientFreeSpaceForUncompression = Not HasSufficientFreeSpaceForUncompression(folder) If folder.Analyser.ContainsCompressedFiles OrElse folder.IsFreshlyCompressed Then folder.FolderActionState = ActionState.Results @@ -253,6 +256,10 @@ Public Class CompressableFolderService Return Core.SharedMethods.HasSufficientFreeSpaceForCompression(folder.FolderName, folder.AnalysisResults, compressionAlgorithm, GetSkipList(folder)) End Function + Public Function HasSufficientFreeSpaceForUncompression(folder As CompressableFolder) As Boolean + Return Core.SharedMethods.HasSufficientFreeSpaceForCompression(folder.FolderName, folder.AnalysisResults, WOFCompressionAlgorithm.NO_COMPRESSION, Array.Empty(Of String)(), reserveUncompressedSize:=True) + End Function + Private Sub ReleaseToken(folder As CompressableFolder, cts As CancellationTokenSource) Dim current As CancellationTokenSource = Nothing diff --git a/CompactGUI/ViewModels/FolderViewModel.vb b/CompactGUI/ViewModels/FolderViewModel.vb index b8adf238..e0ea17e5 100644 --- a/CompactGUI/ViewModels/FolderViewModel.vb +++ b/CompactGUI/ViewModels/FolderViewModel.vb @@ -142,6 +142,9 @@ Public NotInheritable Class FolderViewModel : Inherits ObservableObject : Implem CompressionProgress = Folder.CompressionProgress.ProgressPercent CompressionProgressFile = Folder.CompressionProgress.FileName.Replace(Folder.FolderName, "") + ElseIf e.PropertyName = NameOf(Folder.HasInsufficientFreeSpaceForUncompression) Then + UncompressCommand.NotifyCanExecuteChanged() + End If End Sub @@ -157,6 +160,10 @@ Public NotInheritable Class FolderViewModel : Inherits ObservableObject : Implem _watcher.UpdateWatched(Folder.FolderName, Folder.Analyser, False) End Function + Private Function CanUncompress() As Boolean + Return Not Folder.HasInsufficientFreeSpaceForUncompression + End Function + Private Sub ApplyToAll() Dim allFolders = Application.GetService(Of HomeViewModel)().Folders diff --git a/CompactGUI/ViewModels/SteamMonitorViewModel.vb b/CompactGUI/ViewModels/SteamMonitorViewModel.vb index e4033098..26cd9459 100644 --- a/CompactGUI/ViewModels/SteamMonitorViewModel.vb +++ b/CompactGUI/ViewModels/SteamMonitorViewModel.vb @@ -600,6 +600,11 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject If analysedFiles Is Nothing Then Return Dim compressionLevel = If(analyser.ContainsCompressedFiles, analysedFiles.Max(Function(file) file.CompressionMode), Core.WOFCompressionAlgorithm.NO_COMPRESSION) game.UpdateAnalysis(analyser.UncompressedBytes, analyser.CompressedBytes, compressionLevel, analyser.IsDirectStorage) + game.HasInsufficientFreeSpaceForUncompression = Not Core.SharedMethods.HasSufficientFreeSpaceForCompression(game.GamePath, + analysedFiles, + Core.WOFCompressionAlgorithm.NO_COMPRESSION, + Array.Empty(Of String)(), + reserveUncompressedSize:=True) End Using End Function @@ -679,6 +684,7 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject If uncompress Then If Not isCurrentlyCompressed Then Throw New InvalidOperationException("This game is not currently compressed.") + If folder.HasInsufficientFreeSpaceForUncompression Then Return succeeded = Await _compressableFolderService.UncompressFolder(folder) Else If game.SelectedCompressionOption Is Nothing Then Throw New InvalidOperationException("This game does not have a selected compression mode.") @@ -853,6 +859,10 @@ Public Class SteamDetailedResult : Inherits ObservableObject Private _isWorking As Boolean + + + Private _hasInsufficientFreeSpaceForUncompression As Boolean + Private _operationMessage As String @@ -960,7 +970,7 @@ Public Class SteamDetailedResult : Inherits ObservableObject Public ReadOnly Property CanUncompress As Boolean Get - Return Not IsWorking AndAlso IsCompressed + Return Not IsWorking AndAlso IsCompressed AndAlso Not HasInsufficientFreeSpaceForUncompression End Get End Property diff --git a/CompactGUI/Views/Pages/SteamMonitorPage.xaml b/CompactGUI/Views/Pages/SteamMonitorPage.xaml index 2f325893..2da86756 100644 --- a/CompactGUI/Views/Pages/SteamMonitorPage.xaml +++ b/CompactGUI/Views/Pages/SteamMonitorPage.xaml @@ -952,7 +952,8 @@ Appearance="Danger" Command="{Binding DataContext.UncompressCommand, RelativeSource={RelativeSource AncestorType=UserControl}}" CommandParameter="{Binding}" - Content="{loc:T Uncompress}" /> + Content="{loc:T Uncompress}" + IsEnabled="{Binding CanUncompress}" /> From 97123bbc067ff2d29debb7e83ff18b7f99f4f5d9 Mon Sep 17 00:00:00 2001 From: IridiumIO Date: Sun, 13 Sep 2026 17:41:45 +1000 Subject: [PATCH 087/134] Add sapce warning to Steam Library view and uncompress buttons --- .../ViewModels/SteamMonitorViewModel.vb | 11 + CompactGUI/Views/Pages/ResultsTemplate.xaml | 25 +- CompactGUI/Views/Pages/SteamMonitorPage.xaml | 551 ++++++++++-------- 3 files changed, 328 insertions(+), 259 deletions(-) diff --git a/CompactGUI/ViewModels/SteamMonitorViewModel.vb b/CompactGUI/ViewModels/SteamMonitorViewModel.vb index 26cd9459..d36beff9 100644 --- a/CompactGUI/ViewModels/SteamMonitorViewModel.vb +++ b/CompactGUI/ViewModels/SteamMonitorViewModel.vb @@ -600,6 +600,12 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject If analysedFiles Is Nothing Then Return Dim compressionLevel = If(analyser.ContainsCompressedFiles, analysedFiles.Max(Function(file) file.CompressionMode), Core.WOFCompressionAlgorithm.NO_COMPRESSION) game.UpdateAnalysis(analyser.UncompressedBytes, analyser.CompressedBytes, compressionLevel, analyser.IsDirectStorage) + If game.SelectedCompressionOption IsNot Nothing Then + game.HasInsufficientFreeSpace = Not Core.SharedMethods.HasSufficientFreeSpaceForCompression(game.GamePath, + analysedFiles, + Core.WOFHelper.WOFConvertCompressionLevel(game.SelectedCompressionOption.Mode), + Array.Empty(Of String)()) + End If game.HasInsufficientFreeSpaceForUncompression = Not Core.SharedMethods.HasSufficientFreeSpaceForCompression(game.GamePath, analysedFiles, Core.WOFCompressionAlgorithm.NO_COMPRESSION, @@ -690,6 +696,7 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject If game.SelectedCompressionOption Is Nothing Then Throw New InvalidOperationException("This game does not have a selected compression mode.") folder.CompressionOptions.SelectedCompressionMode = game.SelectedCompressionOption.Mode folder.HasInsufficientFreeSpace = Not _compressableFolderService.HasSufficientFreeSpace(folder) + game.HasInsufficientFreeSpace = folder.HasInsufficientFreeSpace If folder.HasInsufficientFreeSpace Then Return succeeded = Await _compressableFolderService.CompressFolder(folder) Await _compressableFolderService.AnalyseFolderAsync(folder) @@ -859,6 +866,10 @@ Public Class SteamDetailedResult : Inherits ObservableObject Private _isWorking As Boolean + + + Private _hasInsufficientFreeSpace As Boolean + Private _hasInsufficientFreeSpaceForUncompression As Boolean diff --git a/CompactGUI/Views/Pages/ResultsTemplate.xaml b/CompactGUI/Views/Pages/ResultsTemplate.xaml index 59d7de19..7e7c0793 100644 --- a/CompactGUI/Views/Pages/ResultsTemplate.xaml +++ b/CompactGUI/Views/Pages/ResultsTemplate.xaml @@ -194,12 +194,31 @@ HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Horizontal"> - + FontSize="16"> + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + - + - - - - - - - - - + + + + + + + - + From ef6bea3a7ce9f31a1b8b2110d4bdf79554ddc268 Mon Sep 17 00:00:00 2001 From: IridiumIO Date: Sun, 13 Sep 2026 18:26:45 +1000 Subject: [PATCH 088/134] Add more safety checks to compression/uncompression: - Add cancellation gate to avoid race conditions of files being added to work while attempting to cancel - Force single-thread compression if VHD images are identified (why the hell anyone is compressing these is beyond me) - Add cancellation active count to UI instead of "Cancelling..." text to be more informative --- CompactGUI.Core/Compactor.cs | 58 ++++++++++++++++--- CompactGUI.Core/ICompressor.cs | 4 +- CompactGUI.Core/Uncompactor.cs | 37 +++++++++--- .../CompressableFolders/CompressableFolder.vb | 2 + CompactGUI/Resources/Localisation/en-AU.toml | 2 +- CompactGUI/Resources/Localisation/es-ES.toml | 2 +- CompactGUI/Resources/Localisation/it-IT.toml | 3 +- CompactGUI/Resources/Localisation/ko-KR.toml | 3 +- CompactGUI/Resources/Localisation/ru-RU.toml | 2 +- CompactGUI/Resources/Localisation/zh-CN.toml | 3 +- .../Services/CompressableFolderService.vb | 4 ++ CompactGUI/ViewModels/FolderViewModel.vb | 5 +- CompactGUI/ViewModels/HomeViewModel.vb | 5 +- .../ViewModels/SteamMonitorViewModel.vb | 6 +- CompactGUI/Views/Pages/FolderView.xaml | 4 ++ CompactGUI/Views/Pages/QueueSidebar.xaml | 5 ++ 16 files changed, 117 insertions(+), 28 deletions(-) diff --git a/CompactGUI.Core/Compactor.cs b/CompactGUI.Core/Compactor.cs index 2374d475..545d41d6 100644 --- a/CompactGUI.Core/Compactor.cs +++ b/CompactGUI.Core/Compactor.cs @@ -25,6 +25,9 @@ public sealed class Compactor : ICompressor, IDisposable private long totalProcessedBytes = 0; private readonly ManualResetEventSlim pauseGate = new(initialState: true); private readonly CancellationTokenSource cancellationTokenSource = new CancellationTokenSource(); + private readonly object cancellationGate = new(); + private int activeFileOperations; + private bool cancellationRequested; private ILogger _logger; @@ -62,7 +65,7 @@ public async Task RunAsync(List filesList, IProgress> BuildWorkingFilesList() && !fl.Attributes.HasFlag(FileAttributes.SparseFile) && !excludedFiles.Contains(fl.FileName) ) - .Select(fl => new FileDetails(fl.FileName, fl.UncompressedSize)) + .Select(fl => new FileDetails(fl.FileName, fl.UncompressedSize, fl.CompressedSize)) .ToList(); } + private int GetWorkerCount(int requestedWorkerCount, IEnumerable files) + { + int workerCount = requestedWorkerCount <= 0 ? Environment.ProcessorCount : requestedWorkerCount; + var fileList = files.ToList(); + bool containsDiskImage = fileList.Any(file => new[] { ".vhd", ".vhdx", ".vmdk", ".qcow2", ".img", ".iso" }.Contains(Path.GetExtension(file.FileName), StringComparer.OrdinalIgnoreCase)); + + try + { + var root = Path.GetPathRoot(workingDirectory); + if (string.IsNullOrWhiteSpace(root)) return workerCount; + + long reserveBytes = fileList.Sum(file => file.AllocatedSize) / 2 + fileList.Select(file => file.AllocatedSize).DefaultIfEmpty().Max(); + bool lowFreeSpace = new DriveInfo(root).AvailableFreeSpace < reserveBytes * 2; + return lowFreeSpace || containsDiskImage ? 1 : workerCount; + } + catch (IOException) + { + return containsDiskImage ? 1 : workerCount; + } + } + @@ -160,10 +195,17 @@ public void Resume() } - public void Cancel() + public int Cancel() { + int activeOperations; + lock (cancellationGate) + { + cancellationRequested = true; + activeOperations = activeFileOperations; + } pauseGate.Set(); cancellationTokenSource.Cancel(); + return activeOperations; } @@ -179,7 +221,7 @@ public void Dispose() } - public readonly record struct FileDetails(string FileName, long UncompressedSize); + public readonly record struct FileDetails(string FileName, long UncompressedSize, long AllocatedSize); } diff --git a/CompactGUI.Core/ICompressor.cs b/CompactGUI.Core/ICompressor.cs index e9c3c8fc..08b4ed03 100644 --- a/CompactGUI.Core/ICompressor.cs +++ b/CompactGUI.Core/ICompressor.cs @@ -8,7 +8,7 @@ Task RunAsync(List filesList, void Pause(); void Resume(); - void Cancel(); + int Cancel(); -} \ No newline at end of file +} diff --git a/CompactGUI.Core/Uncompactor.cs b/CompactGUI.Core/Uncompactor.cs index 1c8db85e..3018e5a8 100644 --- a/CompactGUI.Core/Uncompactor.cs +++ b/CompactGUI.Core/Uncompactor.cs @@ -14,6 +14,9 @@ public sealed class Uncompactor : ICompressor, IDisposable private readonly ManualResetEventSlim pauseGate = new(initialState: true); private CancellationTokenSource cancellationTokenSource = new CancellationTokenSource(); + private readonly object cancellationGate = new(); + private int activeFileOperations; + private bool cancellationRequested; private ConcurrentDictionary processedFileCount = new ConcurrentDictionary(); private readonly ILogger _logger; @@ -60,14 +63,25 @@ private async Task PauseAndProcessFile(string file, int totalFiles, IProgress Private _IsFreshlyCompressed As Boolean Private _HasInsufficientFreeSpace As Boolean Private _HasInsufficientFreeSpaceForUncompression As Boolean + Private _IsCancelling As Boolean + Private _ActiveFileOperations As Integer Private _FolderBGImage As BitmapImage = Nothing diff --git a/CompactGUI/Resources/Localisation/en-AU.toml b/CompactGUI/Resources/Localisation/en-AU.toml index 6efdc764..815c7d60 100644 --- a/CompactGUI/Resources/Localisation/en-AU.toml +++ b/CompactGUI/Resources/Localisation/en-AU.toml @@ -27,7 +27,6 @@ "Cancel" = "Cancel" "Cancel Background Compressor" = "Cancel Background Compressor" "Cancel operation" = "Cancel operation" -"Cancelling..." = "Cancelling..." "Cannot remove folder" = "Cannot remove folder" "Check for pre-release updates" = "Check for pre-release updates" "Choose Compression" = "Choose Compression" @@ -65,6 +64,7 @@ "Failed to submit to wiki" = "Failed to submit to wiki" "Filetype Management" = "Filetype Management" "Filter" = "Filter" +"Finishing {0} active file operations; do not power off." = "Finishing {0} active file operations; do not power off." "For Steam Games, this uses the database to determine types to skip. For non-Steam folders this is based on the smart analyser." = "For Steam Games, this uses the database to determine types to skip. For non-Steam folders this is based on the smart analyser." "For Steam games only.\nWhen choosing to skip user-submitted filetypes, this setting determines how many submissions are required for each filetype to consider skipping it. \n'low' is generally best, as higher options run the risk of skipping files that would otherwise compress well." = "For Steam games only.\nWhen choosing to skip user-submitted filetypes, this setting determines how many submissions are required for each filetype to consider skipping it. \n'low' is generally best, as higher options run the risk of skipping files that would otherwise compress well." "Game" = "Game" diff --git a/CompactGUI/Resources/Localisation/es-ES.toml b/CompactGUI/Resources/Localisation/es-ES.toml index 21452561..458ebd1c 100644 --- a/CompactGUI/Resources/Localisation/es-ES.toml +++ b/CompactGUI/Resources/Localisation/es-ES.toml @@ -27,7 +27,6 @@ "Cancel" = "Cancelar " "Cancel Background Compressor" = "Cancelar compresor en segundo plano" "Cancel operation" = "Cancel operation" # LOC:TODO -"Cancelling..." = "Cancelling..." # LOC:TODO "Cannot remove folder" = "No se puede eliminar la carpeta" "Check for pre-release updates" = "Buscar actualizaciones preliminares" "Choose Compression" = "Choose Compression" # LOC:TODO @@ -65,6 +64,7 @@ "Failed to submit to wiki" = "Fallo al enviar a la wiki" "Filetype Management" = "Gestión de tipos de archivo" "Filter" = "Filter" # LOC:TODO +"Finishing {0} active file operations; do not power off." = "Finishing {0} active file operations; do not power off." # LOC:TODO "For Steam Games, this uses the database to determine types to skip. For non-Steam folders this is based on the smart analyser." = "Para juegos de Steam, esto utiliza la base de datos para determinar los tipos a omitir. Para carpetas que no son de Steam, se basa en el analizador inteligente." "For Steam games only.\nWhen choosing to skip user-submitted filetypes, this setting determines how many submissions are required for each filetype to consider skipping it. \n'low' is generally best, as higher options run the risk of skipping files that would otherwise compress well." = "Solo para juegos de Steam.\nAl elegir omitir los tipos de archivo enviados por los usuarios, esta configuración determina cuántas solicitudes se requieren para cada tipo de archivo para considerar su omisión.\nGeneralmente, la opción \"baja\" es la mejor, ya que las opciones más altas conllevan el riesgo de omitir archivos que, de otro modo, se comprimirían correctamente." "Game" = "Juego" diff --git a/CompactGUI/Resources/Localisation/it-IT.toml b/CompactGUI/Resources/Localisation/it-IT.toml index 97d7a9af..cf380017 100644 --- a/CompactGUI/Resources/Localisation/it-IT.toml +++ b/CompactGUI/Resources/Localisation/it-IT.toml @@ -27,7 +27,6 @@ "Cancel" = "Annulla" "Cancel Background Compressor" = "Annulla compressione in background" "Cancel operation" = "Annulla operazione" -"Cancelling..." = "Annullamento in corso..." "Cannot remove folder" = "Impossibile rimuovere la cartella" "Check for pre-release updates" = "Verifica aggiornamenti pre-release" "Choose Compression" = "Choose Compression" # LOC:TODO @@ -65,6 +64,7 @@ "Failed to submit to wiki" = "Invio al wiki fallito" "Filetype Management" = "Gestione tipi di file" "Filter" = "Filter" # LOC:TODO +"Finishing {0} active file operations; do not power off." = "Finishing {0} active file operations; do not power off." # LOC:TODO "For Steam Games, this uses the database to determine types to skip. For non-Steam folders this is based on the smart analyser." = "Per i giochi Steam, usa il database per determinare i tipi da escludere. Per le cartelle non-Steam si basa sull'analizzatore intelligente." "For Steam games only.\nWhen choosing to skip user-submitted filetypes, this setting determines how many submissions are required for each filetype to consider skipping it. \n'low' is generally best, as higher options run the risk of skipping files that would otherwise compress well." = "Solo per giochi Steam.\nQuando si sceglie di escludere i tipi di file inviati dagli utenti, questa impostazione determina quanti invii sono necessari per ogni tipo di file per considerarlo da escludere. \n'low' è generalmente la scelta migliore, poiché opzioni più alte comportano il rischio di escludere file che altrimenti si comprimerebbero bene." "Game" = "Gioco" @@ -254,6 +254,7 @@ [obsolete] "Add Folder to Queue" = "Aggiungi cartella alla coda" "Apply to all" = "Applica a tutto" +"Cancelling..." = "Annullamento in corso..." "Compression Mode" = "Modalità di compressione" "Configuration" = "Configurazione" "Custom list — {0} entries" = "Lista personalizzata — {0} voci" diff --git a/CompactGUI/Resources/Localisation/ko-KR.toml b/CompactGUI/Resources/Localisation/ko-KR.toml index 5442993c..5fc4cc62 100644 --- a/CompactGUI/Resources/Localisation/ko-KR.toml +++ b/CompactGUI/Resources/Localisation/ko-KR.toml @@ -27,7 +27,6 @@ "Cancel" = "취소" "Cancel Background Compressor" = "백그라운드 압축 취소" "Cancel operation" = "작업 취소" -"Cancelling..." = "취소 중..." "Cannot remove folder" = "폴더를 대기열에서 제거할 수 없습니다" "Check for pre-release updates" = "프리릴리스 업데이트까지 확인" "Choose Compression" = "Choose Compression" # LOC:TODO @@ -65,6 +64,7 @@ "Failed to submit to wiki" = "위키 제출에 실패했습니다" "Filetype Management" = "파일 확장자 관리" "Filter" = "Filter" # LOC:TODO +"Finishing {0} active file operations; do not power off." = "Finishing {0} active file operations; do not power off." # LOC:TODO "For Steam Games, this uses the database to determine types to skip. For non-Steam folders this is based on the smart analyser." = "Steam 게임은 데이터베이스를, 그 외 폴더는 분석 결과를 바탕으로 제외할 파일 형식을 자동으로 정합니다." "For Steam games only.\nWhen choosing to skip user-submitted filetypes, this setting determines how many submissions are required for each filetype to consider skipping it. \n'low' is generally best, as higher options run the risk of skipping files that would otherwise compress well." = "다른 사용자들이 제출한 정보를 바탕으로 파일 형식을 얼마나 적극적으로 제외할지 설정합니다.\n\n일반적으로는 '약하게'가 적합하며, 더 강하게 설정하면 압축이 잘 되는 파일까지 제외할 수 있습니다.\n\nSteam 게임에서만 적용됩니다." "Game" = "게임" @@ -254,6 +254,7 @@ [obsolete] "Add Folder to Queue" = "새로운 폴더 추가" "Apply to all" = "모든 폴더에 적용" +"Cancelling..." = "취소 중..." "Compression Mode" = "압축 모드" "Configuration" = "설정" "Edit skip list for this folder" = "이 폴더에서 제외할 항목 편집" diff --git a/CompactGUI/Resources/Localisation/ru-RU.toml b/CompactGUI/Resources/Localisation/ru-RU.toml index b0406d26..1c98812a 100644 --- a/CompactGUI/Resources/Localisation/ru-RU.toml +++ b/CompactGUI/Resources/Localisation/ru-RU.toml @@ -27,7 +27,6 @@ "Cancel" = "Отмена" "Cancel Background Compressor" = "Отменить фоновое сжатие" "Cancel operation" = "Cancel operation" # LOC:TODO -"Cancelling..." = "Cancelling..." # LOC:TODO "Cannot remove folder" = "Не удаётся удалить папку" "Check for pre-release updates" = "Проверять предварительные версии обновлений" "Choose Compression" = "Choose Compression" # LOC:TODO @@ -65,6 +64,7 @@ "Failed to submit to wiki" = "Не удалось отправить в Вики" "Filetype Management" = "Управление типами файлов" "Filter" = "Filter" # LOC:TODO +"Finishing {0} active file operations; do not power off." = "Finishing {0} active file operations; do not power off." # LOC:TODO "For Steam Games, this uses the database to determine types to skip. For non-Steam folders this is based on the smart analyser." = "Для игр Steam используется база данных для определения пропускаемых типов. Для папок не из Steam это основано на умном анализаторе." "For Steam games only.\nWhen choosing to skip user-submitted filetypes, this setting determines how many submissions are required for each filetype to consider skipping it. \n'low' is generally best, as higher options run the risk of skipping files that would otherwise compress well." = "Только для игр Steam.\nПри выборе пропуска файлов, предложенных пользователями, этот параметр определяет, сколько подтверждений необходимо для каждого типа файлов, чтобы его пропускать.\n«Низкий» обычно оптимален, так как более высокие значения могут привести к пропуску файлов, которые на самом деле хорошо сжимаются." "Game" = "Игра" diff --git a/CompactGUI/Resources/Localisation/zh-CN.toml b/CompactGUI/Resources/Localisation/zh-CN.toml index ccec0cc3..1b5a51fd 100644 --- a/CompactGUI/Resources/Localisation/zh-CN.toml +++ b/CompactGUI/Resources/Localisation/zh-CN.toml @@ -27,7 +27,6 @@ "Cancel" = "否" "Cancel Background Compressor" = "取消后台压缩" "Cancel operation" = "取消操作" -"Cancelling..." = "取消中……" "Cannot remove folder" = "无法移除文件夹" "Check for pre-release updates" = "检查预发布更新" "Choose Compression" = "Choose Compression" # LOC:TODO @@ -65,6 +64,7 @@ "Failed to submit to wiki" = "提交到 Wiki 失败" "Filetype Management" = "文件类型管理" "Filter" = "Filter" # LOC:TODO +"Finishing {0} active file operations; do not power off." = "Finishing {0} active file operations; do not power off." # LOC:TODO "For Steam Games, this uses the database to determine types to skip. For non-Steam folders this is based on the smart analyser." = "对于 Steam 游戏,使用数据库来确定要跳过的类型。对于非 Steam 文件夹,则基于智能分析器。" "For Steam games only.\nWhen choosing to skip user-submitted filetypes, this setting determines how many submissions are required for each filetype to consider skipping it. \n'low' is generally best, as higher options run the risk of skipping files that would otherwise compress well." = "仅限 Steam 游戏。\n在选择跳过用户提交的文件类型时,该设置决定了每种文件类型需要提交多少次才能考虑跳过该类型。\n“低”通常是最好的,因为高档有跳过本来可以很好地压缩的文件的风险。" "Game" = "游戏" @@ -254,6 +254,7 @@ [obsolete] "Add Folder to Queue" = "添加文件夹到队列" "Apply to all" = "应用到所有" +"Cancelling..." = "取消中……" "Compression Mode" = "压缩模式" "Configuration" = "配置" "Custom list — {0} entries" = "自定义列表 — {0} 条" diff --git a/CompactGUI/Services/CompressableFolderService.vb b/CompactGUI/Services/CompressableFolderService.vb index 9bd700a5..f7205ddd 100644 --- a/CompactGUI/Services/CompressableFolderService.vb +++ b/CompactGUI/Services/CompressableFolderService.vb @@ -41,6 +41,8 @@ Public Class CompressableFolderService Private Async Function RunCompressionAsync(folder As CompressableFolder, compressor As ICompressor, filesList As List(Of String), isCompressing As Boolean) As Task(Of Boolean) folder.FolderActionState = ActionState.Working + folder.IsCancelling = False + folder.ActiveFileOperations = 0 CancelEstimation(folder) Dim cts = New CancellationTokenSource() @@ -72,6 +74,8 @@ Public Class CompressableFolderService Finally + folder.IsCancelling = False + folder.ActiveFileOperations = 0 compressor.Dispose() ReleaseToken(folder, cts) diff --git a/CompactGUI/ViewModels/FolderViewModel.vb b/CompactGUI/ViewModels/FolderViewModel.vb index e0ea17e5..052f9be9 100644 --- a/CompactGUI/ViewModels/FolderViewModel.vb +++ b/CompactGUI/ViewModels/FolderViewModel.vb @@ -183,6 +183,7 @@ Public NotInheritable Class FolderViewModel : Inherits ObservableObject : Implem Private Sub Pause() + If Folder.IsCancelling Then Return If Folder.FolderActionState = ActionState.Working Then Folder.Compressor?.Pause() @@ -196,7 +197,9 @@ Public NotInheritable Class FolderViewModel : Inherits ObservableObject : Implem Private Sub Cancel() - Folder.Compressor?.Cancel() + If Folder.Compressor Is Nothing Then Return + Folder.ActiveFileOperations = Folder.Compressor.Cancel() + Folder.IsCancelling = True End Sub diff --git a/CompactGUI/ViewModels/HomeViewModel.vb b/CompactGUI/ViewModels/HomeViewModel.vb index 695f2146..9cd89102 100644 --- a/CompactGUI/ViewModels/HomeViewModel.vb +++ b/CompactGUI/ViewModels/HomeViewModel.vb @@ -488,6 +488,7 @@ Partial Public NotInheritable Class HomeViewModel : Inherits ObservableRecipient Private Sub PauseQueue() Dim activeFolder = Folders.FirstOrDefault(Function(folder) folder.FolderActionState = ActionState.Working OrElse folder.FolderActionState = ActionState.Paused) If activeFolder?.Compressor Is Nothing Then Return + If activeFolder.IsCancelling Then Return If activeFolder.FolderActionState = ActionState.Working Then activeFolder.Compressor.Pause() @@ -502,9 +503,11 @@ Partial Public NotInheritable Class HomeViewModel : Inherits ObservableRecipient Private Sub CancelQueue() Dim activeFolder = Folders.FirstOrDefault(Function(folder) folder.FolderActionState = ActionState.Working OrElse folder.FolderActionState = ActionState.Paused) If activeFolder?.Compressor Is Nothing Then Return + If activeFolder.IsCancelling Then Return _cancelQueueRequested = True - activeFolder.Compressor.Cancel() + activeFolder.ActiveFileOperations = activeFolder.Compressor.Cancel() + activeFolder.IsCancelling = True End Sub diff --git a/CompactGUI/ViewModels/SteamMonitorViewModel.vb b/CompactGUI/ViewModels/SteamMonitorViewModel.vb index d36beff9..f36e59cb 100644 --- a/CompactGUI/ViewModels/SteamMonitorViewModel.vb +++ b/CompactGUI/ViewModels/SteamMonitorViewModel.vb @@ -219,9 +219,11 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject Private Sub CancelOperation(game As SteamDetailedResult) If game Is Nothing OrElse Not ReferenceEquals(game, _activeGame) Then Return _cancelRequested = True - game.SetStatus("Cancelling...".LT()) _compressableFolderService.CancelEstimation(_activeFolder) - If _activeFolder.FolderActionState = ActionState.Working Then _activeFolder.Compressor?.Cancel() + If _activeFolder.FolderActionState = ActionState.Working AndAlso _activeFolder.Compressor IsNot Nothing Then + Dim activeOperations = _activeFolder.Compressor.Cancel() + game.SetStatus("Finishing {0} active file operations; do not power off.".LTF(activeOperations)) + End If End Sub 'TODO: DIsable string.equals linting so rsharper stops being mad diff --git a/CompactGUI/Views/Pages/FolderView.xaml b/CompactGUI/Views/Pages/FolderView.xaml index a592e16e..6829de99 100644 --- a/CompactGUI/Views/Pages/FolderView.xaml +++ b/CompactGUI/Views/Pages/FolderView.xaml @@ -26,6 +26,10 @@ + + + From e46faadb6f57412af852c90e5137046a89f60774 Mon Sep 17 00:00:00 2001 From: IridiumIO Date: Sun, 13 Sep 2026 18:52:50 +1000 Subject: [PATCH 089/134] Make the UI show all processing files at once rather than just one file at a time --- CompactGUI.Core/Compactor.cs | 23 +++++++++- CompactGUI.Core/SharedObjects.cs | 4 +- CompactGUI.Core/Uncompactor.cs | 25 ++++++++--- .../CompressableFolders/CompressableFolder.vb | 15 +++++++ .../Services/CompressableFolderService.vb | 45 ++++++++++++++++++- CompactGUI/Views/Pages/FolderView.xaml | 22 +++++++-- 6 files changed, 121 insertions(+), 13 deletions(-) diff --git a/CompactGUI.Core/Compactor.cs b/CompactGUI.Core/Compactor.cs index 545d41d6..fc414e7a 100644 --- a/CompactGUI.Core/Compactor.cs +++ b/CompactGUI.Core/Compactor.cs @@ -26,8 +26,10 @@ public sealed class Compactor : ICompressor, IDisposable private readonly ManualResetEventSlim pauseGate = new(initialState: true); private readonly CancellationTokenSource cancellationTokenSource = new CancellationTokenSource(); private readonly object cancellationGate = new(); + private readonly ConcurrentDictionary activeFiles = new(); private int activeFileOperations; private bool cancellationRequested; + private long lastProgressReportTicks; private ILogger _logger; @@ -66,6 +68,7 @@ public async Task RunAsync(List filesList, IProgress progressMonitor, long totalFilesSize, string fileName, bool force = false) + { + long now = Stopwatch.GetTimestamp(); + if (!force && now - Interlocked.Read(ref lastProgressReportTicks) < Stopwatch.Frequency / 10) return; + + Interlocked.Exchange(ref lastProgressReportTicks, now); + progressMonitor?.Report(new CompressionProgress((int)((double)totalProcessedBytes / totalFilesSize * 100.0), fileName, activeFiles.Keys.ToArray())); + } + private unsafe int? WOFCompressFile(string filePath) { try diff --git a/CompactGUI.Core/SharedObjects.cs b/CompactGUI.Core/SharedObjects.cs index 797c9180..d7f4e8b5 100644 --- a/CompactGUI.Core/SharedObjects.cs +++ b/CompactGUI.Core/SharedObjects.cs @@ -28,11 +28,13 @@ public struct CompressionProgress { public int ProgressPercent { get; set; } public string FileName { get; set; } + public string[] ActiveFiles { get; set; } - public CompressionProgress(int progressPercent, string fileName) + public CompressionProgress(int progressPercent, string fileName, string[] activeFiles = null) { ProgressPercent = progressPercent; FileName = fileName; + ActiveFiles = activeFiles ?? Array.Empty(); } } diff --git a/CompactGUI.Core/Uncompactor.cs b/CompactGUI.Core/Uncompactor.cs index 3018e5a8..16f891b7 100644 --- a/CompactGUI.Core/Uncompactor.cs +++ b/CompactGUI.Core/Uncompactor.cs @@ -15,8 +15,10 @@ public sealed class Uncompactor : ICompressor, IDisposable private readonly ManualResetEventSlim pauseGate = new(initialState: true); private CancellationTokenSource cancellationTokenSource = new CancellationTokenSource(); private readonly object cancellationGate = new(); + private readonly ConcurrentDictionary activeFiles = new(); private int activeFileOperations; private bool cancellationRequested; + private long lastProgressReportTicks; private ConcurrentDictionary processedFileCount = new ConcurrentDictionary(); private readonly ILogger _logger; @@ -46,11 +48,13 @@ await Parallel.ForEachAsync(filesList, parallelOptions, } catch (OperationCanceledException) { UncompactorLog.DecompressionCanceled(_logger); + ReportProgress(progressMonitor, totalFiles, "", true); return false; } finally { sw.Stop(); } UncompactorLog.DecompressionCompleted(_logger, Math.Round(sw.Elapsed.TotalSeconds, 3)); + ReportProgress(progressMonitor, totalFiles, "", true); return true; } @@ -67,24 +71,35 @@ private async Task PauseAndProcessFile(string file, int totalFiles, IProgress? progressMonitor, int totalFiles, string fileName, bool force = false) + { + long now = Stopwatch.GetTimestamp(); + if (!force && now - Interlocked.Read(ref lastProgressReportTicks) < Stopwatch.Frequency / 5) return; + + Interlocked.Exchange(ref lastProgressReportTicks, now); + progressMonitor?.Report(new CompressionProgress((int)(processedFileCount.Count / (float)totalFiles * 100), fileName, activeFiles.Keys.ToArray())); + } + private unsafe bool? WOFDecompressFile(string file) { try diff --git a/CompactGUI/Models/CompressableFolders/CompressableFolder.vb b/CompactGUI/Models/CompressableFolders/CompressableFolder.vb index 4b042650..897f6d7a 100644 --- a/CompactGUI/Models/CompressableFolders/CompressableFolder.vb +++ b/CompactGUI/Models/CompressableFolders/CompressableFolder.vb @@ -38,6 +38,10 @@ Public MustInherit Class CompressableFolder : Inherits ObservableObject : Implem Private _HasInsufficientFreeSpaceForUncompression As Boolean Private _IsCancelling As Boolean Private _ActiveFileOperations As Integer + Private _ActiveCompressionFiles As New ObservableCollection(Of ActiveCompressionFile) + Private _VisibleActiveCompressionFiles As New ObservableCollection(Of ActiveCompressionFile) + + Private _AdditionalActiveCompressionFileCount As Integer Private _FolderBGImage As BitmapImage = Nothing @@ -65,6 +69,12 @@ Public MustInherit Class CompressableFolder : Inherits ObservableObject : Implem End Get End Property + Public ReadOnly Property HasAdditionalActiveCompressionFiles As Boolean + Get + Return AdditionalActiveCompressionFileCount > 0 + End Get + End Property + Public ReadOnly Property GlobalPoorlyCompressedFileCount Get @@ -144,6 +154,11 @@ Public MustInherit Class CompressableFolder : Inherits ObservableObject : Implem End Sub End Class +Public Class ActiveCompressionFile : Inherits ObservableObject + Private _FileName As String + Private _DisplayName As String + Private _IsActive As Boolean +End Class Public Enum ActionState diff --git a/CompactGUI/Services/CompressableFolderService.vb b/CompactGUI/Services/CompressableFolderService.vb index f7205ddd..1be5a899 100644 --- a/CompactGUI/Services/CompressableFolderService.vb +++ b/CompactGUI/Services/CompressableFolderService.vb @@ -50,7 +50,10 @@ Public Class CompressableFolderService Try - Dim progress As IProgress(Of CompressionProgress) = New Progress(Of CompressionProgress)(Sub(x) folder.CompressionProgress = x) + Dim progress As IProgress(Of CompressionProgress) = New Progress(Of CompressionProgress)(Sub(x) + folder.CompressionProgress = x + UpdateActiveCompressionFiles(folder, x.ActiveFiles) + End Sub) progress.Report(New CompressionProgress(0, "")) @@ -76,6 +79,7 @@ Public Class CompressableFolderService folder.IsCancelling = False folder.ActiveFileOperations = 0 + UpdateActiveCompressionFiles(folder, Array.Empty(Of String)()) compressor.Dispose() ReleaseToken(folder, cts) @@ -255,6 +259,45 @@ Public Class CompressableFolderService Return exclist End Function + Private Shared Sub UpdateActiveCompressionFiles(folder As CompressableFolder, fileNames As String()) + If Not Application.Current.Dispatcher.CheckAccess() Then + Application.Current.Dispatcher.BeginInvoke(Sub() UpdateActiveCompressionFiles(folder, fileNames)) + Return + End If + + Dim activeFiles = folder.ActiveCompressionFiles + + For Each activeFile In activeFiles + activeFile.IsActive = fileNames.Contains(activeFile.FileName) + Next + + For Each fileName In fileNames + If activeFiles.Any(Function(activeFile) activeFile.IsActive AndAlso activeFile.FileName = fileName) Then Continue For + + Dim availableSlot = activeFiles.FirstOrDefault(Function(activeFile) Not activeFile.IsActive) + If availableSlot Is Nothing Then + activeFiles.Add(New ActiveCompressionFile With {.FileName = fileName, .DisplayName = fileName.Replace(folder.FolderName, ""), .IsActive = True}) + Else + availableSlot.FileName = fileName + availableSlot.DisplayName = fileName.Replace(folder.FolderName, "") + availableSlot.IsActive = True + End If + Next + + Dim visibleFiles = activeFiles.Where(Function(activeFile) activeFile.IsActive).Take(5).ToList() + Dim displayedFiles = folder.VisibleActiveCompressionFiles + + For index = displayedFiles.Count - 1 To 0 Step -1 + If Not visibleFiles.Contains(displayedFiles(index)) Then displayedFiles.RemoveAt(index) + Next + + For Each visibleFile In visibleFiles + If Not displayedFiles.Contains(visibleFile) Then displayedFiles.Add(visibleFile) + Next + + folder.AdditionalActiveCompressionFileCount = Math.Max(0, activeFiles.Where(Function(activeFile) activeFile.IsActive).Count() - visibleFiles.Count) + End Sub + Public Function HasSufficientFreeSpace(folder As CompressableFolder) As Boolean Dim compressionAlgorithm = WOFHelper.WOFConvertCompressionLevel(folder.CompressionOptions.SelectedCompressionMode) Return Core.SharedMethods.HasSufficientFreeSpaceForCompression(folder.FolderName, folder.AnalysisResults, compressionAlgorithm, GetSkipList(folder)) diff --git a/CompactGUI/Views/Pages/FolderView.xaml b/CompactGUI/Views/Pages/FolderView.xaml index 6829de99..d90eb3a0 100644 --- a/CompactGUI/Views/Pages/FolderView.xaml +++ b/CompactGUI/Views/Pages/FolderView.xaml @@ -30,10 +30,24 @@ Foreground="{StaticResource PaletteAmberBrush}" Text="{Binding Folder.ActiveFileOperations, StringFormat=Finishing {0} active file operations; do not power off.}" Visibility="{Binding Folder.IsCancelling, Converter={StaticResource BooleanToVisibilityConverter}}" /> - + + + + + + + + + + + + + Date: Sun, 13 Sep 2026 18:19:51 +0300 Subject: [PATCH 090/134] Convert Turkish translation to TOML format --- CompactGUI/Resources/Localisation/tr-TR.toml | 252 +++++++++++++++++++ 1 file changed, 252 insertions(+) create mode 100644 CompactGUI/Resources/Localisation/tr-TR.toml diff --git a/CompactGUI/Resources/Localisation/tr-TR.toml b/CompactGUI/Resources/Localisation/tr-TR.toml new file mode 100644 index 00000000..3a157acc --- /dev/null +++ b/CompactGUI/Resources/Localisation/tr-TR.toml @@ -0,0 +1,252 @@ +# CompactGUI Localisation +# @version 1 +# @programversion 4.0.0-beta.11 + +# =================== +# Translations + +"Add" = "Ekle" +"Add a custom folder to the watchlist" = "─░zleme listesine ├Âzel klas├Âr ekle" +"Add selected to queue" = "Add selected to queue" # LOC:TODO +"Add to Compression Queue" = "Add to Compression Queue" # LOC:TODO +"Add to compression queue" = "S─▒k─▒┼şt─▒rma kuyru─şuna ekle" +"Add to right-click context menu" = "Sa─ş t─▒k ba─şlam men├╝s├╝ne ekle" +"Add to start menu" = "Ba┼şlat men├╝s├╝ne ekle" +"Added to Queue" = "Kuyru─şa Eklendi" +"Admin" = "Y├Ânetici" +"Aggression of online skiplist" = "├çevrimi├ği atlama listesi agresifli─şi" +"Always show details on Compression Mode buttons" = "S─▒k─▒┼şt─▒rma Modu d├╝─şmelerinde her zaman ayr─▒nt─▒lar─▒ g├Âster" +"Analysing" = "Analiz Ediliyor" +"Analysing..." = "Analysing..." # LOC:TODO +"Applied to all folders" = "T├╝m klas├Ârlere uyguland─▒" +"Ascending" = "Artan" +"Awaiting Compression" = "S─▒k─▒┼şt─▒rma Bekleniyor" +"Background Watcher Settings" = "Arkaplan ─░zleyici Ayarlar─▒" +"COMPARE METHODS" = "COMPARE METHODS" # LOC:TODO +"COMPRESSION MODE " = "COMPRESSION MODE " # LOC:TODO +"Cancel" = "─░ptal" +"Cancel Background Compressor" = "Arkaplan S─▒k─▒┼şt─▒r─▒c─▒y─▒ ─░ptal Et" +"Cancel operation" = "Cancel operation" # LOC:TODO +"Cannot remove folder" = "Klas├Âr kald─▒r─▒lam─▒yor" +"Check for pre-release updates" = "├ûn s├╝r├╝m g├╝ncellemelerini denetle" +"Choose Compression" = "Choose Compression" # LOC:TODO +"Clear filters" = "Clear filters" # LOC:TODO +"Click to download" = "─░ndirmek i├ğin t─▒klay─▒n" +"CompactGUI" = "CompactGUI" +"Complete" = "Complete" # LOC:TODO +"Compress" = "Compress" # LOC:TODO +"Compress Again" = "Tekrar S─▒k─▒┼şt─▒r" +"Compress All Now" = "Hepsini ┼Şimdi S─▒k─▒┼şt─▒r" +"Compress Selected" = "Se├ğilenleri S─▒k─▒┼şt─▒r" +"Compress folders: " = "Klas├Ârleri s─▒k─▒┼şt─▒r: " +"Compressed" = "S─▒k─▒┼şt─▒r─▒ld─▒" +"Compressing..." = "Compressing..." # LOC:TODO +"Compression" = "S─▒k─▒┼şt─▒rma" +"Compression DB" = "S─▒k─▒┼şt─▒rma Veritaban─▒" +"Compression Settings" = "S─▒k─▒┼şt─▒rma Ayarlar─▒" +"Compression Summary" = "S─▒k─▒┼şt─▒rma ├ûzeti" +"Compression options have been applied to all folders" = "S─▒k─▒┼şt─▒rma se├ğenekleri t├╝m klas├Ârlere uyguland─▒" +"Current Size" = "Current Size" # LOC:TODO +"Database Results" = "Veritaban─▒ Sonu├ğlar─▒" +"Descending" = "Azalan" +"Deselect all" = "Deselect all" # LOC:TODO +"Direct Storage" = "Direct Storage" # LOC:TODO +"Do Not Compress" = "Do Not Compress" # LOC:TODO +"Do not compress" = "Do not compress" # LOC:TODO +"Drive unavailable" = "Drive unavailable" # LOC:TODO +"Edit list" = "Edit list" # LOC:TODO +"Estimate Compression for non-Steam Folders (beta)" = "Steam d─▒┼ş─▒ klas├Ârler i├ğin s─▒k─▒┼şt─▒rmay─▒ tahmin et (beta)" +"Estimated Size" = "Estimated Size" # LOC:TODO +"Estimated size" = "Tahmini boyut" +"Exit" = "├ç─▒k─▒┼ş" +"Extensions in this folder" = "Bu klas├Ârdeki uzant─▒lar" +"Failed" = "Failed" # LOC:TODO +"Failed to submit to wiki" = "Wiki'ye g├Ânderilemedi" +"Filetype Management" = "Dosya T├╝r├╝ Y├Ânetimi" +"Filter" = "Filter" # LOC:TODO +"Finishing {0} active file operations; do not power off." = "Finishing {0} active file operations; do not power off." # LOC:TODO +"For Steam Games, this uses the database to determine types to skip. For non-Steam folders this is based on the smart analyser." = "Steam Oyunlar─▒ i├ğin, atlanacak t├╝rleri belirlemek amac─▒yla veritaban─▒n─▒ kullan─▒r. Steam d─▒┼ş─▒ klas├Ârler i├ğin ak─▒ll─▒ analizciye dayan─▒r." +"For Steam games only.\nWhen choosing to skip user-submitted filetypes, this setting determines how many submissions are required for each filetype to consider skipping it. \n'low' is generally best, as higher options run the risk of skipping files that would otherwise compress well." = "Sadece Steam oyunlar─▒ i├ğin.\nKullan─▒c─▒ taraf─▒ndan g├Ânderilen dosya t├╝rlerinin atlanmas─▒ se├ğildi─şinde, bu ayar her bir dosya t├╝r├╝n├╝n atlanmas─▒ i├ğin ka├ğ g├Ânderim gerekti─şini belirler. \n'd├╝┼ş├╝k' genellikle en iyisidir, ├ğ├╝nk├╝ daha y├╝ksek se├ğenekler normalde iyi s─▒k─▒┼şabilecek dosyalar─▒n atlanmas─▒ riskini ta┼ş─▒r." +"Game" = "Oyun" +"Game Name" = "Oyun Ad─▒" +"Games" = "Oyunlar" +"Go to Database Results" = "Go to Database Results" # LOC:TODO +"HDDs only use 1 thread" = "HDD'ler yaln─▒zca 1 i┼ş par├ğac─▒─ş─▒ kullans─▒n" +"Home" = "Giri┼ş" +"Include global skiplist" = "Include global skiplist" # LOC:TODO +"Include global skipped file types" = "Genel atlanan dosya t├╝rlerini dahil et" +"Include smart skiplist" = "Include smart skiplist" # LOC:TODO +"Include smart skipped file types" = "Ak─▒ll─▒ atlanan dosya t├╝rlerini dahil et" +"Insufficient permission to access this folder" = "Bu klas├Âre eri┼şmek i├ğin yetersiz izin" +"LZX" = "LZX" +"Last Fetched: {0:dd MMM yyyy HH:mm:ss}" = "Son Alma: {0:dd MMM yyyy HH:mm:ss}" +"Last analysed {0}" = "Last analysed {0}" # LOC:TODO +"Last ran: {0:dd MMM yyyy} at {0:HH:mm:ss}" = "Last ran: {0:dd MMM yyyy} at {0:HH:mm:ss}" # LOC:TODO +"Library location" = "Library location" # LOC:TODO +"Manage local skipped filetypes" = "Yerel olarak atlanan dosya t├╝rlerini y├Ânet" +"Max Savings" = "Maksimum Tasarruf" +"Maximum Compression Threads" = "Maksimum S─▒k─▒┼şt─▒rma ─░┼ş Par├ğac─▒─ş─▒" +"Mode" = "Mod" +"Monitor compressed folders for changes" = "S─▒k─▒┼şt─▒r─▒lm─▒┼ş klas├Ârleri de─şi┼şiklikler i├ğin izle" +"Never" = "Asla" +"Next scheduled: {0:dd MMM yyyy} at {0:HH:mm:ss}" = "Next scheduled: {0:dd MMM yyyy} at {0:HH:mm:ss}" # LOC:TODO +"No installed Steam games were found." = "No installed Steam games were found." # LOC:TODO +"No wiki data" = "No wiki data" # LOC:TODO +"Not Compressed" = "S─▒k─▒┼şt─▒r─▒lmam─▒┼ş" +"Not enough space" = "Not enough space" # LOC:TODO +"On Schedule" = "Zamanlamaya G├Âre" +"On Schedule if system is also idle" = "Sistem bo┼şta ise zamanlamaya g├Âre" +"Open" = "A├ğ" +"Open Settings Folder" = "Ayarlar Klas├Âr├╝n├╝ A├ğ" +"Operation cancelled." = "Operation cancelled." # LOC:TODO +"Operation failed: {0}" = "Operation failed: {0}" # LOC:TODO +"Original Size" = "Original Size" # LOC:TODO +"Paused" = "Paused" # LOC:TODO +"Please check your internet connection and try again" = "L├╝tfen internet ba─şlant─▒n─▒z─▒ kontrol edip tekrar deneyin" +"Please wait until the current operation is finished" = "L├╝tfen mevcut i┼şlem bitene kadar bekleyin" +"Preparing" = "Preparing" # LOC:TODO +"Quickly parses over files and estimates their compression ratio without writing to disk. This will likely be super laggy on HDDs!" = "Quickly parses over files and estimates their compression ratio without writing to disk. This will likely be super laggy on HDDs!" # LOC:TODO +"Re-analyse all watched folders" = "T├╝m izlenen klas├Ârleri yeniden analiz et" +"Re-analyse this folder" = "Bu klas├Âr├╝ yeniden analiz et" +"Recently Updated" = "Recently Updated" # LOC:TODO +"Recommended Action" = "Recommended Action" # LOC:TODO +"Reload Languages.\nChecks online for updated language definitions" = "Reload Languages.\nChecks online for updated language definitions" # LOC:TODO +"Reload Steam Library list" = "Reload Steam Library list" # LOC:TODO +"Remove from Watchlist" = "─░zleme Listesinden Kald─▒r" +"Reset" = "S─▒f─▒rla" +"Restart as Admin" = "Y├Ânetici Olarak Yeniden Ba┼şlat" +"SHOW QUEUE" = "SHOW QUEUE" # LOC:TODO +"SKIPLIST SELECTION" = "SKIPLIST SELECTION" # LOC:TODO +"Saved" = "Saved" # LOC:TODO +"Savings" = "Tasarruf" +"Scanning installed Steam games..." = "Scanning installed Steam games..." # LOC:TODO +"Search by game name or SteamID..." = "Oyun ad─▒ veya SteamID ile ara..." +"Select" = "Select" # LOC:TODO +"Select a folder to compress" = "Select a folder to compress" # LOC:TODO +"Select all" = "Select all" # LOC:TODO +"Select all compressable" = "Select all compressable" # LOC:TODO +"Select all visible games" = "Select all visible games" # LOC:TODO +"Settings" = "Ayarlar" +"Show notification on completion" = "Tamamland─▒─ş─▒nda bildirim g├Âster" +"Sort" = "Sort" # LOC:TODO +"Sort By" = "S─▒ralama ├ûl├ğ├╝t├╝" +"Start CompactGUI in system tray" = "CompactGUI'yi sistem tepsisinde ba┼şlat" +"Status" = "Status" # LOC:TODO +"Steam Library" = "Steam Library" # LOC:TODO +"SteamID" = "SteamID" +"Submit Results" = "Sonu├ğlar─▒ G├Ânder" +"Submitted to wiki" = "Wiki'ye g├Ânderildi" +"Success" = "Ba┼şar─▒l─▒" +"System Integration" = "Sistem Entegrasyonu" +"The SnackbarPresenter was never set" = "SnackbarPresenter ayarlanmad─▒" +"There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." = "There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." # LOC:TODO +"This game uses DirectStorage technology. If you are using this feature, you should not compress this game." = "Bu oyun DirectStorage teknolojisini kullan─▒yor. E─şer bu ├Âzelli─şi kullan─▒yorsan─▒z, bu oyunu s─▒k─▒┼şt─▒rmamal─▒s─▒n─▒z." +"Total Results" = "Toplam Sonu├ğlar" +"UI Settings" = "Aray├╝z Ayarlar─▒" +"UID" = "UID" +"Uncompress" = "S─▒k─▒┼şt─▒rmay─▒ A├ğ" +"Uncompressed" = "Uncompressed" # LOC:TODO +"Uncompressing..." = "Uncompressing..." # LOC:TODO +"Unknown" = "Bilinmiyor" +"Update Available" = "Update Available" # LOC:TODO +"Update Available ▸ Version {0}" = "Update Available ▸ Version {0}" # LOC:TODO +"Update Settings" = "G├╝ncelleme Ayarlar─▒" +"Update in Steam" = "Update in Steam" # LOC:TODO +"Use exclusions" = "Use exclusions" # LOC:TODO +"Use recommended mode" = "Use recommended mode" # LOC:TODO +"Version" = "S├╝r├╝m" +"Waiting" = "Waiting" # LOC:TODO +"Watch folder for changes" = "Klas├Âr├╝ de─şi┼şiklikler i├ğin izle" +"Watched Folders" = "─░zlenen Klas├Ârler" +"Watcher" = "─░zleyici" +"WatcherPage" = "WatcherPage" +"When System is Idle" = "Sistem Bo┼ştayken" +"Working" = "├çal─▒┼ş─▒yor" +"XPRESS 16K" = "XPRESS 16K" +"XPRESS 4K" = "XPRESS 4K" +"XPRESS 8K" = "XPRESS 8K" +"Yes" = "Evet" +"You currently have {0} folders being watched. Closing CompactGUI will stop them from being monitored.{1}{1}Are you sure you want to exit?" = "You currently have {0} folders being watched. Closing CompactGUI will stop them from being monitored.{1}{1}Are you sure you want to exit?" # LOC:TODO +"Your settings have been reset to their default to accommodate the update" = "Your settings have been reset to their default to accommodate the update" # LOC:TODO +"Your settings have been reset to their default." = "Your settings have been reset to their default." # LOC:TODO +"can be saved" = "can be saved" # LOC:TODO +"contained files" = "i├ğerilen dosyalar" +"day(s)" = "g├╝n" +"edit" = "d├╝zenle" +"edit skipped filetypes" = "atlanan dosya t├╝rlerini d├╝zenle" +"estimated savings" = "estimated savings" # LOC:TODO +"every" = "her" +"games" = "games" # LOC:TODO +"just now" = "az ├Ânce" +"last compressed:" = "son s─▒k─▒┼şt─▒r─▒lma:" +"last modified:" = "son de─şi┼ştirilme:" +"recommended" = "recommended" # LOC:TODO +"saved" = "kaydedildi" +"select a folder" = "bir klas├Âr se├ğin" +"uncompressed size" = "s─▒k─▒┼şt─▒r─▒lmam─▒┼ş boyut" +"{0:0} days ago" = "{0:0} g├╝n ├Ânce" +"{0:0} hours ago" = "{0:0} saat ├Ânce" +"{0:0} minutes ago" = "{0:0} dakika ├Ânce" +"{0} saved" = "{0} saved" # LOC:TODO +"{0}% decayed" = "{0}% decayed" # LOC:TODO + +[context."Background Scheduler"] +"CompactGUI is running a scheduled task and will compress monitored folders in the background" = "CompactGUI is running a scheduled task and will compress monitored folders in the background" # LOC:TODO +"Next scheduled task is on {0}" = "Next scheduled task is on {0}" # LOC:TODO +"Scheduled Compression Completed" = "Scheduled Compression Completed" # LOC:TODO +"Scheduled Compression Running" = "Scheduled Compression Running" # LOC:TODO + +[context."Compression estimate"] +"unknown" = "bilinmiyor" + +[context."Compression size"] +"After" = "Sonra" +"Before" = "├ûnce" + +[context."File size"] +"B" = "B" +"EB" = "EB" +"GB" = "GB" +"KB" = "KB" +"MB" = "MB" +"PB" = "PB" +"TB" = "TB" + +[context."Folder Compression Queue"] +"COMPLETED" = "COMPLETED" # LOC:TODO +"Clear completed" = "Clear completed" # LOC:TODO +"Expected savings" = "Expected savings" # LOC:TODO +"PENDING" = "PENDING" # LOC:TODO +"Queue" = "Queue" # LOC:TODO +"To process" = "To process" # LOC:TODO +"{0} of {1} completed" = "{0} of {1} completed" # LOC:TODO + +[context."Folder status"] +"Unknown" = "Bilinmiyor" + +[context."Relative date"] +"Unknown" = "Bilinmiyor" + +[context."Schedule"] +"at" = "saat" + +[context."Skiplist aggression"] +"high" = "y├╝ksek" +"low" = "d├╝┼ş├╝k" +"medium" = "orta" + +[context."Skiplist editor"] +"Save" = "Kaydet" + +[context."Steam Library Compression Mode Button"] +"Compress | {0}" = "Compress | {0}" # LOC:TODO + +[context."Steam Library Tab Headings"] +"CURRENT SIZE" = "CURRENT SIZE" # LOC:TODO +"GAME" = "GAME" # LOC:TODO +"RECOMMENDED ACTION" = "RECOMMENDED ACTION" # LOC:TODO +"SAVINGS" = "SAVINGS" # LOC:TODO +"STATUS" = "STATUS" # LOC:TODO + +[context."Storage savings"] +"saved" = "kaydedildi" From b5b78ec56c49f2b1485677a2be409d9ba2e195ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Abdullah=20ERT=C3=9CRK?= Date: Mon, 14 Sep 2026 19:52:23 +0300 Subject: [PATCH 091/134] Update missing translations in tr-TR.toml --- CompactGUI/Resources/Localisation/tr-TR.toml | 178 +++++++++---------- 1 file changed, 89 insertions(+), 89 deletions(-) diff --git a/CompactGUI/Resources/Localisation/tr-TR.toml b/CompactGUI/Resources/Localisation/tr-TR.toml index 3a157acc..fbfb4de3 100644 --- a/CompactGUI/Resources/Localisation/tr-TR.toml +++ b/CompactGUI/Resources/Localisation/tr-TR.toml @@ -7,8 +7,8 @@ "Add" = "Ekle" "Add a custom folder to the watchlist" = "─░zleme listesine ├Âzel klas├Âr ekle" -"Add selected to queue" = "Add selected to queue" # LOC:TODO -"Add to Compression Queue" = "Add to Compression Queue" # LOC:TODO +"Add selected to queue" = "Seçilenleri sıraya ekle" +"Add to Compression Queue" = "Sıkıştırma Sırasına Ekle" "Add to compression queue" = "S─▒k─▒┼şt─▒rma kuyru─şuna ekle" "Add to right-click context menu" = "Sa─ş t─▒k ba─şlam men├╝s├╝ne ekle" "Add to start menu" = "Ba┼şlat men├╝s├╝ne ekle" @@ -17,145 +17,145 @@ "Aggression of online skiplist" = "├çevrimi├ği atlama listesi agresifli─şi" "Always show details on Compression Mode buttons" = "S─▒k─▒┼şt─▒rma Modu d├╝─şmelerinde her zaman ayr─▒nt─▒lar─▒ g├Âster" "Analysing" = "Analiz Ediliyor" -"Analysing..." = "Analysing..." # LOC:TODO +"Analysing..." = "Analiz ediliyor..." "Applied to all folders" = "T├╝m klas├Ârlere uyguland─▒" "Ascending" = "Artan" "Awaiting Compression" = "S─▒k─▒┼şt─▒rma Bekleniyor" "Background Watcher Settings" = "Arkaplan ─░zleyici Ayarlar─▒" -"COMPARE METHODS" = "COMPARE METHODS" # LOC:TODO -"COMPRESSION MODE " = "COMPRESSION MODE " # LOC:TODO +"COMPARE METHODS" = "YÖNTEMLERİ KARŞILAŞTIR" +"COMPRESSION MODE " = "SIKIŞTIRMA MODU " "Cancel" = "─░ptal" "Cancel Background Compressor" = "Arkaplan S─▒k─▒┼şt─▒r─▒c─▒y─▒ ─░ptal Et" -"Cancel operation" = "Cancel operation" # LOC:TODO +"Cancel operation" = "İşlemi iptal et" "Cannot remove folder" = "Klas├Âr kald─▒r─▒lam─▒yor" "Check for pre-release updates" = "├ûn s├╝r├╝m g├╝ncellemelerini denetle" -"Choose Compression" = "Choose Compression" # LOC:TODO -"Clear filters" = "Clear filters" # LOC:TODO +"Choose Compression" = "Sıkıştırma Seç" +"Clear filters" = "Filtreleri temizle" "Click to download" = "─░ndirmek i├ğin t─▒klay─▒n" "CompactGUI" = "CompactGUI" -"Complete" = "Complete" # LOC:TODO -"Compress" = "Compress" # LOC:TODO +"Complete" = "Tamamlandı" +"Compress" = "Sıkıştır" "Compress Again" = "Tekrar S─▒k─▒┼şt─▒r" "Compress All Now" = "Hepsini ┼Şimdi S─▒k─▒┼şt─▒r" "Compress Selected" = "Se├ğilenleri S─▒k─▒┼şt─▒r" "Compress folders: " = "Klas├Ârleri s─▒k─▒┼şt─▒r: " "Compressed" = "S─▒k─▒┼şt─▒r─▒ld─▒" -"Compressing..." = "Compressing..." # LOC:TODO +"Compressing..." = "Sıkıştırılıyor..." "Compression" = "S─▒k─▒┼şt─▒rma" "Compression DB" = "S─▒k─▒┼şt─▒rma Veritaban─▒" "Compression Settings" = "S─▒k─▒┼şt─▒rma Ayarlar─▒" "Compression Summary" = "S─▒k─▒┼şt─▒rma ├ûzeti" "Compression options have been applied to all folders" = "S─▒k─▒┼şt─▒rma se├ğenekleri t├╝m klas├Ârlere uyguland─▒" -"Current Size" = "Current Size" # LOC:TODO +"Current Size" = "Mevcut Boyut" "Database Results" = "Veritaban─▒ Sonu├ğlar─▒" "Descending" = "Azalan" -"Deselect all" = "Deselect all" # LOC:TODO -"Direct Storage" = "Direct Storage" # LOC:TODO -"Do Not Compress" = "Do Not Compress" # LOC:TODO -"Do not compress" = "Do not compress" # LOC:TODO -"Drive unavailable" = "Drive unavailable" # LOC:TODO -"Edit list" = "Edit list" # LOC:TODO +"Deselect all" = "Tüm seçimleri kaldır" +"Direct Storage" = "Direct Storage" +"Do Not Compress" = "Sıkıştırma" +"Do not compress" = "Sıkıştırma" +"Drive unavailable" = "Sürücü kullanılamıyor" +"Edit list" = "Listeyi düzenle" "Estimate Compression for non-Steam Folders (beta)" = "Steam d─▒┼ş─▒ klas├Ârler i├ğin s─▒k─▒┼şt─▒rmay─▒ tahmin et (beta)" -"Estimated Size" = "Estimated Size" # LOC:TODO +"Estimated Size" = "Tahmini Boyut" "Estimated size" = "Tahmini boyut" "Exit" = "├ç─▒k─▒┼ş" "Extensions in this folder" = "Bu klas├Ârdeki uzant─▒lar" -"Failed" = "Failed" # LOC:TODO +"Failed" = "Başarısız" "Failed to submit to wiki" = "Wiki'ye g├Ânderilemedi" "Filetype Management" = "Dosya T├╝r├╝ Y├Ânetimi" -"Filter" = "Filter" # LOC:TODO -"Finishing {0} active file operations; do not power off." = "Finishing {0} active file operations; do not power off." # LOC:TODO +"Filter" = "Filtre" +"Finishing {0} active file operations; do not power off." = "{0} aktif dosya işlemi tamamlanıyor; bilgisayarı kapatmayın." "For Steam Games, this uses the database to determine types to skip. For non-Steam folders this is based on the smart analyser." = "Steam Oyunlar─▒ i├ğin, atlanacak t├╝rleri belirlemek amac─▒yla veritaban─▒n─▒ kullan─▒r. Steam d─▒┼ş─▒ klas├Ârler i├ğin ak─▒ll─▒ analizciye dayan─▒r." "For Steam games only.\nWhen choosing to skip user-submitted filetypes, this setting determines how many submissions are required for each filetype to consider skipping it. \n'low' is generally best, as higher options run the risk of skipping files that would otherwise compress well." = "Sadece Steam oyunlar─▒ i├ğin.\nKullan─▒c─▒ taraf─▒ndan g├Ânderilen dosya t├╝rlerinin atlanmas─▒ se├ğildi─şinde, bu ayar her bir dosya t├╝r├╝n├╝n atlanmas─▒ i├ğin ka├ğ g├Ânderim gerekti─şini belirler. \n'd├╝┼ş├╝k' genellikle en iyisidir, ├ğ├╝nk├╝ daha y├╝ksek se├ğenekler normalde iyi s─▒k─▒┼şabilecek dosyalar─▒n atlanmas─▒ riskini ta┼ş─▒r." "Game" = "Oyun" "Game Name" = "Oyun Ad─▒" "Games" = "Oyunlar" -"Go to Database Results" = "Go to Database Results" # LOC:TODO +"Go to Database Results" = "Veritabanı Sonuçlarına Git" "HDDs only use 1 thread" = "HDD'ler yaln─▒zca 1 i┼ş par├ğac─▒─ş─▒ kullans─▒n" "Home" = "Giri┼ş" -"Include global skiplist" = "Include global skiplist" # LOC:TODO +"Include global skiplist" = "Genel atlama listesini dahil et" "Include global skipped file types" = "Genel atlanan dosya t├╝rlerini dahil et" -"Include smart skiplist" = "Include smart skiplist" # LOC:TODO +"Include smart skiplist" = "Akıllı atlama listesini dahil et" "Include smart skipped file types" = "Ak─▒ll─▒ atlanan dosya t├╝rlerini dahil et" "Insufficient permission to access this folder" = "Bu klas├Âre eri┼şmek i├ğin yetersiz izin" "LZX" = "LZX" "Last Fetched: {0:dd MMM yyyy HH:mm:ss}" = "Son Alma: {0:dd MMM yyyy HH:mm:ss}" -"Last analysed {0}" = "Last analysed {0}" # LOC:TODO -"Last ran: {0:dd MMM yyyy} at {0:HH:mm:ss}" = "Last ran: {0:dd MMM yyyy} at {0:HH:mm:ss}" # LOC:TODO -"Library location" = "Library location" # LOC:TODO +"Last analysed {0}" = "Son analiz: {0}" +"Last ran: {0:dd MMM yyyy} at {0:HH:mm:ss}" = "Son çalışma: {0:dd MMM yyyy} saat {0:HH:mm:ss}" +"Library location" = "Kütüphane konumu" "Manage local skipped filetypes" = "Yerel olarak atlanan dosya t├╝rlerini y├Ânet" "Max Savings" = "Maksimum Tasarruf" "Maximum Compression Threads" = "Maksimum S─▒k─▒┼şt─▒rma ─░┼ş Par├ğac─▒─ş─▒" "Mode" = "Mod" "Monitor compressed folders for changes" = "S─▒k─▒┼şt─▒r─▒lm─▒┼ş klas├Ârleri de─şi┼şiklikler i├ğin izle" "Never" = "Asla" -"Next scheduled: {0:dd MMM yyyy} at {0:HH:mm:ss}" = "Next scheduled: {0:dd MMM yyyy} at {0:HH:mm:ss}" # LOC:TODO -"No installed Steam games were found." = "No installed Steam games were found." # LOC:TODO -"No wiki data" = "No wiki data" # LOC:TODO +"Next scheduled: {0:dd MMM yyyy} at {0:HH:mm:ss}" = "Sonraki zamanlanmış: {0:dd MMM yyyy} saat {0:HH:mm:ss}" +"No installed Steam games were found." = "Yüklü Steam oyunu bulunamadı." +"No wiki data" = "Wiki verisi yok" "Not Compressed" = "S─▒k─▒┼şt─▒r─▒lmam─▒┼ş" -"Not enough space" = "Not enough space" # LOC:TODO +"Not enough space" = "Yeterli alan yok" "On Schedule" = "Zamanlamaya G├Âre" "On Schedule if system is also idle" = "Sistem bo┼şta ise zamanlamaya g├Âre" "Open" = "A├ğ" "Open Settings Folder" = "Ayarlar Klas├Âr├╝n├╝ A├ğ" -"Operation cancelled." = "Operation cancelled." # LOC:TODO -"Operation failed: {0}" = "Operation failed: {0}" # LOC:TODO -"Original Size" = "Original Size" # LOC:TODO -"Paused" = "Paused" # LOC:TODO +"Operation cancelled." = "İşlem iptal edildi." +"Operation failed: {0}" = "İşlem başarısız: {0}" +"Original Size" = "Orijinal Boyut" +"Paused" = "Duraklatıldı" "Please check your internet connection and try again" = "L├╝tfen internet ba─şlant─▒n─▒z─▒ kontrol edip tekrar deneyin" "Please wait until the current operation is finished" = "L├╝tfen mevcut i┼şlem bitene kadar bekleyin" -"Preparing" = "Preparing" # LOC:TODO -"Quickly parses over files and estimates their compression ratio without writing to disk. This will likely be super laggy on HDDs!" = "Quickly parses over files and estimates their compression ratio without writing to disk. This will likely be super laggy on HDDs!" # LOC:TODO +"Preparing" = "Hazırlanıyor" +"Quickly parses over files and estimates their compression ratio without writing to disk. This will likely be super laggy on HDDs!" = "Diske yazmadan dosyaları hızla tarar ve sıkıştırma oranını tahmin eder. HDD'lerde yavaş olabilir!" "Re-analyse all watched folders" = "T├╝m izlenen klas├Ârleri yeniden analiz et" "Re-analyse this folder" = "Bu klas├Âr├╝ yeniden analiz et" -"Recently Updated" = "Recently Updated" # LOC:TODO -"Recommended Action" = "Recommended Action" # LOC:TODO -"Reload Languages.\nChecks online for updated language definitions" = "Reload Languages.\nChecks online for updated language definitions" # LOC:TODO -"Reload Steam Library list" = "Reload Steam Library list" # LOC:TODO +"Recently Updated" = "Yakın Zamanda Güncellenenler" +"Recommended Action" = "Önerilen Eylem" +"Reload Languages.\nChecks online for updated language definitions" = "Dilleri Yenile.\nGüncel dil tanımlamaları için çevrimiçi kontrol eder" +"Reload Steam Library list" = "Steam Kütüphane listesini yenile" "Remove from Watchlist" = "─░zleme Listesinden Kald─▒r" "Reset" = "S─▒f─▒rla" "Restart as Admin" = "Y├Ânetici Olarak Yeniden Ba┼şlat" -"SHOW QUEUE" = "SHOW QUEUE" # LOC:TODO -"SKIPLIST SELECTION" = "SKIPLIST SELECTION" # LOC:TODO -"Saved" = "Saved" # LOC:TODO +"SHOW QUEUE" = "SIRAYI GÖSTER" +"SKIPLIST SELECTION" = "ATLAMA LİSTESİ SEÇİMİ" +"Saved" = "Tasarruf Edildi" "Savings" = "Tasarruf" -"Scanning installed Steam games..." = "Scanning installed Steam games..." # LOC:TODO +"Scanning installed Steam games..." = "Yüklü Steam oyunları taranıyor..." "Search by game name or SteamID..." = "Oyun ad─▒ veya SteamID ile ara..." -"Select" = "Select" # LOC:TODO -"Select a folder to compress" = "Select a folder to compress" # LOC:TODO -"Select all" = "Select all" # LOC:TODO -"Select all compressable" = "Select all compressable" # LOC:TODO -"Select all visible games" = "Select all visible games" # LOC:TODO +"Select" = "Seç" +"Select a folder to compress" = "Sıkıştırılacak bir klasör seçin" +"Select all" = "Tümünü seç" +"Select all compressable" = "Sıkıştırılabilir olanları seç" +"Select all visible games" = "Görünür tüm oyunları seç" "Settings" = "Ayarlar" "Show notification on completion" = "Tamamland─▒─ş─▒nda bildirim g├Âster" -"Sort" = "Sort" # LOC:TODO +"Sort" = "Sırala" "Sort By" = "S─▒ralama ├ûl├ğ├╝t├╝" "Start CompactGUI in system tray" = "CompactGUI'yi sistem tepsisinde ba┼şlat" -"Status" = "Status" # LOC:TODO -"Steam Library" = "Steam Library" # LOC:TODO +"Status" = "Durum" +"Steam Library" = "Steam Kütüphanesi" "SteamID" = "SteamID" "Submit Results" = "Sonu├ğlar─▒ G├Ânder" "Submitted to wiki" = "Wiki'ye g├Ânderildi" "Success" = "Ba┼şar─▒l─▒" "System Integration" = "Sistem Entegrasyonu" "The SnackbarPresenter was never set" = "SnackbarPresenter ayarlanmad─▒" -"There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." = "There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." # LOC:TODO +"There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." = "Bu klasörü güvenle sıkıştırmak için sürücüde yeterli boş alan yok. Windows'un sorun çıkarmaması için klasör boyutunun en az %50'si kadar boş alan gereklidir." "This game uses DirectStorage technology. If you are using this feature, you should not compress this game." = "Bu oyun DirectStorage teknolojisini kullan─▒yor. E─şer bu ├Âzelli─şi kullan─▒yorsan─▒z, bu oyunu s─▒k─▒┼şt─▒rmamal─▒s─▒n─▒z." "Total Results" = "Toplam Sonu├ğlar" "UI Settings" = "Aray├╝z Ayarlar─▒" "UID" = "UID" "Uncompress" = "S─▒k─▒┼şt─▒rmay─▒ A├ğ" -"Uncompressed" = "Uncompressed" # LOC:TODO -"Uncompressing..." = "Uncompressing..." # LOC:TODO +"Uncompressed" = "Sıkıştırılmamış" +"Uncompressing..." = "Sıkıştırma açılıyor..." "Unknown" = "Bilinmiyor" -"Update Available" = "Update Available" # LOC:TODO -"Update Available ▸ Version {0}" = "Update Available ▸ Version {0}" # LOC:TODO +"Update Available" = "Güncelleme Mevcut" +"Update Available ▸ Version {0}" = "Güncelleme Mevcut - Sürüm {0}" "Update Settings" = "G├╝ncelleme Ayarlar─▒" -"Update in Steam" = "Update in Steam" # LOC:TODO -"Use exclusions" = "Use exclusions" # LOC:TODO -"Use recommended mode" = "Use recommended mode" # LOC:TODO +"Update in Steam" = "Steam'de Güncelle" +"Use exclusions" = "İstisnaları kullan" +"Use recommended mode" = "Önerilen modu kullan" "Version" = "S├╝r├╝m" -"Waiting" = "Waiting" # LOC:TODO +"Waiting" = "Bekliyor" "Watch folder for changes" = "Klas├Âr├╝ de─şi┼şiklikler i├ğin izle" "Watched Folders" = "─░zlenen Klas├Ârler" "Watcher" = "─░zleyici" @@ -166,35 +166,35 @@ "XPRESS 4K" = "XPRESS 4K" "XPRESS 8K" = "XPRESS 8K" "Yes" = "Evet" -"You currently have {0} folders being watched. Closing CompactGUI will stop them from being monitored.{1}{1}Are you sure you want to exit?" = "You currently have {0} folders being watched. Closing CompactGUI will stop them from being monitored.{1}{1}Are you sure you want to exit?" # LOC:TODO -"Your settings have been reset to their default to accommodate the update" = "Your settings have been reset to their default to accommodate the update" # LOC:TODO -"Your settings have been reset to their default." = "Your settings have been reset to their default." # LOC:TODO -"can be saved" = "can be saved" # LOC:TODO +"You currently have {0} folders being watched. Closing CompactGUI will stop them from being monitored.{1}{1}Are you sure you want to exit?" = "Şu anda izlenen {0} klasörünüz var. CompactGUI'yi kapatmak izlenmelerini durduracaktır.{1}{1}Çıkmak istediğinize emin misiniz?" +"Your settings have been reset to their default to accommodate the update" = "Ayarlarınız güncellemeye uyum sağlamak için varsayılana sıfırlandı" +"Your settings have been reset to their default." = "Ayarlarınız varsayılana sıfırlandı." +"can be saved" = "tasarruf edilebilir" "contained files" = "i├ğerilen dosyalar" "day(s)" = "g├╝n" "edit" = "d├╝zenle" "edit skipped filetypes" = "atlanan dosya t├╝rlerini d├╝zenle" -"estimated savings" = "estimated savings" # LOC:TODO +"estimated savings" = "tahmini tasarruf" "every" = "her" -"games" = "games" # LOC:TODO +"games" = "oyunlar" "just now" = "az ├Ânce" "last compressed:" = "son s─▒k─▒┼şt─▒r─▒lma:" "last modified:" = "son de─şi┼ştirilme:" -"recommended" = "recommended" # LOC:TODO +"recommended" = "önerilen" "saved" = "kaydedildi" "select a folder" = "bir klas├Âr se├ğin" "uncompressed size" = "s─▒k─▒┼şt─▒r─▒lmam─▒┼ş boyut" "{0:0} days ago" = "{0:0} g├╝n ├Ânce" "{0:0} hours ago" = "{0:0} saat ├Ânce" "{0:0} minutes ago" = "{0:0} dakika ├Ânce" -"{0} saved" = "{0} saved" # LOC:TODO -"{0}% decayed" = "{0}% decayed" # LOC:TODO +"{0} saved" = "{0} tasarruf edildi" +"{0}% decayed" = "%{0} bozuldu" [context."Background Scheduler"] -"CompactGUI is running a scheduled task and will compress monitored folders in the background" = "CompactGUI is running a scheduled task and will compress monitored folders in the background" # LOC:TODO -"Next scheduled task is on {0}" = "Next scheduled task is on {0}" # LOC:TODO -"Scheduled Compression Completed" = "Scheduled Compression Completed" # LOC:TODO -"Scheduled Compression Running" = "Scheduled Compression Running" # LOC:TODO +"CompactGUI is running a scheduled task and will compress monitored folders in the background" = "CompactGUI planlanmış bir görevi çalıştırıyor ve izlenen klasörleri arka planda sıkıştıracak" +"Next scheduled task is on {0}" = "Sonraki planlanmış görev: {0}" +"Scheduled Compression Completed" = "Planlanmış Sıkıştırma Tamamlandı" +"Scheduled Compression Running" = "Planlanmış Sıkıştırma Çalışıyor" [context."Compression estimate"] "unknown" = "bilinmiyor" @@ -213,13 +213,13 @@ "TB" = "TB" [context."Folder Compression Queue"] -"COMPLETED" = "COMPLETED" # LOC:TODO -"Clear completed" = "Clear completed" # LOC:TODO -"Expected savings" = "Expected savings" # LOC:TODO -"PENDING" = "PENDING" # LOC:TODO -"Queue" = "Queue" # LOC:TODO -"To process" = "To process" # LOC:TODO -"{0} of {1} completed" = "{0} of {1} completed" # LOC:TODO +"COMPLETED" = "TAMAMLANDI" +"Clear completed" = "Tamamlananları temizle" +"Expected savings" = "Beklenen tasarruf" +"PENDING" = "BEKLEYEN" +"Queue" = "Sıra" +"To process" = "İşlenecek" +"{0} of {1} completed" = "{1} işlemin {0} kadarı tamamlandı" [context."Folder status"] "Unknown" = "Bilinmiyor" @@ -239,14 +239,14 @@ "Save" = "Kaydet" [context."Steam Library Compression Mode Button"] -"Compress | {0}" = "Compress | {0}" # LOC:TODO +"Compress | {0}" = "Sıkıştır | {0}" [context."Steam Library Tab Headings"] -"CURRENT SIZE" = "CURRENT SIZE" # LOC:TODO -"GAME" = "GAME" # LOC:TODO -"RECOMMENDED ACTION" = "RECOMMENDED ACTION" # LOC:TODO -"SAVINGS" = "SAVINGS" # LOC:TODO -"STATUS" = "STATUS" # LOC:TODO +"CURRENT SIZE" = "MEVCUT BOYUT" +"GAME" = "OYUN" +"RECOMMENDED ACTION" = "ÖNERİLEN EYLEM" +"SAVINGS" = "TASARRUF" +"STATUS" = "DURUM" [context."Storage savings"] "saved" = "kaydedildi" From d2596d2e472d88329bbf31492f2f51c7179d5a85 Mon Sep 17 00:00:00 2001 From: IridiumIO Date: Tue, 15 Sep 2026 19:44:44 +1000 Subject: [PATCH 092/134] Don't duplicate existing steam header images if they're already found in the appcache folder. Close #664 --- .../ViewModels/SteamMonitorViewModel.vb | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/CompactGUI/ViewModels/SteamMonitorViewModel.vb b/CompactGUI/ViewModels/SteamMonitorViewModel.vb index f36e59cb..a05e1e82 100644 --- a/CompactGUI/ViewModels/SteamMonitorViewModel.vb +++ b/CompactGUI/ViewModels/SteamMonitorViewModel.vb @@ -441,7 +441,6 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject Try Dim cachedImageData = Await File.ReadAllBytesAsync(steamCachedHeader) game.HeaderImage = CreateFadedHeaderImage(LoadImageFromMemoryStream(cachedImageData)) - Await File.WriteAllBytesAsync(imagePath, cachedImageData) Return Catch ex As Exception Diagnostics.Debug.WriteLine($"Failed to use Steam's cached header for {game.AppID}: {ex.Message}") @@ -521,21 +520,19 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject If Not Directory.Exists(appCacheDirectory) Then Return Nothing Try - Dim directories = {appCacheDirectory}.Concat(Directory.EnumerateDirectories(appCacheDirectory)) - Return directories.SelectMany(Function(directoryPath) Directory.EnumerateFiles(directoryPath, "*header*", SearchOption.TopDirectoryOnly)).Where(AddressOf IsSupportedHeaderImage).OrderBy(Function(filePath) If(String.Equals(Path.GetFileName(filePath), "library_header.jpg", StringComparison.OrdinalIgnoreCase), 0, 1)).FirstOrDefault() - Catch ex As Exception When TypeOf ex Is IOException OrElse TypeOf ex Is UnauthorizedAccessException + Dim searchFolders = {appCacheDirectory}.Concat(Directory.EnumerateDirectories(appCacheDirectory)) + + Return searchFolders. + SelectMany(Function(folderPath) Directory.EnumerateFiles(folderPath, "*header*", SearchOption.TopDirectoryOnly)). + Where(Function(imageFile) Path.GetExtension(imageFile).Equals(".jpg", StringComparison.OrdinalIgnoreCase) OrElse + Path.GetExtension(imageFile).Equals(".jpeg", StringComparison.OrdinalIgnoreCase) OrElse + Path.GetExtension(imageFile).Equals(".png", StringComparison.OrdinalIgnoreCase)). + FirstOrDefault() + Catch ex As Exception Return Nothing End Try End Function - Private Shared Function IsSupportedHeaderImage(filePath As String) As Boolean - Select Case Path.GetExtension(filePath).ToLowerInvariant() - Case ".jpg", ".jpeg", ".png" - Return True - Case Else - Return False - End Select - End Function Private Shared Async Function TryDownloadImageAsync(url As String) As Task(Of Byte()) If String.IsNullOrWhiteSpace(url) Then Return Nothing From 50ef7b5b18d78122a4d71b26c10742fb5b5ec2d9 Mon Sep 17 00:00:00 2001 From: Iridium IO Date: Tue, 15 Sep 2026 19:46:27 +1000 Subject: [PATCH 093/134] Update version number in Turkish localization file --- CompactGUI/Resources/Localisation/tr-TR.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CompactGUI/Resources/Localisation/tr-TR.toml b/CompactGUI/Resources/Localisation/tr-TR.toml index fbfb4de3..1574e786 100644 --- a/CompactGUI/Resources/Localisation/tr-TR.toml +++ b/CompactGUI/Resources/Localisation/tr-TR.toml @@ -1,5 +1,5 @@ # CompactGUI Localisation -# @version 1 +# @version 2 # @programversion 4.0.0-beta.11 # =================== From 96a7a5595a5ce0990673e4dc89ae7995ec76e07a Mon Sep 17 00:00:00 2001 From: Iridium IO Date: Tue, 15 Sep 2026 19:47:45 +1000 Subject: [PATCH 094/134] Revert: Update version number in Turkish localization file --- CompactGUI/Resources/Localisation/tr-TR.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CompactGUI/Resources/Localisation/tr-TR.toml b/CompactGUI/Resources/Localisation/tr-TR.toml index 1574e786..fbfb4de3 100644 --- a/CompactGUI/Resources/Localisation/tr-TR.toml +++ b/CompactGUI/Resources/Localisation/tr-TR.toml @@ -1,5 +1,5 @@ # CompactGUI Localisation -# @version 2 +# @version 1 # @programversion 4.0.0-beta.11 # =================== From 8df176ada0761e4b9282ff46e8304c5e66a67276 Mon Sep 17 00:00:00 2001 From: Iridium IO Date: Tue, 15 Sep 2026 19:48:26 +1000 Subject: [PATCH 095/134] Add Turkish localization support --- CompactGUI/Resources/Localisation/manifest.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CompactGUI/Resources/Localisation/manifest.toml b/CompactGUI/Resources/Localisation/manifest.toml index 8de0d940..e76cbc55 100644 --- a/CompactGUI/Resources/Localisation/manifest.toml +++ b/CompactGUI/Resources/Localisation/manifest.toml @@ -23,3 +23,7 @@ file = "zh-CN.toml" [locales."it-IT"] version = 1 file = "it-IT.toml" + +[locales."tr-TR"] +version = 1 +file = "tr-TR.toml" From cf5eeb3d93d167ac09198bc54b0283d2f6935ae8 Mon Sep 17 00:00:00 2001 From: MCfywb Date: Tue, 15 Sep 2026 18:13:16 +0800 Subject: [PATCH 096/134] Update Chinese(Simplified) translation to match version 4.0 beta 11 --- CompactGUI/Resources/Localisation/zh-CN.toml | 216 ++++++++----------- 1 file changed, 91 insertions(+), 125 deletions(-) diff --git a/CompactGUI/Resources/Localisation/zh-CN.toml b/CompactGUI/Resources/Localisation/zh-CN.toml index 1b5a51fd..034cbb7b 100644 --- a/CompactGUI/Resources/Localisation/zh-CN.toml +++ b/CompactGUI/Resources/Localisation/zh-CN.toml @@ -7,7 +7,7 @@ "Add" = "添加" "Add a custom folder to the watchlist" = "添加自定义文件夹到监控列表" -"Add selected to queue" = "Add selected to queue" # LOC:TODO +"Add selected to queue" = "添加选中项到队列" "Add to Compression Queue" = "添加到压缩队列" "Add to compression queue" = "添加到压缩队列" "Add to right-click context menu" = "添加到右键菜单" @@ -15,26 +15,26 @@ "Added to Queue" = "已添加到队列" "Admin" = "管理员权限" "Aggression of online skiplist" = "在线跳过列表的激进程度" -"Always show details on Compression Mode buttons" = "始终显示压缩模式按钮的详细信息" +"Always show details on Compression Mode buttons" = "始终在压缩模式按钮上显示详细信息" "Analysing" = "正在分析" -"Analysing..." = "Analysing..." # LOC:TODO +"Analysing..." = "分析中……" "Applied to all folders" = "已应用到所有文件夹" -"Ascending" = "升序" +"Ascending" = "递增" "Awaiting Compression" = "等待压缩" "Background Watcher Settings" = "后台监控设置" -"COMPARE METHODS" = "COMPARE METHODS" # LOC:TODO -"COMPRESSION MODE " = "COMPRESSION MODE " # LOC:TODO -"Cancel" = "否" +"COMPARE METHODS" = "比较压缩模式" +"COMPRESSION MODE " = "压缩模式" +"Cancel" = "取消" "Cancel Background Compressor" = "取消后台压缩" "Cancel operation" = "取消操作" "Cannot remove folder" = "无法移除文件夹" "Check for pre-release updates" = "检查预发布更新" -"Choose Compression" = "Choose Compression" # LOC:TODO -"Clear filters" = "Clear filters" # LOC:TODO +"Choose Compression" = "选择压缩模式" +"Clear filters" = "清除筛选条件" "Click to download" = "点击下载" "CompactGUI" = "CompactGUI" -"Complete" = "Complete" # LOC:TODO -"Compress" = "Compress" # LOC:TODO +"Complete" = "完成" +"Compress" = "压缩" "Compress Again" = "再次压缩" "Compress All Now" = "立即全部压缩" "Compress Selected" = "压缩选中项" @@ -48,115 +48,115 @@ "Compression options have been applied to all folders" = "压缩选项已应用到所有文件夹" "Current Size" = "当前大小" "Database Results" = "数据库结果" -"Descending" = "降序" -"Deselect all" = "Deselect all" # LOC:TODO +"Descending" = "递减" +"Deselect all" = "取消全选" "Direct Storage" = "Direct Storage" -"Do Not Compress" = "Do Not Compress" # LOC:TODO +"Do Not Compress" = "无需压缩" "Do not compress" = "无需压缩" "Drive unavailable" = "驱动器不可用" -"Edit list" = "Edit list" # LOC:TODO -"Estimate Compression for non-Steam Folders (beta)" = "估算非 Steam 文件夹的压缩率 (测试版)" -"Estimated Size" = "Estimated Size" # LOC:TODO +"Edit list" = "编辑列表" +"Estimate Compression for non-Steam Folders (beta)" = "估算非 Steam 文件夹的压缩率 (测试版)" +"Estimated Size" = "预估大小" "Estimated size" = "预估大小" "Exit" = "退出" -"Extensions in this folder" = "此文件夹中的扩展名" -"Failed" = "Failed" # LOC:TODO +"Extensions in this folder" = "此文件夹中包含的扩展名" +"Failed" = "失败" "Failed to submit to wiki" = "提交到 Wiki 失败" "Filetype Management" = "文件类型管理" -"Filter" = "Filter" # LOC:TODO -"Finishing {0} active file operations; do not power off." = "Finishing {0} active file operations; do not power off." # LOC:TODO -"For Steam Games, this uses the database to determine types to skip. For non-Steam folders this is based on the smart analyser." = "对于 Steam 游戏,使用数据库来确定要跳过的类型。对于非 Steam 文件夹,则基于智能分析器。" -"For Steam games only.\nWhen choosing to skip user-submitted filetypes, this setting determines how many submissions are required for each filetype to consider skipping it. \n'low' is generally best, as higher options run the risk of skipping files that would otherwise compress well." = "仅限 Steam 游戏。\n在选择跳过用户提交的文件类型时,该设置决定了每种文件类型需要提交多少次才能考虑跳过该类型。\n“低”通常是最好的,因为高档有跳过本来可以很好地压缩的文件的风险。" -"Game" = "游戏" +"Filter" = "筛选" +"Finishing {0} active file operations; do not power off." = "正在完成 {0} 个活跃的文件操作;请不要关闭软件。" +"For Steam Games, this uses the database to determine types to skip. For non-Steam folders this is based on the smart analyser." = "对于 Steam 游戏,将使用数据库确定要跳过的文件类型。对于非 Steam 文件夹,则由智能分析器决定。" +"For Steam games only.\nWhen choosing to skip user-submitted filetypes, this setting determines how many submissions are required for each filetype to consider skipping it. \n'low' is generally best, as higher options run the risk of skipping files that would otherwise compress well." = "仅适用于 Steam 游戏。\n在选择跳过用户提交的文件类型时,该设置决定了每种文件类型需要达到多少次提交才会考虑跳过。\n“低”通常是最佳选项,因为更高的选项有跳过原本能压缩得很好的文件的风险。" +"Game" = "游戏名" "Game Name" = "游戏名称" -"Games" = "游戏列表" -"Go to Database Results" = "前往数据库结果" +"Games" = "个游戏" +"Go to Database Results" = "查看数据库结果" "HDDs only use 1 thread" = "机械硬盘仅使用 1 个线程" "Home" = "主页" -"Include global skiplist" = "Include global skiplist" # LOC:TODO -"Include global skipped file types" = "包含全局跳过的文件类型" -"Include smart skiplist" = "Include smart skiplist" # LOC:TODO -"Include smart skipped file types" = "包含智能跳过的文件类型" +"Include global skiplist" = "使用全局跳过列表" +"Include global skipped file types" = "使用全局跳过的文件类型" +"Include smart skiplist" = "使用智能跳过列表" +"Include smart skipped file types" = "使用智能跳过的文件类型" "Insufficient permission to access this folder" = "没有足够的权限访问此文件夹" "LZX" = "LZX" -"Last Fetched: {0:dd MMM yyyy HH:mm:ss}" = "最后获取: {0:yyyy年 M月 d日 HH:mm:ss}" +"Last Fetched: {0:dd MMM yyyy HH:mm:ss}" = "上次获取: {0:yyyy年 M月 d日 HH:mm:ss}" "Last analysed {0}" = "上次分析 {0}" -"Last ran: {0:dd MMM yyyy} at {0:HH:mm:ss}" = "上次运行: {0:yyyy年 M月 d日 HH:mm:ss}" -"Library location" = "Library location" # LOC:TODO +"Last ran: {0:dd MMM yyyy} at {0:HH:mm:ss}" = "上次运行: {0:yyyy年 M月 d日 HH:mm:ss}" +"Library location" = "库位置" "Manage local skipped filetypes" = "管理本地跳过的文件类型" "Max Savings" = "最大节省" "Maximum Compression Threads" = "最大压缩线程数" "Mode" = "压缩模式" "Monitor compressed folders for changes" = "监控已压缩文件夹的更改" "Never" = "从不" -"Next scheduled: {0:dd MMM yyyy} at {0:HH:mm:ss}" = "下次计划: {0:yyyy年 M月 d日 HH:mm:ss}" -"No installed Steam games were found." = "未发现已安装的Steam游戏。" -"No wiki data" = "无wiki数据" +"Next scheduled: {0:dd MMM yyyy} at {0:HH:mm:ss}" = "下次计划: {0:yyyy年 M月 d日 HH:mm:ss}" +"No installed Steam games were found." = "未发现已安装的 Steam 游戏。" +"No wiki data" = "无 wiki 数据" "Not Compressed" = "未压缩" -"Not enough space" = "Not enough space" # LOC:TODO +"Not enough space" = "空间不足" "On Schedule" = "按计划" "On Schedule if system is also idle" = "按计划且系统空闲时" "Open" = "打开" "Open Settings Folder" = "打开设置文件夹" "Operation cancelled." = "操作已取消。" "Operation failed: {0}" = "操作失败: {0}" -"Original Size" = "Original Size" # LOC:TODO -"Paused" = "Paused" # LOC:TODO -"Please check your internet connection and try again" = "请检查您的网络连接并重试" +"Original Size" = "原始大小" +"Paused" = "已暂停" +"Please check your internet connection and try again" = "请检查你的网络连接并重试" "Please wait until the current operation is finished" = "请等待当前操作完成" -"Preparing" = "Preparing" # LOC:TODO -"Quickly parses over files and estimates their compression ratio without writing to disk. This will likely be super laggy on HDDs!" = "快速分析文件并估算压缩比而无需写入磁盘。 这将会导致机械硬盘非常卡顿!" +"Preparing" = "正在准备" +"Quickly parses over files and estimates their compression ratio without writing to disk. This will likely be super laggy on HDDs!" = "快速分析文件并估算压缩率而无需写入磁盘。这在机械硬盘上可能会非常卡顿!" "Re-analyse all watched folders" = "重新分析所有受监控文件夹" "Re-analyse this folder" = "重新分析此文件夹" -"Recently Updated" = "最近更新过" -"Recommended Action" = "Recommended Action" # LOC:TODO -"Reload Languages.\nChecks online for updated language definitions" = "重新加载语言。\n在线检查语言定义更新" -"Reload Steam Library list" = "重新加载Steam库列表" -"Remove from Watchlist" = "从监控列表移除" +"Recently Updated" = "近期更新" +"Recommended Action" = "推荐操作" +"Reload Languages.\nChecks online for updated language definitions" = "重新加载语言。\n联网检查语言文件更新" +"Reload Steam Library list" = "重新加载 Steam 库列表" +"Remove from Watchlist" = "从监控列表中移除" "Reset" = "重置" "Restart as Admin" = "以管理员身份重新启动" -"SHOW QUEUE" = "SHOW QUEUE" # LOC:TODO -"SKIPLIST SELECTION" = "SKIPLIST SELECTION" # LOC:TODO -"Saved" = "Saved" # LOC:TODO +"SHOW QUEUE" = "展开队列" +"SKIPLIST SELECTION" = "跳过列表选择" +"Saved" = "已节省" "Savings" = "节省" -"Scanning installed Steam games..." = "正在扫描已安装的Steam游戏……" +"Scanning installed Steam games..." = "正在扫描已安装的 Steam 游戏……" "Search by game name or SteamID..." = "按游戏名称或 SteamID 搜索……" -"Select" = "Select" # LOC:TODO -"Select a folder to compress" = "选择一个文件夹压缩" -"Select all" = "Select all" # LOC:TODO -"Select all compressable" = "Select all compressable" # LOC:TODO -"Select all visible games" = "Select all visible games" # LOC:TODO +"Select" = "选择" +"Select a folder to compress" = "选择要压缩的文件夹" +"Select all" = "全选" +"Select all compressable" = "全选可压缩项" +"Select all visible games" = "全选可见游戏" "Settings" = "设置" -"Show notification on completion" = "完成后显示通知" -"Sort" = "Sort" # LOC:TODO +"Show notification on completion" = "完成时显示通知" +"Sort" = "排序方式" "Sort By" = "排序方式" -"Start CompactGUI in system tray" = "在系统托盘启动 CompactGUI" +"Start CompactGUI in system tray" = "启动时最小化到系统托盘" "Status" = "状态" -"Steam Library" = "Steam库" +"Steam Library" = "Steam 库" "SteamID" = "SteamID" "Submit Results" = "提交结果" -"Submitted to wiki" = "已提交到 Wiki" +"Submitted to wiki" = "已提交到 wiki" "Success" = "成功" "System Integration" = "系统集成" "The SnackbarPresenter was never set" = "SnackbarPresenter 从未被设置" -"There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." = "There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." # LOC:TODO -"This game uses DirectStorage technology. If you are using this feature, you should not compress this game." = "此游戏使用 DirectStorage 技术。如果您正在使用此功能,则不应压缩此游戏。" -"Total Results" = "总结果" +"There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." = "驱动器的可用空间不足以安全压缩此文件夹。你需要至少预留相当于此文件夹大小的 50% 的可用空间以确保 Windows 不会出现问题。" +"This game uses DirectStorage technology. If you are using this feature, you should not compress this game." = "此游戏使用 DirectStorage 技术。如果你正在使用此功能,则不应压缩此游戏。" +"Total Results" = "结果总数" "UI Settings" = "UI 设置" "UID" = "UID" "Uncompress" = "解压缩" -"Uncompressed" = "已解压缩" +"Uncompressed" = "未压缩" "Uncompressing..." = "解压缩中……" "Unknown" = "未知" "Update Available" = "更新可用" "Update Available ▸ Version {0}" = "更新可用 ▸ 版本 {0}" "Update Settings" = "更新设置" -"Update in Steam" = "在Steam中更新" -"Use exclusions" = "Use exclusions" # LOC:TODO -"Use recommended mode" = "Use recommended mode" # LOC:TODO +"Update in Steam" = "在 Steam 中更新" +"Use exclusions" = "使用跳过列表" +"Use recommended mode" = "使用推荐模式" "Version" = "版本" -"Waiting" = "Waiting" # LOC:TODO -"Watch folder for changes" = "监控文件夹更改" +"Waiting" = "正在等待" +"Watch folder for changes" = "监控此文件夹的更改" "Watched Folders" = "受监控文件夹" "Watcher" = "监控" "WatcherPage" = "监控页" @@ -165,36 +165,36 @@ "XPRESS 16K" = "XPRESS 16K" "XPRESS 4K" = "XPRESS 4K" "XPRESS 8K" = "XPRESS 8K" -"Yes" = "是" +"Yes" = "确定" "You currently have {0} folders being watched. Closing CompactGUI will stop them from being monitored.{1}{1}Are you sure you want to exit?" = "你目前有 {0} 个文件夹正在被监控。关闭 CompactGUI 将停止对它们的监控。{1}{1}你确定要退出吗?" -"Your settings have been reset to their default to accommodate the update" = "Your settings have been reset to their default to accommodate the update" # LOC:TODO -"Your settings have been reset to their default." = "Your settings have been reset to their default." # LOC:TODO +"Your settings have been reset to their default to accommodate the update" = "你的设置已被重置以适应更新" +"Your settings have been reset to their default." = "你的设置已被重置" "can be saved" = "可以节省" -"contained files" = "包含文件" +"contained files" = "包含文件数" "day(s)" = "天" "edit" = "编辑" -"edit skipped filetypes" = "编辑跳过类型" -"estimated savings" = "estimated savings" # LOC:TODO +"edit skipped filetypes" = "编辑跳过的文件类型" +"estimated savings" = "预估节省" "every" = "每" "games" = "个游戏" "just now" = "刚刚" -"last compressed:" = "上次压缩:" -"last modified:" = "上次修改:" -"recommended" = "recommended" # LOC:TODO -"saved" = "saved" # LOC:TODO +"last compressed:" = "上次压缩:" +"last modified:" = "上次修改:" +"recommended" = "推荐" +"saved" = "已节省" "select a folder" = "选择文件夹" "uncompressed size" = "未压缩大小" "{0:0} days ago" = "{0:0} 天前" "{0:0} hours ago" = "{0:0} 小时前" "{0:0} minutes ago" = "{0:0} 分钟前" "{0} saved" = "{0} 已节省" -"{0}% decayed" = "{0}% 已衰减" +"{0}% decayed" = "{0}% 需重新压缩" [context."Background Scheduler"] "CompactGUI is running a scheduled task and will compress monitored folders in the background" = "CompactGUI正在运行一个计划任务并将会在后台压缩监控文件夹" -"Next scheduled task is on {0}" = "下一次计划任务在 {0}" -"Scheduled Compression Completed" = "计划任务压缩完成" -"Scheduled Compression Running" = "正在运行计划压缩" +"Next scheduled task is on {0}" = "下一次计划压缩在 {0}" +"Scheduled Compression Completed" = "计划压缩已完成" +"Scheduled Compression Running" = "计划压缩运行中" [context."Compression estimate"] "unknown" = "未知" @@ -213,13 +213,13 @@ "TB" = "TB" [context."Folder Compression Queue"] -"COMPLETED" = "COMPLETED" # LOC:TODO -"Clear completed" = "Clear completed" # LOC:TODO -"Expected savings" = "Expected savings" # LOC:TODO -"PENDING" = "PENDING" # LOC:TODO -"Queue" = "Queue" # LOC:TODO -"To process" = "To process" # LOC:TODO -"{0} of {1} completed" = "{0} of {1} completed" # LOC:TODO +"COMPLETED" = "已完成" +"Clear completed" = "清除已完成项" +"Expected savings" = "预期节省" +"PENDING" = "待压缩" +"Queue" = "队列" +"To process" = "待处理" +"{0} of {1} completed" = "{0} / {1} 已完成" [context."Folder status"] "Unknown" = "未知" @@ -250,37 +250,3 @@ [context."Storage savings"] "saved" = "已节省" - -[obsolete] -"Add Folder to Queue" = "添加文件夹到队列" -"Apply to all" = "应用到所有" -"Cancelling..." = "取消中……" -"Compression Mode" = "压缩模式" -"Configuration" = "配置" -"Custom list — {0} entries" = "自定义列表 — {0} 条" -"Custom: {0} entries" = "自定义: {0} 条" -"DB — {0} files" = "Wiki — {0} 个文件" -"Edit skip list for this folder" = "编辑此文件夹的跳过列表" -"Files Compressed" = "文件已压缩" -"For Steam Games:\nskips files based on database results\n\nFor Non-Steam Folders:\nskips files based on compression estimate" = "对于 Steam 游戏:\n根据数据库结果跳过文件\n\n对于非 Steam 文件夹:\n基于压缩估计跳过文件" -"Global + DB — {0} files" = "全局 + Wiki — {0} 个文件" -"Global — {0} files" = "全局 — {0} 个文件" -"Global: {0} skipped" = "全局: 已跳过 {0}" -"Language (Requires Restart)" = "语言 (需要重启)" -"Language Changed" = "语言更改" -"Language changed successfully. You may need to restart the application for all changes to take effect." = "语言更改成功。您可能需要重启应用程序以使所有更改生效。" -"Last analysed" = "上次分析" -"OK" = "好" -"Off" = "关闭" -"Quickly parses over files and estimates their compression ratio without writing to disk. This will likely be super laggy on HDDs! " = "快速分析文件并估算压缩比而无需写入磁盘。 这将会导致机械硬盘非常卡顿! " -"Results State" = "数据库状态" -"Skip file types likely to compress poorly" = "跳过可能压缩效果不佳的文件类型" -"Skip file types specified in settings" = "跳过设置中指定的文件类型" -"Smart: {0} skipped" = "智能: 已跳过 {0}" -"Space Saved" = "节省空间" -"Use skip list" = "使用跳过列表" -"Welcome" = "欢迎" -"decayed" = "需重新压缩" -"files will be skipped" = "个文件将被跳过" -"not configured" = "未配置" -"{0} files will be skipped" = "{0} 个文件将会跳过" From b6b6d209bd27378255319f103cf582f84159ff13 Mon Sep 17 00:00:00 2001 From: IridiumIO Date: Tue, 15 Sep 2026 20:52:24 +1000 Subject: [PATCH 097/134] Add sorting buttons to headers on steam library page --- .../ViewModels/SteamMonitorViewModel.vb | 64 ++-- CompactGUI/Views/Pages/SteamMonitorPage.xaml | 281 ++++++++++++++++-- 2 files changed, 305 insertions(+), 40 deletions(-) diff --git a/CompactGUI/ViewModels/SteamMonitorViewModel.vb b/CompactGUI/ViewModels/SteamMonitorViewModel.vb index a05e1e82..916697e4 100644 --- a/CompactGUI/ViewModels/SteamMonitorViewModel.vb +++ b/CompactGUI/ViewModels/SteamMonitorViewModel.vb @@ -58,6 +58,12 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject Private _searchText As String + + Private _activeSortColumn As String + + + Private _isSortDescending As Boolean + Private _selectedGame As SteamDetailedResult @@ -137,6 +143,9 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject UseSmartSkiplist = settingsService.AppSettings.SkipUserNonCompressable FilteredSteamGames = CollectionViewSource.GetDefaultView(SteamGamesData) FilteredSteamGames.Filter = AddressOf FilterGames + ActiveSortColumn = "GameName" + IsSortDescending = False + ApplySort() AddHandler SteamGamesData.CollectionChanged, AddressOf OnSteamGamesCollectionChanged End Sub @@ -308,26 +317,45 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject Private Sub Sort(parameter As Object) - FilteredSteamGames.SortDescriptions.Clear() + Dim requestedSort = parameter?.ToString() + + IsSortDescending = requestedSort.EndsWith("Desc", StringComparison.Ordinal) + ActiveSortColumn = requestedSort.Substring(0, requestedSort.Length - If(IsSortDescending, 4, 3)) + ApplySort() + End Sub + + + Private Sub CycleSort(column As String) + If Not String.Equals(ActiveSortColumn, column, StringComparison.Ordinal) Then + ActiveSortColumn = column + IsSortDescending = False + ElseIf Not IsSortDescending Then + IsSortDescending = Not IsSortDescending + Else + ActiveSortColumn = "GameName" + IsSortDescending = False + End If + + ApplySort() + End Sub - Select Case parameter?.ToString() - Case "GameNameAsc" - FilteredSteamGames.SortDescriptions.Add(New SortDescription(NameOf(SteamDetailedResult.GameName), ListSortDirection.Ascending)) - Case "GameNameDesc" - FilteredSteamGames.SortDescriptions.Add(New SortDescription(NameOf(SteamDetailedResult.GameName), ListSortDirection.Descending)) - Case "StatusAsc" - FilteredSteamGames.SortDescriptions.Add(New SortDescription(NameOf(SteamDetailedResult.StatusMessage), ListSortDirection.Ascending)) - Case "StatusDesc" - FilteredSteamGames.SortDescriptions.Add(New SortDescription(NameOf(SteamDetailedResult.StatusMessage), ListSortDirection.Descending)) - Case "CurrentSizeAsc" - FilteredSteamGames.SortDescriptions.Add(New SortDescription(NameOf(SteamDetailedResult.CurrentFolderSize), ListSortDirection.Ascending)) - Case "CurrentSizeDesc" - FilteredSteamGames.SortDescriptions.Add(New SortDescription(NameOf(SteamDetailedResult.CurrentFolderSize), ListSortDirection.Descending)) - Case "SavingsAsc" - FilteredSteamGames.SortDescriptions.Add(New SortDescription(NameOf(SteamDetailedResult.DisplayedSavings), ListSortDirection.Ascending)) - Case "SavingsDesc" - FilteredSteamGames.SortDescriptions.Add(New SortDescription(NameOf(SteamDetailedResult.DisplayedSavings), ListSortDirection.Descending)) + Private Sub ApplySort() + Dim propertyName As String + Select Case ActiveSortColumn + Case "Status" + propertyName = NameOf(SteamDetailedResult.StatusMessage) + Case "CurrentSize" + propertyName = NameOf(SteamDetailedResult.CurrentFolderSize) + Case "Savings" + propertyName = NameOf(SteamDetailedResult.DisplayedSavings) + Case "RecommendedAction" + propertyName = NameOf(SteamDetailedResult.RecommendedActionCategory) + Case Else + propertyName = NameOf(SteamDetailedResult.GameName) End Select + + FilteredSteamGames.SortDescriptions.Clear() + FilteredSteamGames.SortDescriptions.Add(New SortDescription(propertyName, If(IsSortDescending, ListSortDirection.Descending, ListSortDirection.Ascending))) End Sub Public Async Function LoadGamesAsync() As Task diff --git a/CompactGUI/Views/Pages/SteamMonitorPage.xaml b/CompactGUI/Views/Pages/SteamMonitorPage.xaml index 1cd9d65f..2d5be4e2 100644 --- a/CompactGUI/Views/Pages/SteamMonitorPage.xaml +++ b/CompactGUI/Views/Pages/SteamMonitorPage.xaml @@ -125,6 +125,10 @@ + + + + @@ -200,23 +204,254 @@ Margin="-20 -10 0 -10" HorizontalAlignment="Left" Click="OnSelectAllVisibleClick" IsThreeState="True" ToolTip="{loc:T Select all visible games}" /> - - - - - + + + + + @@ -279,22 +514,24 @@ - + - - + + - + From c988d8ba1d798b0e91fe30a5032e9f1cb357caac Mon Sep 17 00:00:00 2001 From: IridiumIO Date: Tue, 15 Sep 2026 20:56:57 +1000 Subject: [PATCH 098/134] Aded hover colour to list view items in Steam Library --- CompactGUI/Views/Pages/SteamMonitorPage.xaml | 63 +++++++++++++++++--- 1 file changed, 55 insertions(+), 8 deletions(-) diff --git a/CompactGUI/Views/Pages/SteamMonitorPage.xaml b/CompactGUI/Views/Pages/SteamMonitorPage.xaml index 2d5be4e2..667a8783 100644 --- a/CompactGUI/Views/Pages/SteamMonitorPage.xaml +++ b/CompactGUI/Views/Pages/SteamMonitorPage.xaml @@ -204,8 +204,8 @@ Margin="-20 -10 0 -10" HorizontalAlignment="Left" Click="OnSelectAllVisibleClick" IsThreeState="True" ToolTip="{loc:T Select all visible games}" /> - -