Compare commits
10
Commits
1.4
...
309f42bad1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
309f42bad1 | ||
|
|
8b0d2153b0 | ||
|
|
2082072532 | ||
|
|
f7df25372d | ||
|
|
ff9f92424e | ||
|
|
0c0809c111 | ||
|
|
b32e75f15d | ||
|
|
46b96c0c5d | ||
|
|
0a04e3c6ce | ||
|
|
b5cb6e4c3a |
+1
-1
@@ -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>
|
||||||
|
|||||||
+16
-7
@@ -677,15 +677,24 @@ namespace unison
|
|||||||
if (Response == null)
|
if (Response == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
_stats.Songs = int.Parse(Response["songs"]);
|
if (Response.ContainsKey("songs"))
|
||||||
_stats.Albums = int.Parse(Response["albums"]);
|
_stats.Songs = int.Parse(Response["songs"]);
|
||||||
_stats.Artists = int.Parse(Response["artists"]);
|
if (Response.ContainsKey("albums"))
|
||||||
|
_stats.Albums = int.Parse(Response["albums"]);
|
||||||
|
if (Response.ContainsKey("artists"))
|
||||||
|
_stats.Artists = int.Parse(Response["artists"]);
|
||||||
|
|
||||||
_stats.Uptime = FormatTime(TimeSpan.FromSeconds(int.Parse(Response["uptime"])));
|
if (Response.ContainsKey("uptime"))
|
||||||
_stats.TotalPlaytime = FormatTime(TimeSpan.FromSeconds(int.Parse(Response["db_playtime"])));
|
_stats.Uptime = FormatTime(TimeSpan.FromSeconds(int.Parse(Response["uptime"])));
|
||||||
_stats.TotalTimePlayed = FormatTime(TimeSpan.FromSeconds(int.Parse(Response["playtime"])));
|
if (Response.ContainsKey("db_playtime"))
|
||||||
|
_stats.TotalPlaytime = FormatTime(TimeSpan.FromSeconds(int.Parse(Response["db_playtime"])));
|
||||||
|
if (Response.ContainsKey("playtime"))
|
||||||
|
_stats.TotalTimePlayed = FormatTime(TimeSpan.FromSeconds(int.Parse(Response["playtime"])));
|
||||||
|
|
||||||
|
DateTime date = new DateTime(1970, 1, 1);
|
||||||
|
if (Response.ContainsKey("db_update"))
|
||||||
|
date = date.AddSeconds(int.Parse(Response["db_update"])).ToLocalTime();
|
||||||
|
|
||||||
DateTime date = new DateTime(1970, 1, 1).AddSeconds(int.Parse(Response["db_update"])).ToLocalTime();
|
|
||||||
string dayOfWeek = Resources.Resources.Culture.DateTimeFormat.GetDayName(date.DayOfWeek);
|
string dayOfWeek = Resources.Resources.Culture.DateTimeFormat.GetDayName(date.DayOfWeek);
|
||||||
_stats.DatabaseUpdate = dayOfWeek + " " + date.ToString("dd/MM/yyyy @ HH:mm");
|
_stats.DatabaseUpdate = dayOfWeek + " " + date.ToString("dd/MM/yyyy @ HH:mm");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#define Name "unison"
|
#define Name "unison"
|
||||||
#define Version "1.4"
|
#define Version "1.4"
|
||||||
#define Snapcast "snapclient_0.26.0-1_win64"
|
#define Snapcast "snapcast_0.31"
|
||||||
#define Publisher "Théo Marchal"
|
#define Publisher "Théo Marchal"
|
||||||
#define URL "https://github.com/ZetaKebab/unison"
|
#define URL "https://github.com/ZetaKebab/unison"
|
||||||
#define ExeName "unison.exe"
|
#define ExeName "unison.exe"
|
||||||
|
|||||||
@@ -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:
|
||||||
|
|||||||
Generated
+76
-4
@@ -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.13.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"]));
|
||||||
@@ -289,7 +289,7 @@ namespace unison.Properties {
|
|||||||
|
|
||||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Configuration.DefaultSettingValueAttribute("100")]
|
[global::System.Configuration.DefaultSettingValueAttribute("10")]
|
||||||
public double MainWindowTop {
|
public double MainWindowTop {
|
||||||
get {
|
get {
|
||||||
return ((double)(this["MainWindowTop"]));
|
return ((double)(this["MainWindowTop"]));
|
||||||
@@ -301,7 +301,7 @@ namespace unison.Properties {
|
|||||||
|
|
||||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Configuration.DefaultSettingValueAttribute("100")]
|
[global::System.Configuration.DefaultSettingValueAttribute("10")]
|
||||||
public double MainWindowLeft {
|
public double MainWindowLeft {
|
||||||
get {
|
get {
|
||||||
return ((double)(this["MainWindowLeft"]));
|
return ((double)(this["MainWindowLeft"]));
|
||||||
@@ -310,5 +310,77 @@ namespace unison.Properties {
|
|||||||
this["MainWindowLeft"] = value;
|
this["MainWindowLeft"] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Configuration.DefaultSettingValueAttribute("10")]
|
||||||
|
public double RadiosWindowTop {
|
||||||
|
get {
|
||||||
|
return ((double)(this["RadiosWindowTop"]));
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
this["RadiosWindowTop"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Configuration.DefaultSettingValueAttribute("1000")]
|
||||||
|
public double RadiosWindowLeft {
|
||||||
|
get {
|
||||||
|
return ((double)(this["RadiosWindowLeft"]));
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
this["RadiosWindowLeft"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Configuration.DefaultSettingValueAttribute("10")]
|
||||||
|
public double ShuffleWindowTop {
|
||||||
|
get {
|
||||||
|
return ((double)(this["ShuffleWindowTop"]));
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
this["ShuffleWindowTop"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Configuration.DefaultSettingValueAttribute("330")]
|
||||||
|
public double ShuffleWindowLeft {
|
||||||
|
get {
|
||||||
|
return ((double)(this["ShuffleWindowLeft"]));
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
this["ShuffleWindowLeft"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Configuration.DefaultSettingValueAttribute("330")]
|
||||||
|
public double SettingsWindowTop {
|
||||||
|
get {
|
||||||
|
return ((double)(this["SettingsWindowTop"]));
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
this["SettingsWindowTop"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Configuration.DefaultSettingValueAttribute("600")]
|
||||||
|
public double SettingsWindowLeft {
|
||||||
|
get {
|
||||||
|
return ((double)(this["SettingsWindowLeft"]));
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
this["SettingsWindowLeft"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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>
|
||||||
@@ -69,10 +69,28 @@
|
|||||||
<Value Profile="(Default)">13</Value>
|
<Value Profile="(Default)">13</Value>
|
||||||
</Setting>
|
</Setting>
|
||||||
<Setting Name="MainWindowTop" Type="System.Double" Scope="User">
|
<Setting Name="MainWindowTop" Type="System.Double" Scope="User">
|
||||||
<Value Profile="(Default)">100</Value>
|
<Value Profile="(Default)">10</Value>
|
||||||
</Setting>
|
</Setting>
|
||||||
<Setting Name="MainWindowLeft" Type="System.Double" Scope="User">
|
<Setting Name="MainWindowLeft" Type="System.Double" Scope="User">
|
||||||
<Value Profile="(Default)">100</Value>
|
<Value Profile="(Default)">10</Value>
|
||||||
|
</Setting>
|
||||||
|
<Setting Name="RadiosWindowTop" Type="System.Double" Scope="User">
|
||||||
|
<Value Profile="(Default)">10</Value>
|
||||||
|
</Setting>
|
||||||
|
<Setting Name="RadiosWindowLeft" Type="System.Double" Scope="User">
|
||||||
|
<Value Profile="(Default)">1000</Value>
|
||||||
|
</Setting>
|
||||||
|
<Setting Name="ShuffleWindowTop" Type="System.Double" Scope="User">
|
||||||
|
<Value Profile="(Default)">10</Value>
|
||||||
|
</Setting>
|
||||||
|
<Setting Name="ShuffleWindowLeft" Type="System.Double" Scope="User">
|
||||||
|
<Value Profile="(Default)">330</Value>
|
||||||
|
</Setting>
|
||||||
|
<Setting Name="SettingsWindowTop" Type="System.Double" Scope="User">
|
||||||
|
<Value Profile="(Default)">330</Value>
|
||||||
|
</Setting>
|
||||||
|
<Setting Name="SettingsWindowLeft" Type="System.Double" Scope="User">
|
||||||
|
<Value Profile="(Default)">600</Value>
|
||||||
</Setting>
|
</Setting>
|
||||||
</Settings>
|
</Settings>
|
||||||
</SettingsFile>
|
</SettingsFile>
|
||||||
Generated
+27
@@ -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>
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -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"></system:String>
|
<system:String x:Key="playButton"></system:String>
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</Window.Resources>
|
</Window.Resources>
|
||||||
|
|
||||||
<Grid Background="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}" MinHeight="270" MinWidth="700">
|
<Grid Background="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}" MinHeight="270" MinWidth="700" Margin="0,10,0,0">
|
||||||
<Grid x:Name="TopLayout" Margin="10,0,10,0" VerticalAlignment="Stretch" Width="Auto" Height="Auto">
|
<Grid x:Name="TopLayout" Margin="10,0,10,0" VerticalAlignment="Stretch" Width="Auto" Height="Auto">
|
||||||
<Grid x:Name="Display" HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="225,0,0,0" Height="Auto" Width="Auto">
|
<Grid x:Name="Display" HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="225,0,0,0" Height="Auto" Width="Auto">
|
||||||
<GroupBox Height="220" VerticalAlignment="Center">
|
<GroupBox Height="220" VerticalAlignment="Center">
|
||||||
@@ -114,14 +114,14 @@
|
|||||||
<StackPanel HorizontalAlignment="Left" Orientation="Horizontal" VerticalAlignment="Center" Margin="10,0,0,0">
|
<StackPanel HorizontalAlignment="Left" Orientation="Horizontal" VerticalAlignment="Center" Margin="10,0,0,0">
|
||||||
<Button x:Name="Shuffle" Padding="5, 2" Click="Shuffle_Clicked" Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" FocusVisualStyle="{x:Null}" Margin="0,0,10,0">
|
<Button x:Name="Shuffle" Padding="5, 2" Click="Shuffle_Clicked" Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" FocusVisualStyle="{x:Null}" Margin="0,0,10,0">
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<emoji:TextBlock Text="🔁" Padding="0,0,0,2"/>
|
<TextBlock Text="🔁" Margin="0,0,0,2"/>
|
||||||
<TextBlock Text="{x:Static properties:Resources.Shuffle}" Margin="5, 0, 0, 0"/>
|
<TextBlock Text="{x:Static properties:Resources.Shuffle}" Margin="5, 0, 0, 0"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button x:Name="Radio" Padding="5, 2" HorizontalAlignment="Left" Click="Radios_Clicked" Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" FocusVisualStyle="{x:Null}" IsEnabled="False">
|
<Button x:Name="Radio" Padding="5, 2" HorizontalAlignment="Left" Click="Radios_Clicked" Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" FocusVisualStyle="{x:Null}" IsEnabled="False">
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<emoji:TextBlock Text="📻" Padding="0,0,0,2"/>
|
<TextBlock Text="📻" Padding="0,0,0,2"/>
|
||||||
<TextBlock Text="{x:Static properties:Resources.Radios}" Margin="5, 0, 0, 0"/>
|
<TextBlock Text="{x:Static properties:Resources.Radios}" Margin="5, 0, 0, 0"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Button>
|
</Button>
|
||||||
@@ -139,14 +139,14 @@
|
|||||||
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal" VerticalAlignment="Center" Margin="0,0,10,0">
|
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal" VerticalAlignment="Center" Margin="0,0,10,0">
|
||||||
<Button x:Name="Snapcast" HorizontalAlignment="Left" VerticalAlignment="Center" Click="Snapcast_Clicked" Margin="0,0,10,0" Padding="5, 2" Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" FocusVisualStyle="{x:Null}" IsEnabled="False">
|
<Button x:Name="Snapcast" HorizontalAlignment="Left" VerticalAlignment="Center" Click="Snapcast_Clicked" Margin="0,0,10,0" Padding="5, 2" Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" FocusVisualStyle="{x:Null}" IsEnabled="False">
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<emoji:TextBlock Text="🔊" Padding="0,0,0,2"/>
|
<TextBlock Text="🔊" Padding="0,0,0,2"/>
|
||||||
<TextBlock x:Name="SnapcastText" Text="{x:Static properties:Resources.StartSnapcast}" Margin="5, 0, 0, 0"/>
|
<TextBlock x:Name="SnapcastText" Text="{x:Static properties:Resources.StartSnapcast}" Margin="5, 0, 0, 0"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button x:Name="Settings" Padding="5, 2" Click="Settings_Clicked" Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" FocusVisualStyle="{x:Null}">
|
<Button x:Name="Settings" Padding="5, 2" Click="Settings_Clicked" Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" FocusVisualStyle="{x:Null}">
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<emoji:TextBlock Text="🛠️" Padding="0,0,0,2"/>
|
<TextBlock Text="🛠️" Padding="0,0,0,2"/>
|
||||||
<TextBlock Text="{x:Static properties:Resources.Settings}" Margin="5, 0, 0, 0"/>
|
<TextBlock Text="{x:Static properties:Resources.Settings}" Margin="5, 0, 0, 0"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
+34
-11
@@ -17,17 +17,22 @@ namespace unison
|
|||||||
private readonly Settings _settingsWin;
|
private readonly Settings _settingsWin;
|
||||||
private readonly Radios _radiosWin;
|
private readonly Radios _radiosWin;
|
||||||
private readonly Shuffle _shuffleWin;
|
private readonly Shuffle _shuffleWin;
|
||||||
private readonly DispatcherTimer _timer;
|
|
||||||
private readonly MPDHandler _mpd;
|
|
||||||
|
|
||||||
public Settings GetSettings() => _settingsWin;
|
public Settings GetSettings() => _settingsWin;
|
||||||
|
public Radios GetRadios() => _radiosWin;
|
||||||
|
public Shuffle GetShuffle() => _shuffleWin;
|
||||||
|
|
||||||
|
private readonly DispatcherTimer _timer;
|
||||||
|
private readonly MPDHandler _mpd;
|
||||||
|
|
||||||
public MainWindow()
|
public MainWindow()
|
||||||
{
|
{
|
||||||
InitHwnd();
|
InitHwnd();
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
DefaultState(true);
|
DefaultState(true);
|
||||||
|
|
||||||
WindowState = WindowState.Minimized;
|
WindowState = WindowState.Minimized;
|
||||||
|
|
||||||
Top = Properties.Settings.Default.MainWindowTop;
|
Top = Properties.Settings.Default.MainWindowTop;
|
||||||
Left = Properties.Settings.Default.MainWindowLeft;
|
Left = Properties.Settings.Default.MainWindowLeft;
|
||||||
|
|
||||||
@@ -259,29 +264,47 @@ namespace unison
|
|||||||
|
|
||||||
public void Radios_Clicked(object sender, RoutedEventArgs e)
|
public void Radios_Clicked(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
_radiosWin.Show();
|
|
||||||
_radiosWin.Activate();
|
|
||||||
|
|
||||||
if (_radiosWin.WindowState == WindowState.Minimized)
|
if (_radiosWin.WindowState == WindowState.Minimized)
|
||||||
|
{
|
||||||
|
_radiosWin.Show();
|
||||||
|
_radiosWin.Activate();
|
||||||
_radiosWin.WindowState = WindowState.Normal;
|
_radiosWin.WindowState = WindowState.Normal;
|
||||||
|
}
|
||||||
|
else if (_radiosWin.WindowState == WindowState.Normal)
|
||||||
|
{
|
||||||
|
_radiosWin.Hide();
|
||||||
|
_radiosWin.WindowState = WindowState.Minimized;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Shuffle_Clicked(object sender, RoutedEventArgs e)
|
public void Shuffle_Clicked(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
_shuffleWin.Show();
|
|
||||||
_shuffleWin.Activate();
|
|
||||||
|
|
||||||
if (_shuffleWin.WindowState == WindowState.Minimized)
|
if (_shuffleWin.WindowState == WindowState.Minimized)
|
||||||
|
{
|
||||||
|
_shuffleWin.Show();
|
||||||
|
_shuffleWin.Activate();
|
||||||
_shuffleWin.WindowState = WindowState.Normal;
|
_shuffleWin.WindowState = WindowState.Normal;
|
||||||
|
}
|
||||||
|
else if (_shuffleWin.WindowState == WindowState.Normal)
|
||||||
|
{
|
||||||
|
_shuffleWin.Hide();
|
||||||
|
_shuffleWin.WindowState = WindowState.Minimized;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Settings_Clicked(object sender, RoutedEventArgs e)
|
public void Settings_Clicked(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
_settingsWin.Show();
|
|
||||||
_settingsWin.Activate();
|
|
||||||
|
|
||||||
if (_settingsWin.WindowState == WindowState.Minimized)
|
if (_settingsWin.WindowState == WindowState.Minimized)
|
||||||
|
{
|
||||||
|
_settingsWin.Show();
|
||||||
|
_settingsWin.Activate();
|
||||||
_settingsWin.WindowState = WindowState.Normal;
|
_settingsWin.WindowState = WindowState.Normal;
|
||||||
|
}
|
||||||
|
else if (_settingsWin.WindowState == WindowState.Normal)
|
||||||
|
{
|
||||||
|
_settingsWin.Hide();
|
||||||
|
_settingsWin.WindowState = WindowState.Minimized;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void TimeSlider_DragStarted(object sender, DragStartedEventArgs e)
|
private void TimeSlider_DragStarted(object sender, DragStartedEventArgs e)
|
||||||
|
|||||||
+3
-3
@@ -6,15 +6,15 @@
|
|||||||
xmlns:emoji="clr-namespace:Emoji.Wpf;assembly=Emoji.Wpf"
|
xmlns:emoji="clr-namespace:Emoji.Wpf;assembly=Emoji.Wpf"
|
||||||
xmlns:properties="clr-namespace:unison.Resources"
|
xmlns:properties="clr-namespace:unison.Resources"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="Radios" Closing="Window_Closing" SizeToContent="WidthAndHeight" ResizeMode="NoResize">
|
Title="Radios" Closing="Window_Closing" LocationChanged="Window_LocationChanged" SizeToContent="WidthAndHeight" ResizeMode="NoResize">
|
||||||
|
|
||||||
<Grid>
|
<Grid Margin="0,5,0,0">
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<StackPanel HorizontalAlignment="Left" Orientation="Vertical" Margin="5,0,5,0">
|
<StackPanel HorizontalAlignment="Left" Orientation="Vertical" Margin="5,0,5,0">
|
||||||
<GroupBox DockPanel.Dock="Top" Padding="0,4,0,0">
|
<GroupBox DockPanel.Dock="Top" Padding="0,4,0,0">
|
||||||
<GroupBox.Header>
|
<GroupBox.Header>
|
||||||
<TextBlock>
|
<TextBlock>
|
||||||
<emoji:EmojiInline Text="📻"/>
|
<Run Text="📻"/>
|
||||||
<Run Text="{x:Static properties:Resources.Radio_SearchStation}"/>
|
<Run Text="{x:Static properties:Resources.Radio_SearchStation}"/>
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
</GroupBox.Header>
|
</GroupBox.Header>
|
||||||
|
|||||||
@@ -23,6 +23,12 @@ namespace unison
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
Initialize();
|
Initialize();
|
||||||
|
InitHwnd();
|
||||||
|
|
||||||
|
WindowState = WindowState.Minimized;
|
||||||
|
|
||||||
|
Top = Properties.Settings.Default.RadiosWindowTop;
|
||||||
|
Left = Properties.Settings.Default.RadiosWindowLeft;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async void Initialize()
|
public async void Initialize()
|
||||||
@@ -169,5 +175,12 @@ namespace unison
|
|||||||
WindowInteropHelper helper = new(this);
|
WindowInteropHelper helper = new(this);
|
||||||
helper.EnsureHandle();
|
helper.EnsureHandle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void Window_LocationChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Properties.Settings.Default.RadiosWindowTop = Top;
|
||||||
|
Properties.Settings.Default.RadiosWindowLeft = Left;
|
||||||
|
Properties.Settings.Default.Save();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+10
-10
@@ -6,7 +6,7 @@
|
|||||||
xmlns:emoji="clr-namespace:Emoji.Wpf;assembly=Emoji.Wpf"
|
xmlns:emoji="clr-namespace:Emoji.Wpf;assembly=Emoji.Wpf"
|
||||||
xmlns:properties="clr-namespace:unison.Resources" xmlns:sys="clr-namespace:System;assembly=System.Runtime"
|
xmlns:properties="clr-namespace:unison.Resources" xmlns:sys="clr-namespace:System;assembly=System.Runtime"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Closing="Window_Closing" Title="{x:Static properties:Resources.Settings}" ResizeMode="CanMinimize" Icon="/Resources/icon-full.ico" WindowStyle="ToolWindow" SizeToContent="WidthAndHeight">
|
Title="{x:Static properties:Resources.Settings}" Closing="Window_Closing" LocationChanged="Window_LocationChanged" ResizeMode="CanMinimize" Icon="/Resources/icon-full.ico" WindowStyle="ToolWindow" SizeToContent="WidthAndHeight">
|
||||||
|
|
||||||
<Window.Resources>
|
<Window.Resources>
|
||||||
<x:Array x:Key="ShortcutItems" Type="sys:String">
|
<x:Array x:Key="ShortcutItems" Type="sys:String">
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
<GroupBox DockPanel.Dock="Top" Padding="0,4,0,0">
|
<GroupBox DockPanel.Dock="Top" Padding="0,4,0,0">
|
||||||
<GroupBox.Header>
|
<GroupBox.Header>
|
||||||
<TextBlock>
|
<TextBlock>
|
||||||
<emoji:EmojiInline Text="📶"/>
|
<Run Text="📶"/>
|
||||||
<Run Text="{x:Static properties:Resources.Settings_Connection}"/>
|
<Run Text="{x:Static properties:Resources.Settings_Connection}"/>
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
</GroupBox.Header>
|
</GroupBox.Header>
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
<GroupBox DockPanel.Dock="Top" Padding="0,4,0,0">
|
<GroupBox DockPanel.Dock="Top" Padding="0,4,0,0">
|
||||||
<GroupBox.Header>
|
<GroupBox.Header>
|
||||||
<TextBlock>
|
<TextBlock>
|
||||||
<emoji:EmojiInline Text="⌨️ "/>
|
<Run Text="⌨️"/>
|
||||||
<Run Text="{x:Static properties:Resources.Settings_Shortcuts}"></Run>
|
<Run Text="{x:Static properties:Resources.Settings_Shortcuts}"></Run>
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
</GroupBox.Header>
|
</GroupBox.Header>
|
||||||
@@ -170,7 +170,7 @@
|
|||||||
<DockPanel Margin="8">
|
<DockPanel Margin="8">
|
||||||
<GroupBox DockPanel.Dock="Top" Padding="0,4,0,0">
|
<GroupBox DockPanel.Dock="Top" Padding="0,4,0,0">
|
||||||
<GroupBox.Header>
|
<GroupBox.Header>
|
||||||
<emoji:TextBlock Text="🔊 Snapcast"/>
|
<Run Text="🔊 Snapcast"/>
|
||||||
</GroupBox.Header>
|
</GroupBox.Header>
|
||||||
<Grid VerticalAlignment="Top">
|
<Grid VerticalAlignment="Top">
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
@@ -201,8 +201,8 @@
|
|||||||
<GroupBox DockPanel.Dock="Top" Padding="0,4,0,0">
|
<GroupBox DockPanel.Dock="Top" Padding="0,4,0,0">
|
||||||
<GroupBox.Header>
|
<GroupBox.Header>
|
||||||
<TextBlock>
|
<TextBlock>
|
||||||
<emoji:EmojiInline Text="🔁 "/>
|
<Run Text="🔁"/>
|
||||||
<Run Text="{x:Static properties:Resources.Shuffle}"></Run>
|
<Run Text="{x:Static properties:Resources.Shuffle}"/>
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
</GroupBox.Header>
|
</GroupBox.Header>
|
||||||
<Grid MaxWidth="500">
|
<Grid MaxWidth="500">
|
||||||
@@ -230,7 +230,7 @@
|
|||||||
<GroupBox DockPanel.Dock="Top" Padding="0,4,0,0">
|
<GroupBox DockPanel.Dock="Top" Padding="0,4,0,0">
|
||||||
<GroupBox.Header>
|
<GroupBox.Header>
|
||||||
<TextBlock>
|
<TextBlock>
|
||||||
<emoji:EmojiInline Text="📊"/>
|
<Run Text="📊"/>
|
||||||
<Run Text="{x:Static properties:Resources.Database}"/>
|
<Run Text="{x:Static properties:Resources.Database}"/>
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
</GroupBox.Header>
|
</GroupBox.Header>
|
||||||
@@ -262,7 +262,7 @@
|
|||||||
<DockPanel Margin="8">
|
<DockPanel Margin="8">
|
||||||
<GroupBox DockPanel.Dock="Top" Padding="0,4,0,0">
|
<GroupBox DockPanel.Dock="Top" Padding="0,4,0,0">
|
||||||
<GroupBox.Header>
|
<GroupBox.Header>
|
||||||
<emoji:TextBlock Text="🎶 unison"/>
|
<Run Text="🎶 unison"/>
|
||||||
</GroupBox.Header>
|
</GroupBox.Header>
|
||||||
<Grid VerticalAlignment="Top">
|
<Grid VerticalAlignment="Top">
|
||||||
<StackPanel Orientation="Vertical">
|
<StackPanel Orientation="Vertical">
|
||||||
@@ -281,7 +281,7 @@
|
|||||||
※ <Hyperlink NavigateUri="https://github.com/Difegue/MpcNET" RequestNavigate="Hyperlink_RequestNavigate">MpcNET</Hyperlink><LineBreak/>
|
※ <Hyperlink NavigateUri="https://github.com/Difegue/MpcNET" RequestNavigate="Hyperlink_RequestNavigate">MpcNET</Hyperlink><LineBreak/>
|
||||||
※ <Hyperlink NavigateUri="https://github.com/hardcodet/wpf-notifyicon" RequestNavigate="Hyperlink_RequestNavigate">wpf-notifyicon</Hyperlink><LineBreak/>
|
※ <Hyperlink NavigateUri="https://github.com/hardcodet/wpf-notifyicon" RequestNavigate="Hyperlink_RequestNavigate">wpf-notifyicon</Hyperlink><LineBreak/>
|
||||||
※ <Hyperlink NavigateUri="https://github.com/samhocevar/emoji.wpf" RequestNavigate="Hyperlink_RequestNavigate">Emoji.WPF</Hyperlink><LineBreak/>
|
※ <Hyperlink NavigateUri="https://github.com/samhocevar/emoji.wpf" RequestNavigate="Hyperlink_RequestNavigate">Emoji.WPF</Hyperlink><LineBreak/>
|
||||||
※ <Hyperlink NavigateUri="https://github.com/tof4/RadioBrowser" RequestNavigate="Hyperlink_RequestNavigate">RadioBrowser</Hyperlink><LineBreak/>
|
※ <Hyperlink NavigateUri="https://git.sr.ht/~youkai/RadioBrowser.NET" RequestNavigate="Hyperlink_RequestNavigate">RadioBrowser</Hyperlink><LineBreak/>
|
||||||
※ <Hyperlink NavigateUri="https://github.com/ravibpatel/AutoUpdater.NET" RequestNavigate="Hyperlink_RequestNavigate">AutoUpdater.NET</Hyperlink><LineBreak/>
|
※ <Hyperlink NavigateUri="https://github.com/ravibpatel/AutoUpdater.NET" RequestNavigate="Hyperlink_RequestNavigate">AutoUpdater.NET</Hyperlink><LineBreak/>
|
||||||
※ <Hyperlink NavigateUri="https://github.com/badaix/snapcast" RequestNavigate="Hyperlink_RequestNavigate">Snapcast</Hyperlink>
|
※ <Hyperlink NavigateUri="https://github.com/badaix/snapcast" RequestNavigate="Hyperlink_RequestNavigate">Snapcast</Hyperlink>
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
@@ -308,7 +308,7 @@
|
|||||||
<GroupBox DockPanel.Dock="Top" Padding="0,4,0,0" Margin="0,10,0,0">
|
<GroupBox DockPanel.Dock="Top" Padding="0,4,0,0" Margin="0,10,0,0">
|
||||||
<GroupBox.Header>
|
<GroupBox.Header>
|
||||||
<TextBlock>
|
<TextBlock>
|
||||||
<emoji:EmojiInline Text="📝 "/>
|
<Run Text="📝"/>
|
||||||
<Run Text="{x:Static properties:Resources.Settings_License}" />
|
<Run Text="{x:Static properties:Resources.Settings_License}" />
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
</GroupBox.Header>
|
</GroupBox.Header>
|
||||||
|
|||||||
+10
-1
@@ -45,11 +45,13 @@ namespace unison
|
|||||||
{
|
{
|
||||||
InitHwnd();
|
InitHwnd();
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
Initialize();
|
||||||
DataContext = this;
|
DataContext = this;
|
||||||
|
|
||||||
WindowState = WindowState.Minimized;
|
WindowState = WindowState.Minimized;
|
||||||
|
|
||||||
Initialize();
|
Top = Properties.Settings.Default.SettingsWindowTop;
|
||||||
|
Left = Properties.Settings.Default.SettingsWindowLeft;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Initialize()
|
void Initialize()
|
||||||
@@ -207,6 +209,13 @@ namespace unison
|
|||||||
helper.EnsureHandle();
|
helper.EnsureHandle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void Window_LocationChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Properties.Settings.Default.SettingsWindowTop = Top;
|
||||||
|
Properties.Settings.Default.SettingsWindowLeft = Left;
|
||||||
|
Properties.Settings.Default.Save();
|
||||||
|
}
|
||||||
|
|
||||||
public void SaveSettings()
|
public void SaveSettings()
|
||||||
{
|
{
|
||||||
Properties.Settings.Default.mpd_host = MpdHost.Text;
|
Properties.Settings.Default.mpd_host = MpdHost.Text;
|
||||||
|
|||||||
+11
-6
@@ -6,7 +6,7 @@
|
|||||||
xmlns:emoji="clr-namespace:Emoji.Wpf;assembly=Emoji.Wpf"
|
xmlns:emoji="clr-namespace:Emoji.Wpf;assembly=Emoji.Wpf"
|
||||||
xmlns:properties="clr-namespace:unison.Resources" xmlns:sys="clr-namespace:System;assembly=System.Runtime"
|
xmlns:properties="clr-namespace:unison.Resources" xmlns:sys="clr-namespace:System;assembly=System.Runtime"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="Shuffle" Closing="Window_Closing" SizeToContent="WidthAndHeight" ResizeMode="NoResize">
|
Title="Shuffle" Closing="Window_Closing" LocationChanged="Window_LocationChanged" SizeToContent="WidthAndHeight" ResizeMode="NoResize">
|
||||||
|
|
||||||
<Window.Resources>
|
<Window.Resources>
|
||||||
<x:Array x:Key="FilterType" Type="sys:String">
|
<x:Array x:Key="FilterType" Type="sys:String">
|
||||||
@@ -42,13 +42,13 @@
|
|||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</Window.Resources>
|
</Window.Resources>
|
||||||
|
|
||||||
<Grid>
|
<Grid Margin="0,5,0,0">
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<StackPanel HorizontalAlignment="Left" Orientation="Vertical" Margin="5,0,5,5">
|
<StackPanel HorizontalAlignment="Left" Orientation="Vertical" Margin="5,0,5,5">
|
||||||
<GroupBox DockPanel.Dock="Top" Padding="0,4,0,0">
|
<GroupBox DockPanel.Dock="Top" Padding="0,4,0,0">
|
||||||
<GroupBox.Header>
|
<GroupBox.Header>
|
||||||
<TextBlock>
|
<TextBlock>
|
||||||
<emoji:EmojiInline Text="🔡"/>
|
<Run Text="🔡"/>
|
||||||
<Run Text="{x:Static properties:Resources.Shuffle_Filter}"/>
|
<Run Text="{x:Static properties:Resources.Shuffle_Filter}"/>
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
</GroupBox.Header>
|
</GroupBox.Header>
|
||||||
@@ -80,8 +80,8 @@
|
|||||||
<GroupBox DockPanel.Dock="Right" Padding="0,4,0,0" Width="300">
|
<GroupBox DockPanel.Dock="Right" Padding="0,4,0,0" Width="300">
|
||||||
<GroupBox.Header>
|
<GroupBox.Header>
|
||||||
<TextBlock>
|
<TextBlock>
|
||||||
<emoji:EmojiInline Text="➕"/>
|
<Run 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,13 +96,18 @@
|
|||||||
</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>
|
||||||
|
|
||||||
<GroupBox DockPanel.Dock="Left" Padding="0,4,0,0" Width="260" Margin="0,0,5,0">
|
<GroupBox DockPanel.Dock="Left" Padding="0,4,0,0" Width="260" Margin="0,0,5,0">
|
||||||
<GroupBox.Header>
|
<GroupBox.Header>
|
||||||
<TextBlock>
|
<TextBlock>
|
||||||
<emoji:EmojiInline Text="♾️"/>
|
<Run Text="♾️"/>
|
||||||
<Run Text="{x:Static properties:Resources.Shuffle_Continuous}"/>
|
<Run Text="{x:Static properties:Resources.Shuffle_Continuous}"/>
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
</GroupBox.Header>
|
</GroupBox.Header>
|
||||||
|
|||||||
+25
-1
@@ -32,11 +32,18 @@ namespace unison
|
|||||||
public Shuffle()
|
public Shuffle()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
InitHwnd();
|
||||||
|
|
||||||
GenreList = new();
|
GenreList = new();
|
||||||
FolderList = new();
|
FolderList = new();
|
||||||
Filters = new();
|
Filters = new();
|
||||||
SongFilterNumber.Text = "0";
|
SongFilterNumber.Text = "0";
|
||||||
|
|
||||||
|
WindowState = WindowState.Minimized;
|
||||||
|
|
||||||
|
Top = Properties.Settings.Default.ShuffleWindowTop;
|
||||||
|
Left = Properties.Settings.Default.ShuffleWindowLeft;
|
||||||
|
|
||||||
_mpd = (MPDHandler)Application.Current.Properties["mpd"];
|
_mpd = (MPDHandler)Application.Current.Properties["mpd"];
|
||||||
_shuffle = (ShuffleHandler)Application.Current.Properties["shuffle"];
|
_shuffle = (ShuffleHandler)Application.Current.Properties["shuffle"];
|
||||||
}
|
}
|
||||||
@@ -55,7 +62,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 +382,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;
|
||||||
@@ -418,5 +435,12 @@ namespace unison
|
|||||||
WindowInteropHelper helper = new(this);
|
WindowInteropHelper helper = new(this);
|
||||||
helper.EnsureHandle();
|
helper.EnsureHandle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void Window_LocationChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Properties.Settings.Default.ShuffleWindowTop = Top;
|
||||||
|
Properties.Settings.Default.ShuffleWindowLeft = Left;
|
||||||
|
Properties.Settings.Default.Save();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3,6 +3,7 @@ using System.Windows.Input;
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
|
|
||||||
namespace unison
|
namespace unison
|
||||||
{
|
{
|
||||||
@@ -32,7 +33,7 @@ namespace unison
|
|||||||
CanExecuteFunc = () => true
|
CanExecuteFunc = () => true
|
||||||
};
|
};
|
||||||
|
|
||||||
public static string SnapcastText
|
public string SnapcastText
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
@@ -49,7 +50,7 @@ namespace unison
|
|||||||
{
|
{
|
||||||
CommandAction = () =>
|
CommandAction = () =>
|
||||||
{
|
{
|
||||||
Application.Current.Dispatcher.BeginInvoke(new Action(() => OnPropertyChanged("SnapcastText")));
|
Application.Current.Dispatcher.BeginInvoke(new Action(() => OnPropertyChanged(SnapcastText)));
|
||||||
|
|
||||||
SnapcastHandler snapcast = (SnapcastHandler)Application.Current.Properties["snapcast"];
|
SnapcastHandler snapcast = (SnapcastHandler)Application.Current.Properties["snapcast"];
|
||||||
snapcast.LaunchOrExit();
|
snapcast.LaunchOrExit();
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+13
-13
@@ -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.4</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>
|
||||||
|
|||||||
Reference in New Issue
Block a user