Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
e040504
Create build.yml
jamiw1 Sep 30, 2025
d7293a9
add build to dev branch
jamiw1 Sep 30, 2025
aab4b39
Update build.yml
jamiw1 Sep 30, 2025
17bd69b
Update build.yml
jamiw1 Sep 30, 2025
fa8da26
Update build.yml
jamiw1 Sep 30, 2025
0f34783
Update build.yml
jamiw1 Sep 30, 2025
0aa35e1
Update build.yml
jamiw1 Sep 30, 2025
643225e
Update build.yml
jamiw1 Sep 30, 2025
69f89b3
please please please build
jamiw1 Sep 30, 2025
9602e68
Update build.yml
jamiw1 Sep 30, 2025
33bdaad
ples
jamiw1 Sep 30, 2025
d059bd2
this is the one i can feel it
jamiw1 Sep 30, 2025
828cead
woops i need the certificate
jamiw1 Sep 30, 2025
4f38656
Update build.yml
jamiw1 Sep 30, 2025
d78824f
Update build.yml
jamiw1 Sep 30, 2025
2583c8c
Update build.yml
jamiw1 Sep 30, 2025
be6615d
Update build.yml
jamiw1 Sep 30, 2025
d1081ce
Update build.yml
jamiw1 Sep 30, 2025
e28d2fe
and so the rewrite begins... removed some functions and made some new…
jamiw1 Sep 30, 2025
d1f1a1b
shuffle logic 1
jamiw1 Sep 30, 2025
6f1aec0
tweaked NextSong logic
jamiw1 Sep 30, 2025
e0ebbf3
redid play album
jamiw1 Sep 30, 2025
4487832
album playback with new queue system
jamiw1 Sep 30, 2025
91cb8a6
forgot to make this only for main, don't want to waste minutes lol!
jamiw1 Sep 30, 2025
d9773d3
added to tracks/favorites
jamiw1 Sep 30, 2025
1b667b7
fixed favorite tracks being broken, renamed PlayAlbumAsync to PlayAlb…
jamiw1 Oct 1, 2025
cf51e3a
Merge branch 'dev' of https://github.com/jamiw1/Musium into dev
jamiw1 Oct 1, 2025
d3accce
version bump!
jamiw1 Oct 1, 2025
36442c7
changed some icons, renamed favorites, began work on context menu
jamiw1 Oct 1, 2025
9a16c9b
added context menu items
jamiw1 Oct 1, 2025
cc9d7c0
added play and shuffle to Favorites
jamiw1 Oct 1, 2025
9c67184
fixed bug where pressing Play with shuffle enabled still shuffled
jamiw1 Oct 1, 2025
6e61830
new icon for Tracks
jamiw1 Oct 1, 2025
5d6ba43
changed naming added functions
jamiw1 Oct 1, 2025
272710c
added context menu functionality
jamiw1 Oct 1, 2025
c50276d
added removing from queue in Audio service, binded context menu favor…
jamiw1 Oct 1, 2025
e366f1e
ability to remove song from queue, text binding for favorites in cont…
jamiw1 Oct 1, 2025
0218242
awaiting favorite added to song
jamiw1 Oct 1, 2025
c49f909
Dying trying to fix this bug
jamiw1 Oct 1, 2025
20fac10
The pain continues
jamiw1 Oct 1, 2025
5d5a804
FINALLY fixed the bug where favoriting while playing a song would cau…
jamiw1 Oct 1, 2025
5c8b413
removed comment, think it's ready for release
jamiw1 Oct 1, 2025
3c74d98
version bump
jamiw1 Oct 1, 2025
8876ada
refixed freeze on app open
jamiw1 Oct 1, 2025
a48bf9e
fix crash on close via X, added accent colors to favorites, fixed acc…
jamiw1 Oct 1, 2025
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
69 changes: 69 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Build Musium Packaged

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:

build:

strategy:
matrix:
configuration: [Release]
platform: [x64, ARM64]

runs-on: windows-latest

env:
Solution_Name: Musium

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.x

- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v1.0.2

- name: Restore the application
run: msbuild "$env:Solution_Name.slnx" /t:Restore /p:Configuration=$env:Configuration
env:
Configuration: ${{ matrix.configuration }}

