@@ -10,6 +10,8 @@ namespace YoutubeDl.Wpf.Models;
1010
1111public class ObservableSettings : ReactiveObject
1212{
13+ public Settings AppSettings { get ; }
14+
1315 public BaseTheme AppColorMode { get ; set ; }
1416
1517 [ Reactive ]
@@ -96,6 +98,7 @@ public class ObservableSettings : ReactiveObject
9698
9799 public ObservableSettings ( Settings settings )
98100 {
101+ AppSettings = settings ;
99102 AppColorMode = settings . AppColorMode ;
100103 Backend = settings . Backend ;
101104 BackendPath = settings . BackendPath ;
@@ -122,31 +125,31 @@ public ObservableSettings(Settings settings)
122125 DownloadPathHistory = new ( settings . DownloadPathHistory ) ;
123126 }
124127
125- public void UpdateSettings ( Settings settings )
128+ public void UpdateAppSettings ( )
126129 {
127- settings . AppColorMode = AppColorMode ;
128- settings . Backend = Backend ;
129- settings . BackendPath = BackendPath ;
130- settings . BackendGlobalArguments = BackendGlobalArguments . ToArray ( ) ;
131- settings . BackendDownloadArguments = BackendDownloadArguments . ToArray ( ) ;
132- settings . BackendAutoUpdate = BackendAutoUpdate ;
133- settings . BackendLastUpdateCheck = BackendLastUpdateCheck ;
134- settings . FfmpegPath = FfmpegPath ;
135- settings . Proxy = Proxy ;
136- settings . LoggingMaxEntries = LoggingMaxEntries ;
137- settings . SelectedPreset = SelectedPreset ;
138- settings . SelectedPresetText = SelectedPresetText ;
139- settings . CustomPresets = CustomPresets . ToArray ( ) ;
140- settings . AddMetadata = AddMetadata ;
141- settings . DownloadThumbnail = DownloadThumbnail ;
142- settings . DownloadSubtitles = DownloadSubtitles ;
143- settings . DownloadSubtitlesAllLanguages = DownloadSubtitlesAllLanguages ;
144- settings . DownloadAutoGeneratedSubtitles = DownloadAutoGeneratedSubtitles ;
145- settings . DownloadPlaylist = DownloadPlaylist ;
146- settings . UseCustomOutputTemplate = UseCustomOutputTemplate ;
147- settings . CustomOutputTemplate = CustomOutputTemplate ;
148- settings . UseCustomPath = UseCustomPath ;
149- settings . DownloadPath = DownloadPath ;
150- settings . DownloadPathHistory = DownloadPathHistory . ToArray ( ) ;
130+ AppSettings . AppColorMode = AppColorMode ;
131+ AppSettings . Backend = Backend ;
132+ AppSettings . BackendPath = BackendPath ;
133+ AppSettings . BackendGlobalArguments = BackendGlobalArguments . ToArray ( ) ;
134+ AppSettings . BackendDownloadArguments = BackendDownloadArguments . ToArray ( ) ;
135+ AppSettings . BackendAutoUpdate = BackendAutoUpdate ;
136+ AppSettings . BackendLastUpdateCheck = BackendLastUpdateCheck ;
137+ AppSettings . FfmpegPath = FfmpegPath ;
138+ AppSettings . Proxy = Proxy ;
139+ // AppSettings .LoggingMaxEntries is managed by the validation handler.
140+ AppSettings . SelectedPreset = SelectedPreset ;
141+ AppSettings . SelectedPresetText = SelectedPresetText ;
142+ AppSettings . CustomPresets = CustomPresets . ToArray ( ) ;
143+ AppSettings . AddMetadata = AddMetadata ;
144+ AppSettings . DownloadThumbnail = DownloadThumbnail ;
145+ AppSettings . DownloadSubtitles = DownloadSubtitles ;
146+ AppSettings . DownloadSubtitlesAllLanguages = DownloadSubtitlesAllLanguages ;
147+ AppSettings . DownloadAutoGeneratedSubtitles = DownloadAutoGeneratedSubtitles ;
148+ AppSettings . DownloadPlaylist = DownloadPlaylist ;
149+ AppSettings . UseCustomOutputTemplate = UseCustomOutputTemplate ;
150+ AppSettings . CustomOutputTemplate = CustomOutputTemplate ;
151+ AppSettings . UseCustomPath = UseCustomPath ;
152+ AppSettings . DownloadPath = DownloadPath ;
153+ AppSettings . DownloadPathHistory = DownloadPathHistory . ToArray ( ) ;
151154 }
152155}
0 commit comments