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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ protected override void OnLaunched(LaunchActivatedEventArgs args)
MainWindow.Activate();
}

private void Application_UnhandledException(object sender, Microsoft.UI.Xaml.UnhandledExceptionEventArgs e)
private static void Application_UnhandledException(object sender, Microsoft.UI.Xaml.UnhandledExceptionEventArgs e)
{
if (MainWindow == null)
return;
Expand Down
2 changes: 1 addition & 1 deletion src/Manager/PlaybackManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public static async Task InitializeAsync()

private static void PlaybackSession_PlaybackStateChanged(MediaPlaybackSession sender, object args)
{
PlaybackStateChanged?.Invoke(sender, sender.PlaybackState);
PlaybackStateChanged?.Invoke(null, sender.PlaybackState);
}

private static async void SystemMediaTransportControls_ButtonPressed(SystemMediaTransportControls sender, SystemMediaTransportControlsButtonPressedEventArgs args)
Expand Down
5 changes: 4 additions & 1 deletion src/Manager/TrackManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@
var files = await folder.GetFilesAsync(CommonFileQuery.OrderByName);
_files.AddRange(files.Where(f => f.FileType.Equals(".ogg", StringComparison.OrdinalIgnoreCase)));
}
catch { }
catch
{
// skip packages that fail to load for any reason
}
}
}
finally
Expand Down Expand Up @@ -128,19 +131,19 @@
private readonly record struct KnownTrack(string CategoryId, string CategoryName, string Name, string Material, string Spectral);

