5 Commits

Author SHA1 Message Date
b32e75f15d Hide windows when clicking corresponding buttons if they were visible 2025-06-06 01:30:14 +02:00
46b96c0c5d Shuffle: Add clear queue and play queue button 2025-06-06 00:46:53 +02:00
0a04e3c6ce Bump components
.NET 6.0 => 8.0
Snapcast 0.27 => 0.31
Autoupdater.NET.Official 1.8.0 => 1.9.2
Hardcodet.NotifyIcon.Wpf 1.1.0 => 2.0.1
MpcNET 1.4.0 => 1.6.6
2025-06-01 15:34:25 +02:00
b5cb6e4c3a Update Snapcast, AutoUpdater and RadioBrowser 2023-04-30 18:28:54 +02:00
d7a0079c86 Update to 1.4 2022-12-09 02:23:27 +01:00
27 changed files with 141 additions and 31 deletions

View File

@ -23,7 +23,7 @@
<value>False</value> <value>False</value>
</setting> </setting>
<setting name="snapcast_path" serializeAs="String"> <setting name="snapcast_path" serializeAs="String">
<value>snapclient_0.26.0-1_win64</value> <value>snapcast_0.31</value>
</setting> </setting>
<setting name="snapcast_port" serializeAs="String"> <setting name="snapcast_port" serializeAs="String">
<value>1704</value> <value>1704</value>

View File

@ -1,5 +1,19 @@
# Changelog # Changelog
## v1.4
*Released: 09/12/2022*
* New feature: shuffle system
* New feature: (un)installer script
* New feature: update system
* New feature: update MPD database button
* Restore window position when relaunching the app
* New settings organisation
* Update Emoji.WPF from 0.3.3 to 0.3.4
* Fix: cover images are displaying in all cases
* Fix: querying a large list of radios could hang the app
## v1.3.1 ## v1.3.1
*Released: 03/11/2022* *Released: 03/11/2022*

View File

@ -1,5 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows; using System.Windows;
@ -34,8 +35,9 @@ namespace unison
SongList.Clear(); SongList.Clear();
int song = _mpd.GetStats().Songs; int songTotal = _mpd.GetStats().Songs;
IEnumerable<IMpdFile> response = await _mpd.SafelySendCommandAsync(new SearchCommand(filter, 0, song + 1));
IEnumerable<IMpdFile> response = await _mpd.SafelySendCommandAsync(new SearchCommand(filter, 0, songTotal + 1));
foreach (IMpdFile file in response) foreach (IMpdFile file in response)
SongList.Add(file.Path); SongList.Add(file.Path);
} }
@ -45,7 +47,7 @@ namespace unison
if (token.IsCancellationRequested) if (token.IsCancellationRequested)
return; return;
int AddedSongs = 0; int addedSongs = 0;
var commandList = new CommandList(); var commandList = new CommandList();
int songTotal = _mpd.GetStats().Songs; int songTotal = _mpd.GetStats().Songs;
@ -54,13 +56,13 @@ namespace unison
{ {
int song = new Random().Next(0, songTotal - 1); int song = new Random().Next(0, songTotal - 1);
commandList.Add(new SearchAddCommand(new FilterTag(MpdTags.Title, "", FilterOperator.Contains), song, song + 1)); commandList.Add(new SearchAddCommand(new FilterTag(MpdTags.Title, "", FilterOperator.Contains), song, song + 1));
AddedSongs++; addedSongs++;
// play if stopped or unknown state (no queue managing at the moment, so mandatory)
if (i == 0 && (_mpd.GetStatus().State != MpdState.Play && _mpd.GetStatus().State != MpdState.Pause))
commandList.Add(new PlayCommand(0));
} }
// play if stopped or unknown state (no queue managing at the moment, so mandatory)
if ((_mpd.GetStatus().State != MpdState.Play && _mpd.GetStatus().State != MpdState.Pause))
commandList.Add(new PlayCommand(0));
await _mpd.SafelySendCommandAsync(commandList); await _mpd.SafelySendCommandAsync(commandList);
} }

View File