- name: Decode the pfx
run: |
$pfx_cert_byte = [System.Convert]::FromBase64String("${{ secrets.BASE64_ENCODED_PFX }}")
$certificatePath = "GitHubActionsWorkflow.pfx"
[IO.File]::WriteAllBytes("$certificatePath", $pfx_cert_byte)

- name: Create the app package
run: msbuild "$env:Solution_Name.slnx" /p:Configuration=$env:Configuration /p:Platform=$env:Platform /p:UapAppxPackageBuildMode=$env:Appx_Package_Build_Mode /p:AppxBundle=$env:Appx_Bundle /p:PackageCertificateKeyFile=GitHubActionsWorkflow.pfx /p:AppxPackageDir="$env:Appx_Package_Dir" /p:GenerateAppxPackageOnBuild=true
env:
Appx_Bundle: Never
Appx_Package_Build_Mode: SideloadOnly
Appx_Package_Dir: Packages\
Configuration: ${{ matrix.configuration }}
Platform: ${{ matrix.platform }}

- name: Remove the pfx
run: Remove-Item -path GitHubActionsWorkflow.pfx

- name: Upload app packages and certificate
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.platform }}-App-Package
path: |
${{ github.workspace }}/Packages/**/*.msix
${{ github.workspace }}/Packages/**/*.cer
!${{ github.workspace }}/Packages/**/Dependencies/**


6 changes: 5 additions & 1 deletion App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
using Windows.Media.Core;
using Windows.Media.Playback;
using Windows.Storage;
using System.Threading.Tasks;

namespace Musium
{
Expand All @@ -37,7 +38,10 @@ protected override async void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventA
MainWindow.Activate();

var Audio = AudioService.Instance;
await Audio.ScanDirectoryIntoLibrary(SettingsService.Instance.LibraryPath);
await Task.Run(async () =>
{
await Audio.ScanDirectoryIntoLibrary(SettingsService.Instance.LibraryPath);
});
}
}
}
12 changes: 11 additions & 1 deletion Controls/QueueListItemControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,17 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">

<Grid Padding="6" Height="60" HorizontalAlignment="Stretch">

<Grid Padding="6" Height="60" HorizontalAlignment="Stretch" Background="Transparent">
<Grid.ContextFlyout>
<MenuFlyout>
<MenuFlyoutItem Text="Remove from queue" Click="RemoveQueue_Click">
<MenuFlyoutItem.Icon>
<SymbolIcon Symbol="Delete"/>
</MenuFlyoutItem.Icon>
</MenuFlyoutItem>
</MenuFlyout>
</Grid.ContextFlyout>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
Expand Down
8 changes: 8 additions & 0 deletions Controls/QueueListItemControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
using Microsoft.UI.Xaml.Media.Imaging;
using Microsoft.UI.Xaml.Navigation;
using Musium.Models;
using Musium.Services;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
Expand All @@ -24,6 +26,7 @@ namespace Musium.Controls;

public sealed partial class QueueListItemControl : UserControl, INotifyPropertyChanged
{
public readonly AudioService Audio = AudioService.Instance;
public event PropertyChangedEventHandler? PropertyChanged;
void OnPropertyChanged([CallerMemberName] string? name = null)
{
Expand Down Expand Up @@ -92,4 +95,9 @@ private async Task UpdateCoverArtAsync()
DisplayedCoverArt = null;
}
}

private void RemoveQueue_Click(object sender, RoutedEventArgs e)
{
Audio.RemoveFromQueue(Song);
}
}
31 changes: 28 additions & 3 deletions Controls/TrackItemControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
<converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
<converters:InverseBooleanToVisibilityConverter x:Key="InverseBooleanToVisibilityConverter" />
<converters:BoolGridLengthConverter x:Key="BoolGridLengthConverter" />
<converters:BoolToFavoriteStringConverter x:Key="BoolToFavoriteStringConverter" />
<converters:BoolToAccentBrushConverter x:Key="BoolToAccentBrushConverter" />

</UserControl.Resources>

<Button Background="Transparent"
Expand All @@ -23,14 +26,32 @@
HorizontalAlignment="Stretch"
HorizontalContentAlignment="Stretch"
Click="Button_Click">

<Button.ContextFlyout>
<MenuFlyout>
<MenuFlyoutItem Text="Play next" Click="NextQueue_Click">
<MenuFlyoutItem.Icon>
<SymbolIcon Symbol="Import"/>
</MenuFlyoutItem.Icon>
</MenuFlyoutItem>
<MenuFlyoutItem Text="Add to Queue" Click="LastQueue_Click">
<MenuFlyoutItem.Icon>
<FontIcon Glyph="&#xEA52;"/>
</MenuFlyoutItem.Icon>
</MenuFlyoutItem>
<MenuFlyoutItem Text="{x:Bind Song.Favorited, Mode=OneWay, Converter={StaticResource BoolToFavoriteStringConverter}}" Click="MenuFlyoutItemFav_Click">
<MenuFlyoutItem.Icon>
<FontIcon Glyph="{x:Bind Song.Favorited, Mode=OneWay, Converter={StaticResource GetFavoritedGlyph}}"/>
</MenuFlyoutItem.Icon>
</MenuFlyoutItem>
</MenuFlyout>
</Button.ContextFlyout>
<Grid VerticalAlignment="Center" HorizontalAlignment="Stretch" ColumnSpacing="32">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="{x:Bind TrackView, Converter={StaticResource BoolGridLengthConverter}, Mode=OneWay}"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="30"/>
<ColumnDefinition Width="45"/>
<ColumnDefinition Width="40"/>
</Grid.ColumnDefinitions>
Expand All @@ -50,7 +71,11 @@

<FontIcon Grid.Column="4" Glyph="{x:Bind Song.Lossless, Mode=OneWay, Converter={StaticResource GetLosslessGlyph}}" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5"/>
<Button Grid.Column="5" Background="Transparent" CornerRadius="50" VerticalAlignment="Center" HorizontalAlignment="Right" Width="45" Height="45" Click="Favorite_Click">
<FontIcon Glyph="{x:Bind Song.Favorited, Mode=OneWay, Converter={StaticResource GetFavoritedGlyph}}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<FontIcon
Glyph="{x:Bind Song.Favorited, Mode=OneWay, Converter={StaticResource GetFavoritedGlyph}}"
Foreground="{x:Bind Song.Favorited, Mode=OneWay, Converter={StaticResource BoolToAccentBrushConverter}}"
VerticalAlignment="Center"
HorizontalAlignment="Center"/>
</Button>
<TextBlock Grid.Column="6" Text="{x:Bind Song.Duration, Mode=OneWay, Converter={StaticResource DurationConverter}}" VerticalAlignment="Center" HorizontalAlignment="Right" TextTrimming="WordEllipsis"/>
</Grid>
Expand Down
19 changes: 18 additions & 1 deletion Controls/TrackItemControl.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using Musium.Models;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Controls.Primitives;
Expand All @@ -7,6 +6,8 @@
using Microsoft.UI.Xaml.Media;
using Microsoft.UI.Xaml.Media.Imaging;
using Microsoft.UI.Xaml.Navigation;
using Musium.Models;
using Musium.Services;
using System;
using System.Collections.Generic;
using System.ComponentModel;
Expand All @@ -31,6 +32,8 @@ void OnPropertyChanged([CallerMemberName] string? name = null)
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
}

public readonly AudioService Audio = AudioService.Instance;

private BitmapImage? _displayedCoverArt;
public BitmapImage? DisplayedCoverArt
{
Expand Down Expand Up @@ -97,4 +100,18 @@ private void Favorite_Click(object sender, RoutedEventArgs e)
{
Song.Favorited = !Song.Favorited;
}

private void NextQueue_Click(object sender, RoutedEventArgs e)
{
Audio.InsertStartOfQueue(Song);
}
private void LastQueue_Click(object sender, RoutedEventArgs e)
{
Audio.InsertEndOfQueue(Song);
}

private void MenuFlyoutItemFav_Click(object sender, RoutedEventArgs e)
{
Song.Favorited = !Song.Favorited;
}
}
33 changes: 33 additions & 0 deletions Converters/BoolToAccentBrushConverter.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Data;
using Microsoft.UI.Xaml.Media;
using Musium.Services;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.UI;

namespace Musium.Converters
{
public class BoolToAccentBrushConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, string language)
{
if (value is bool state && state == true)
{
return Application.Current.Resources["AccentFillColorDefaultBrush"] as SolidColorBrush;
}
else
{
return Application.Current.Resources["TextFillColorPrimaryBrush"] as SolidColorBrush;
}
}

public object ConvertBack(object value, Type targetType, object parameter, string language)
{
throw new NotImplementedException();
}
}
}
22 changes: 22 additions & 0 deletions Converters/BoolToFavoriteStringConverter.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using System;
using Microsoft.UI.Xaml.Data;

namespace Musium.Converters
{
public class BoolToFavoriteStringConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, string language)
{
if (value is bool favorited)
{
return (favorited ? "Unfavorite" : "Favorite");
}
return "Favorite";
}

public object ConvertBack(object value, Type targetType, object parameter, string language)
{
throw new NotImplementedException();
}
}
}
3 changes: 1 addition & 2 deletions Converters/RepeatStateToBrushConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ public object Convert(object value, Type targetType, object parameter, string la
{
if (value is RepeatState state && state != RepeatState.Off)
{
var accentColor = (Color)Application.Current.Resources["SystemAccentColor"];
return new SolidColorBrush(accentColor);
return Application.Current.Resources["AccentFillColorDefaultBrush"] as SolidColorBrush;
}
else
{
Expand Down
3 changes: 1 addition & 2 deletions Converters/ShuffleStateToBrushConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ public object Convert(object value, Type targetType, object parameter, string la
{
if (value is ShuffleState state && state == ShuffleState.Shuffle)
{
var accentColor = (Color)Application.Current.Resources["SystemAccentColor"];
return new SolidColorBrush(accentColor);
return Application.Current.Resources["AccentFillColorDefaultBrush"] as SolidColorBrush;
}
else
{
Expand Down
10 changes: 5 additions & 5 deletions MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,24 +49,24 @@
</NavigationViewItem.Icon>
</NavigationViewItem>
<NavigationViewItem
Content="Favorited"
Tag="Musium.Pages.Favorited">
Content="Favorites"
Tag="Musium.Pages.Favorites">
<NavigationViewItem.Icon>
<FontIcon Glyph="&#xEB51;"/>
<FontIcon Glyph="&#xE728;"/>
</NavigationViewItem.Icon>
</NavigationViewItem>
<NavigationViewItem
Content="Albums"
Tag="Musium.Pages.Albums">
<NavigationViewItem.Icon>
<SymbolIcon Symbol="Pictures" />
<FontIcon Glyph="&#xE93C;" />
</NavigationViewItem.Icon>
</NavigationViewItem>
<NavigationViewItem
Content="Tracks"
Tag="Musium.Pages.Tracks">
<NavigationViewItem.Icon>
<SymbolIcon Symbol="Audio" />
<SymbolIcon Symbol="MusicInfo" />
</NavigationViewItem.Icon>
</NavigationViewItem>
</NavigationView.MenuItems>
Expand Down
2 changes: 1 addition & 1 deletion MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public MainWindow()
ExtendsContentIntoTitleBar = true;
SetTitleBar(Titlebar);

UpdateNavigationViewSelection(typeof(Musium.Pages.Albums));
UpdateNavigationViewSelection(typeof(Musium.Pages.NowPlaying));

Audio.SetDispatcherQueue(DispatcherQueue);
Audio.SetMediaPlayer(AudioPlayerElement);
Expand Down
5 changes: 3 additions & 2 deletions Models/Album.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
using Microsoft.UI.Xaml.Media.Imaging;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Runtime.CompilerServices;

namespace Musium.Models
{
public class Album : ObservableObject
{
private List<Song> _songs;
public List<Song> Songs
private ObservableCollection<Song> _songs;
public ObservableCollection<Song> Songs
{
get => _songs;
set
Expand Down
Loading
Loading