private static readonly KnownTrack[] _tracks = [
new("Underworld", "Underworld", "Normal", "1 - 002 - Underworld.ogg", "1 - 013 - Underworld [Spectral].ogg"),

Check warning on line 134 in src/Manager/TrackManager.cs

View workflow job for this annotation

GitHub Actions / SonarCloud

Define a constant instead of using this literal 'Normal' 9 times.

Check warning on line 134 in src/Manager/TrackManager.cs

View workflow job for this annotation

GitHub Actions / SonarCloud

Define a constant instead of using this literal 'Underworld' 22 times.
new("Underworld", "Underworld", "Suspense", "1 - 003 - Underworld [Suspense].ogg", "1 - 014 - Underworld [Spectral - Suspense].ogg"),

Check warning on line 135 in src/Manager/TrackManager.cs

View workflow job for this annotation

GitHub Actions / SonarCloud

Define a constant instead of using this literal 'Suspense' 9 times.
new("Underworld", "Underworld", "Abyss", "1 - 004 - Underworld [Abyss].ogg", "1 - 015 - Underworld [Spectral - Abyss].ogg"),
new("Underworld", "Underworld", "Puzzle", "1 - 005 - Underworld [Puzzle].ogg", "1 - 016 - Underworld [Spectral - Puzzle].ogg"),

Check warning on line 137 in src/Manager/TrackManager.cs

View workflow job for this annotation

GitHub Actions / SonarCloud

Define a constant instead of using this literal 'Puzzle' 8 times.
new("Underworld", "Underworld", "Danger", "1 - 006 - Underworld [Danger].ogg", "1 - 017 - Underworld [Spectral - Danger].ogg"),

Check warning on line 138 in src/Manager/TrackManager.cs

View workflow job for this annotation

GitHub Actions / SonarCloud

Define a constant instead of using this literal 'Danger' 9 times.
new("Underworld", "Underworld", "Combat", "1 - 007 - Underworld [Combat].ogg", "1 - 018 - Underworld [Spectral - Combat].ogg"),

Check warning on line 139 in src/Manager/TrackManager.cs

View workflow job for this annotation

GitHub Actions / SonarCloud

Define a constant instead of using this literal 'Combat' 9 times.
new("Underworld", "Underworld", "Normal (Exterior)", "1 - 008 - Underworld (Exterior).ogg", "1 - 019 - Underworld (Exterior) [Spectral].ogg"),
new("Underworld", "Underworld", "Danger (Exterior)", "1 - 009 - Underworld (Exterior) [Danger].ogg", "1 - 020 - Underworld (Exterior) [Spectral - Danger].ogg"),

Check warning on line 141 in src/Manager/TrackManager.cs

View workflow job for this annotation

GitHub Actions / SonarCloud

Define a constant instead of using this literal 'Danger (Exterior)' 6 times.
new("Underworld", "Underworld", "Combat (Exterior)", "1 - 010 - Underworld (Exterior) [Combat].ogg", "1 - 021 - Underworld (Exterior) [Spectral - Combat].ogg"),

Check warning on line 142 in src/Manager/TrackManager.cs

View workflow job for this annotation

GitHub Actions / SonarCloud

Define a constant instead of using this literal 'Combat (Exterior)' 5 times.
new("Underworld", "Underworld", "Kain Encounter (Anticipation)", "1 - 061 - Kain Encounter (Anticipation).ogg", "1 - 062 - Kain Encounter (Anticipation) [Spectral].ogg"),
new("Underworld", "Underworld", "Kain Encounter", "1 - 063 - Kain Encounter.ogg", "1 - 064 - Kain Encounter [Spectral].ogg"),

new("RazielsStronghold", "Raziel’s Stronghold", "Normal", "1 - 025 - Raziel's Stronghold.ogg", "1 - 032 - Raziel's Stronghold [Spectral].ogg"),

Check warning on line 146 in src/Manager/TrackManager.cs

View workflow job for this annotation

GitHub Actions / SonarCloud

Define a constant instead of using this literal 'Raziel’s Stronghold' 7 times.

Check warning on line 146 in src/Manager/TrackManager.cs

View workflow job for this annotation

GitHub Actions / SonarCloud

Define a constant instead of using this literal 'RazielsStronghold' 7 times.
new("RazielsStronghold", "Raziel’s Stronghold", "Suspense", "1 - 026 - Raziel's Stronghold [Suspense].ogg", "1 - 033 - Raziel's Stronghold [Spectral - Suspense].ogg"),
new("RazielsStronghold", "Raziel’s Stronghold", "Danger", "1 - 027 - Raziel's Stronghold [Danger].ogg", "1 - 034 - Raziel's Stronghold [Spectral - Danger].ogg"),
new("RazielsStronghold", "Raziel’s Stronghold", "Combat", "1 - 028 - Raziel's Stronghold [Combat].ogg", "1 - 035 - Raziel's Stronghold [Spectral - Combat].ogg"),
Expand Down
2 changes: 1 addition & 1 deletion src/MicaTintedBackdrop.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ protected override void OnTargetDisconnected(ICompositionSupportsSystemBackdrop
base.OnTargetDisconnected(disconnectedTarget);

_micaController.RemoveSystemBackdropTarget(disconnectedTarget);
_micaController?.Dispose();
_micaController.Dispose();
}

public Color TintColor
Expand Down
2 changes: 1 addition & 1 deletion src/ViewModels/SettingsViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public LanguageViewModel SelectedLanguage
}
}

public ObservableCollection<LanguageViewModel> AvailableLanguages
public static ObservableCollection<LanguageViewModel> AvailableLanguages
{
get
{
Expand Down
2 changes: 1 addition & 1 deletion src/Views/MainView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ await DispatcherQueue.EnqueueAsync(async () =>

await PlaybackManager.EnsureInitializedAsync();

navigationView.SelectedItem = navigationView.MenuItems.First();
navigationView.SelectedItem = navigationView.MenuItems[0];
}, DispatcherQueuePriority.Low);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Views/SettingsView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<ComboBox x:Uid="LanguageComboBox"
AutomationProperties.Name="{Binding Header, RelativeSource={RelativeSource Mode=TemplatedParent}}"
DisplayMemberPath="DisplayName"
ItemsSource="{x:Bind Data.Settings.AvailableLanguages}"
ItemsSource="{x:Bind v:SettingsViewModel.AvailableLanguages}"
Loaded="ComboBox_Loaded"
SelectedItem="{x:Bind Data.Settings.SelectedLanguage, Mode=TwoWay}" />

Expand Down
Loading