@ -1,6 +1,6 @@
#define Name "unison" #define Name "unison"
#define Version "1.3.1" #define Version "1.4"
#define Snapcast "snapclient_0.26.0-1_win64" #define Snapcast "snapcast_0.31"
#define Publisher "Th<54>o Marchal" #define Publisher "Th<54>o Marchal"
#define URL "https://github.com/ZetaKebab/unison" #define URL "https://github.com/ZetaKebab/unison"
#define ExeName "unison.exe" #define ExeName "unison.exe"

View File

@ -1,4 +1,4 @@
MIT License Copyright (c) 2022 Théo Marchal MIT License Copyright (c) 2025 Théo Marchal
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

View File

@ -12,7 +12,7 @@ namespace unison.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.4.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.8.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
@ -85,7 +85,7 @@ namespace unison.Properties {
[global::System.Configuration.UserScopedSettingAttribute()] [global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("snapclient_0.26.0-1_win64")] [global::System.Configuration.DefaultSettingValueAttribute("snapcast_0.31")]
public string snapcast_path { public string snapcast_path {
get { get {
return ((string)(this["snapcast_path"])); return ((string)(this["snapcast_path"]));

View File

@ -18,7 +18,7 @@
<Value Profile="(Default)">False</Value> <Value Profile="(Default)">False</Value>
</Setting> </Setting>
<Setting Name="snapcast_path" Type="System.String" Scope="User"> <Setting Name="snapcast_path" Type="System.String" Scope="User">
<Value Profile="(Default)">snapclient_0.26.0-1_win64</Value> <Value Profile="(Default)">snapcast_0.31</Value>
</Setting> </Setting>
<Setting Name="snapcast_port" Type="System.Int32" Scope="User"> <Setting Name="snapcast_port" Type="System.Int32" Scope="User">
<Value Profile="(Default)">1704</Value> <Value Profile="(Default)">1704</Value>

View File

@ -60,6 +60,15 @@ namespace unison.Resources {
} }
} }
/// <summary>
/// Looks up a localized string similar to Clear queue.
/// </summary>
public static string Clear_Queue {
get {
return ResourceManager.GetString("Clear_Queue", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Database. /// Looks up a localized string similar to Database.
/// </summary> /// </summary>
@ -213,6 +222,24 @@ namespace unison.Resources {
} }
} }
/// <summary>
/// Looks up a localized string similar to Play queue.
/// </summary>
public static string Play_Queue {
get {
return ResourceManager.GetString("Play_Queue", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Queue management.
/// </summary>
public static string Queue_Management {
get {
return ResourceManager.GetString("Queue_Management", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Country. /// Looks up a localized string similar to Country.
/// </summary> /// </summary>

View File

@ -117,6 +117,9 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<data name="Clear_Queue" xml:space="preserve">
<value>Borrar cola</value>
</data>
<data name="Database" xml:space="preserve"> <data name="Database" xml:space="preserve">
<value>Base de datos</value> <value>Base de datos</value>
</data> </data>
@ -168,6 +171,12 @@
<data name="Operator_IsNot" xml:space="preserve"> <data name="Operator_IsNot" xml:space="preserve">
<value>no es</value> <value>no es</value>
</data> </data>
<data name="Play_Queue" xml:space="preserve">
<value>Reproducir cola</value>
</data>
<data name="Queue_Management" xml:space="preserve">
<value>Gestión de cola</value>
</data>
<data name="Radios" xml:space="preserve"> <data name="Radios" xml:space="preserve">
<value>Radios</value> <value>Radios</value>
</data> </data>

View File

@ -117,6 +117,9 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<data name="Clear_Queue" xml:space="preserve">
<value>Effacer la file</value>
</data>
<data name="Database" xml:space="preserve"> <data name="Database" xml:space="preserve">
<value>Base de donnée</value> <value>Base de donnée</value>
</data> </data>
@ -168,6 +171,12 @@
<data name="Operator_IsNot" xml:space="preserve"> <data name="Operator_IsNot" xml:space="preserve">
<value>n'est pas</value> <value>n'est pas</value>
</data> </data>
<data name="Play_Queue" xml:space="preserve">
<value>Jouer la file</value>
</data>
<data name="Queue_Management" xml:space="preserve">
<value>Gestion de file</value>
</data>
<data name="Radios" xml:space="preserve"> <data name="Radios" xml:space="preserve">
<value>Radios</value> <value>Radios</value>
</data> </data>

View File

@ -117,6 +117,9 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<data name="Clear_Queue" xml:space="preserve">
<value>Clear queue</value>
</data>
<data name="Database" xml:space="preserve"> <data name="Database" xml:space="preserve">
<value>Database</value> <value>Database</value>
</data> </data>
@ -168,6 +171,12 @@
<data name="Operator_IsNot" xml:space="preserve"> <data name="Operator_IsNot" xml:space="preserve">
<value>is not</value> <value>is not</value>
</data> </data>
<data name="Play_Queue" xml:space="preserve">
<value>Play queue</value>
</data>
<data name="Queue_Management" xml:space="preserve">
<value>Queue management</value>
</data>
<data name="Radios" xml:space="preserve"> <data name="Radios" xml:space="preserve">
<value>Radios</value> <value>Radios</value>
</data> </data>

View File

@ -2,7 +2,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib" xmlns:sys="clr-namespace:System;assembly=System.Runtime"> xmlns:system="clr-namespace:System;assembly=mscorlib" xmlns:sys="clr-namespace:System;assembly=System.Runtime">
<system:String x:Key="snapcastPath">snapclient_0.26.0-1_win64</system:String> <system:String x:Key="snapcastPath">snapcast_0.31</system:String>
<system:String x:Key="snapcastPort">1704</system:String> <system:String x:Key="snapcastPort">1704</system:String>
<system:String x:Key="playButton">&#xedb4;</system:String> <system:String x:Key="playButton">&#xedb4;</system:String>

View File

@ -257,8 +257,19 @@ namespace unison
snapcast.LaunchOrExit(); snapcast.LaunchOrExit();
} }
private bool _radiosVisible = false;
private bool _shuffleVisible = false;
private bool _settingsVisible = false;
public void Radios_Clicked(object sender, RoutedEventArgs e) public void Radios_Clicked(object sender, RoutedEventArgs e)
{ {
if (_radiosVisible)
{
_radiosVisible = false;
_radiosWin.Hide();
return;
}
_radiosVisible = true;
_radiosWin.Show(); _radiosWin.Show();
_radiosWin.Activate(); _radiosWin.Activate();
@ -268,6 +279,13 @@ namespace unison
public void Shuffle_Clicked(object sender, RoutedEventArgs e) public void Shuffle_Clicked(object sender, RoutedEventArgs e)
{ {
if (_shuffleVisible)
{
_shuffleVisible = false;
_shuffleWin.Hide();
return;
}
_shuffleVisible = true;
_shuffleWin.Show(); _shuffleWin.Show();
_shuffleWin.Activate(); _shuffleWin.Activate();
@ -277,6 +295,13 @@ namespace unison
public void Settings_Clicked(object sender, RoutedEventArgs e) public void Settings_Clicked(object sender, RoutedEventArgs e)
{ {
if (_settingsVisible)
{
_settingsVisible = false;
_settingsWin.Hide();
return;
}
_settingsVisible = true;
_settingsWin.Show(); _settingsWin.Show();
_settingsWin.Activate(); _settingsWin.Activate();

View File

@ -81,7 +81,7 @@
<GroupBox.Header> <GroupBox.Header>
<TextBlock> <TextBlock>
<emoji:EmojiInline Text=""/> <emoji:EmojiInline Text=""/>
<Run Text="{x:Static properties:Resources.Shuffle_Queue}"/> <Run Text="{x:Static properties:Resources.Queue_Management}"/>
</TextBlock> </TextBlock>
</GroupBox.Header> </GroupBox.Header>
<StackPanel Orientation="Vertical" Margin="5,5,5,0"> <StackPanel Orientation="Vertical" Margin="5,5,5,0">
@ -96,6 +96,11 @@
</TextBlock> </TextBlock>
<TextBlock x:Name="SearchStatus2" Text="{x:Static properties:Resources.Shuffle_ButtonMessage3}" Margin="3,3,0,0" FontStyle="Italic" Visibility="Collapsed"/> <TextBlock x:Name="SearchStatus2" Text="{x:Static properties:Resources.Shuffle_ButtonMessage3}" Margin="3,3,0,0" FontStyle="Italic" Visibility="Collapsed"/>
</StackPanel> </StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,15,0,0">
<Button Content="{x:Static properties:Resources.Clear_Queue}" Click="ClearQueue_Clicked" Padding="5, 2" HorizontalAlignment="Left" FocusVisualStyle="{x:Null}"/>
<Button Content="{x:Static properties:Resources.Play_Queue}" Click="StartQueue_Clicked" Padding="5, 2" Margin="5, 0" HorizontalAlignment="Left" FocusVisualStyle="{x:Null}"/>
</StackPanel>
</StackPanel> </StackPanel>
</GroupBox> </GroupBox>

View File

@ -55,7 +55,7 @@ namespace unison
if (token.IsCancellationRequested) if (token.IsCancellationRequested)
return; return;
List<string> Response = await _mpd.SafelySendCommandAsync(new ListCommand(MpdTags.Genre, null, null)); List<string> Response = await _mpd.SafelySendCommandAsync(new ListCommand(MpdTags.Genre, null, null, null));
if (Response == null) if (Response == null)
return; return;
@ -375,6 +375,16 @@ namespace unison
AddToQueue(); AddToQueue();
} }
public void ClearQueue_Clicked(object sender, RoutedEventArgs e)
{
_mpd.ClearQueue();
}
public void StartQueue_Clicked(object sender, RoutedEventArgs e)
{
_mpd.PlayCommand();
}
public bool GetContinuous() public bool GetContinuous()
{ {
return _continuous; return _continuous;

BIN
snapcast_0.31/FLAC.dll Normal file

Binary file not shown.

BIN
snapcast_0.31/opus.dll Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -2,12 +2,12 @@
<PropertyGroup> <PropertyGroup>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework> <TargetFramework>net8.0-windows</TargetFramework>
<UseWPF>true</UseWPF> <UseWPF>true</UseWPF>
<ApplicationIcon>Resources\icon-full.ico</ApplicationIcon> <ApplicationIcon>Resources\icon-full.ico</ApplicationIcon>
<Win32Resource></Win32Resource> <Win32Resource></Win32Resource>
<StartupObject>unison.App</StartupObject> <StartupObject>unison.App</StartupObject>
<Version>1.3.1</Version> <Version>1.4-dev</Version>
<Company /> <Company />
<Authors>Théo Marchal</Authors> <Authors>Théo Marchal</Authors>
<PackageLicenseFile>LICENSE</PackageLicenseFile> <PackageLicenseFile>LICENSE</PackageLicenseFile>
@ -52,11 +52,11 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Autoupdater.NET.Official" Version="1.7.6" /> <PackageReference Include="Autoupdater.NET.Official" Version="1.9.2" />
<PackageReference Include="Emoji.Wpf" Version="0.3.4" /> <PackageReference Include="Emoji.Wpf" Version="0.3.4" />
<PackageReference Include="Hardcodet.NotifyIcon.Wpf" Version="1.1.0" /> <PackageReference Include="Hardcodet.NotifyIcon.Wpf" Version="2.0.1" />
<PackageReference Include="RadioBrowser" Version="0.6.1" /> <PackageReference Include="RadioBrowser" Version="0.7.0" />
<PackageReference Include="MpcNET" Version="1.4.0" /> <PackageReference Include="MpcNET" Version="1.6.6" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@ -90,25 +90,25 @@
<Generator>SettingsSingleFileGenerator</Generator> <Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput> <LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None> </None>
<None Update="snapclient_0.26.0-1_win64\FLAC.dll"> <None Update="snapcast_0.31\FLAC.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
<None Update="snapclient_0.26.0-1_win64\ogg.dll"> <None Update="snapcast_0.31\ogg.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
<None Update="snapclient_0.26.0-1_win64\opus.dll"> <None Update="snapcast_0.31\opus.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
<None Update="snapclient_0.26.0-1_win64\README.txt"> <None Update="snapcast_0.31\README.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
<None Update="snapclient_0.26.0-1_win64\snapclient.exe"> <None Update="snapcast_0.31\snapclient.exe">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
<None Update="snapclient_0.26.0-1_win64\soxr.dll"> <None Update="snapcast_0.31\soxr.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
<None Update="snapclient_0.26.0-1_win64\vorbis.dll"> <None Update="snapcast_0.31\vorbis.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
</ItemGroup> </ItemGroup>