diff --git a/README.md b/README.md index 2bfc1ae9..5ed36427 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,8 @@ Stylophone =========== -[**Music Player Daemon**](https://www.musicpd.org/) Client for UWP. -Based on [MpcNET](https://github.com/petrkr/MpcNET), the original .NET Client Library for MPD. +[**Music Player Daemon**](https://www.musicpd.org/) Client for UWP. +Based on [MpcNET](https://github.com/Difegue/MpcNET), my own fork of the original .NET Client Library for MPD. (now on NuGet!) English badge diff --git a/Sources/MpcNET.Test/LibMpcTest.cs b/Sources/MpcNET.Test/LibMpcTest.cs deleted file mode 100644 index ad4b9418..00000000 --- a/Sources/MpcNET.Test/LibMpcTest.cs +++ /dev/null @@ -1,62 +0,0 @@ -namespace MpcNET.Test -{ - using System.Collections.Generic; - using System.Linq; - using System.Threading.Tasks; - using Microsoft.VisualStudio.TestTools.UnitTesting; - - [TestClass] - public partial class LibMpcTest - { - private static MpdMock _mpdMock; - - [ClassInitialize] - public static void Init(TestContext context) - { - _mpdMock = new MpdMock(); - _mpdMock.Start(); - - Mpc = new MpcMock().Client; - } - - [ClassCleanup] - public static void Cleanup() - { - _mpdMock.Dispose(); - } - - internal static MpcConnection Mpc { get; private set; } - - private static async Task SendCommand(string command) - { - var response = await Mpc.SendAsync(new PassthroughCommand(command)); - TestOutput.WriteLine(response); - } - private static async Task SendCommand(IMpcCommand command) - { - var response = await Mpc.SendAsync(command); - TestOutput.WriteLine(response); - } - - private class PassthroughCommand : IMpcCommand> - { - private readonly string command; - - public PassthroughCommand(string command) - { - this.command = command; - } - - public string Serialize() - { - return this.command; - } - - public IList Deserialize(SerializedResponse response) - { - var result = response.ResponseValues.Select(atrb => $"{atrb.Key}: {atrb.Value}").ToList(); - return result; - } - } - } -} diff --git a/Sources/MpcNET.Test/MpcMock.cs b/Sources/MpcNET.Test/MpcMock.cs deleted file mode 100644 index 59e8c55e..00000000 --- a/Sources/MpcNET.Test/MpcMock.cs +++ /dev/null @@ -1,26 +0,0 @@ -namespace MpcNET.Test -{ - using System; - using System.Net; - using System.Threading.Tasks; - - public class MpcMock : IDisposable - { - public MpcMock() - { - var mpdEndpoint = new IPEndPoint(IPAddress.Loopback, 6600); - this.Client = new MpcConnection(mpdEndpoint); - - Task.Run(async () => await this.Client.ConnectAsync()).Wait(); - TestOutput.WriteLine($"Connected to MPD Version: {this.Client.Version}"); - } - - public MpcConnection Client { get; } - - public void Dispose() - { - this.Client?.DisconnectAsync().GetAwaiter().GetResult(); - TestOutput.WriteLine($"Disconnected from MPD."); - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET.Test/MpcNET.Test.csproj b/Sources/MpcNET.Test/MpcNET.Test.csproj deleted file mode 100644 index 59e3dd9d..00000000 --- a/Sources/MpcNET.Test/MpcNET.Test.csproj +++ /dev/null @@ -1,40 +0,0 @@ - - - - net5.0 - MpcNET.Test - MpcNET.Test - true - false - false - false - MpcNET.Test - False - True - - - - - - - - - PreserveNewest - - - - - - - - - - - - - - - - - - diff --git a/Sources/MpcNET.Test/MpdConf.cs b/Sources/MpcNET.Test/MpdConf.cs deleted file mode 100644 index c3d1596f..00000000 --- a/Sources/MpcNET.Test/MpdConf.cs +++ /dev/null @@ -1,57 +0,0 @@ -namespace MpcNET.Test -{ - using System.IO; - using System.Text; - - public class MpdConf - { - private const string MPD_CONF_FILE = "mpd.conf"; - private const string MPD_LOG_FILE = "mpd_log.txt"; - private const string MPD_DB_FILE = "mpd.db"; - - public static void Create(string rootDirectory) - { - File.Create(Path.Combine(rootDirectory, MPD_LOG_FILE)).Dispose(); - - CreateConfFile(rootDirectory); - } - - private static void CreateConfFile(string rootDirectory) - { - var builder = new StringBuilder(); - - builder.AppendLine($"log_file \"{Path.Combine(rootDirectory, MPD_LOG_FILE).Replace("\\", "\\\\")}\""); - builder.AppendLine($"db_file \"{Path.Combine(rootDirectory, MPD_DB_FILE).Replace("\\", "\\\\")}\""); - builder.AppendLine("bind_to_address \"any\""); - builder.AppendLine($"music_directory \"{Path.Combine(rootDirectory, "Music").Replace("\\", "\\\\")}\""); - builder.AppendLine($"playlist_directory \"{Path.Combine(rootDirectory, "Playlists").Replace("\\", "\\\\")}\""); - builder.AppendLine("port \"6600\""); - builder.AppendLine("audio_output {"); - builder.AppendLine("type \"null\""); - builder.AppendLine("name \"Enabled output to be disabled\""); - builder.AppendLine("enabled \"true\""); - builder.AppendLine("mixer_type \"none\""); - builder.AppendLine("}"); - builder.AppendLine("audio_output {"); - builder.AppendLine("type \"null\""); - builder.AppendLine("name \"Disabled output to be enabled\""); - builder.AppendLine("enabled \"false\""); - builder.AppendLine("mixer_type \"none\""); - builder.AppendLine("}"); - builder.AppendLine("audio_output {"); - builder.AppendLine("type \"null\""); - builder.AppendLine("name \"Enabled output to be toggled\""); - builder.AppendLine("enabled \"true\""); - builder.AppendLine("mixer_type \"none\""); - builder.AppendLine("}"); - - var mpdConfContent = builder.ToString(); - - using (var file = File.CreateText(Path.Combine(rootDirectory, MPD_CONF_FILE))) - { - file.Write(mpdConfContent); - file.Flush(); - } - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET.Test/MpdMock.cs b/Sources/MpcNET.Test/MpdMock.cs deleted file mode 100644 index 49928e1a..00000000 --- a/Sources/MpcNET.Test/MpdMock.cs +++ /dev/null @@ -1,119 +0,0 @@ -namespace MpcNET.Test -{ - using System; - using System.Diagnostics; - using System.IO; - using System.Runtime.InteropServices; - - public class MpdMock : IDisposable - { - public void Start() - { - if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) - { - this.SendCommand("/usr/bin/pkill mpd"); - } - - MpdConf.Create(Path.Combine(AppContext.BaseDirectory, "Server")); - - var server = this.GetServer(); - - this.Process = new Process - { - StartInfo = new ProcessStartInfo - { - FileName = server.FileName, - WorkingDirectory = server.WorkingDirectory, - Arguments = server.Arguments, - UseShellExecute = false, - RedirectStandardOutput = true, - RedirectStandardError = true, - CreateNoWindow = true, - } - }; - - TestOutput.WriteLine($"Starting Server: {this.Process.StartInfo.FileName} {this.Process.StartInfo.Arguments}"); - - this.Process.Start(); - TestOutput.WriteLine($"Output: {this.Process.StandardOutput.ReadToEnd()}"); - TestOutput.WriteLine($"Error: {this.Process.StandardError.ReadToEnd()}"); - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) - { - this.SendCommand("/bin/netstat -ntpl"); - } - } - - public Process Process { get; private set; } - - private Server GetServer() - { - if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) - { - return Server.Linux; - } - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - return Server.Windows; - } - - throw new NotSupportedException("OS not supported"); - } - - private void SendCommand(string command) - { - var netcat = new Process - { - StartInfo = new ProcessStartInfo - { - FileName = "/bin/bash", - WorkingDirectory = "/bin/", - Arguments = $"-c \"sudo {command}\"", - UseShellExecute = false, - RedirectStandardOutput = true, - RedirectStandardError = true, - CreateNoWindow = true, - } - }; - - netcat.Start(); - netcat.WaitForExit(); - - TestOutput.WriteLine(command); - TestOutput.WriteLine($"Output: {netcat.StandardOutput.ReadToEnd()}"); - TestOutput.WriteLine($"Error: {netcat.StandardError.ReadToEnd()}"); - } - - public void Dispose() - { - this.Process?.Kill(); - this.Process?.Dispose(); - TestOutput.WriteLine("Server Stopped."); - } - - private class Server - { - public static Server Linux = new Server( - fileName: "/bin/bash", - workingDirectory: "/bin/", - arguments: $"-c \"sudo /usr/bin/mpd {Path.Combine(AppContext.BaseDirectory, "Server", "mpd.conf")} -v\""); - - public static Server Windows = new Server( - fileName: Path.Combine(AppContext.BaseDirectory, "Server", "mpd.exe"), - workingDirectory: Path.Combine(AppContext.BaseDirectory, "Server"), - arguments: $"{Path.Combine(AppContext.BaseDirectory, "Server", "mpd.conf")} -v"); - - private Server(string fileName, string workingDirectory, string arguments) - { - this.FileName = fileName; - this.WorkingDirectory = workingDirectory; - this.Arguments = arguments; - } - - public string FileName { get; } - public string WorkingDirectory { get; } - public string Arguments { get; } - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET.Test/Properties/AssemblyInfo.cs b/Sources/MpcNET.Test/Properties/AssemblyInfo.cs deleted file mode 100644 index 2dfaba7c..00000000 --- a/Sources/MpcNET.Test/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.Reflection; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("LibMpcTest")] -[assembly: AssemblyTrademark("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("69f1d68f-9cd5-4ea6-9b47-2a7a9bf8ced9")] diff --git a/Sources/MpcNET.Test/Server/Music/A long name directory with some spaces/Ghost-Sounds.mp3 b/Sources/MpcNET.Test/Server/Music/A long name directory with some spaces/Ghost-Sounds.mp3 deleted file mode 100644 index ae0a0482..00000000 Binary files a/Sources/MpcNET.Test/Server/Music/A long name directory with some spaces/Ghost-Sounds.mp3 and /dev/null differ diff --git a/Sources/MpcNET.Test/Server/Music/A long name directory with some spaces/Sub Directory Two/short-trouser-pants-zip-closing.mp3 b/Sources/MpcNET.Test/Server/Music/A long name directory with some spaces/Sub Directory Two/short-trouser-pants-zip-closing.mp3 deleted file mode 100644 index 22c42906..00000000 Binary files a/Sources/MpcNET.Test/Server/Music/A long name directory with some spaces/Sub Directory Two/short-trouser-pants-zip-closing.mp3 and /dev/null differ diff --git a/Sources/MpcNET.Test/Server/Music/A long name directory with some spaces/Sub Directory Two/starting-engine-Ford-Mondeo-Mk-3-diesel.mp3 b/Sources/MpcNET.Test/Server/Music/A long name directory with some spaces/Sub Directory Two/starting-engine-Ford-Mondeo-Mk-3-diesel.mp3 deleted file mode 100644 index d287fb04..00000000 Binary files a/Sources/MpcNET.Test/Server/Music/A long name directory with some spaces/Sub Directory Two/starting-engine-Ford-Mondeo-Mk-3-diesel.mp3 and /dev/null differ diff --git a/Sources/MpcNET.Test/Server/Music/A long name directory with some spaces/pouring-water-into-mug-of-coffee.mp3 b/Sources/MpcNET.Test/Server/Music/A long name directory with some spaces/pouring-water-into-mug-of-coffee.mp3 deleted file mode 100644 index 501b9658..00000000 Binary files a/Sources/MpcNET.Test/Server/Music/A long name directory with some spaces/pouring-water-into-mug-of-coffee.mp3 and /dev/null differ diff --git a/Sources/MpcNET.Test/Server/Music/Directory With Spaces/SubDirectory One/central-locking-Ford-Mondeo-Mk-3.mp3 b/Sources/MpcNET.Test/Server/Music/Directory With Spaces/SubDirectory One/central-locking-Ford-Mondeo-Mk-3.mp3 deleted file mode 100644 index 3150a26b..00000000 Binary files a/Sources/MpcNET.Test/Server/Music/Directory With Spaces/SubDirectory One/central-locking-Ford-Mondeo-Mk-3.mp3 and /dev/null differ diff --git a/Sources/MpcNET.Test/Server/Music/Directory With Spaces/coin-spin-light.mp3 b/Sources/MpcNET.Test/Server/Music/Directory With Spaces/coin-spin-light.mp3 deleted file mode 100644 index 24e46204..00000000 Binary files a/Sources/MpcNET.Test/Server/Music/Directory With Spaces/coin-spin-light.mp3 and /dev/null differ diff --git a/Sources/MpcNET.Test/Server/Music/Directory With Spaces/finger-snap-click.mp3 b/Sources/MpcNET.Test/Server/Music/Directory With Spaces/finger-snap-click.mp3 deleted file mode 100644 index 849b21f5..00000000 Binary files a/Sources/MpcNET.Test/Server/Music/Directory With Spaces/finger-snap-click.mp3 and /dev/null differ diff --git a/Sources/MpcNET.Test/Server/Music/Directory/2-Kids-Laughing.mp3 b/Sources/MpcNET.Test/Server/Music/Directory/2-Kids-Laughing.mp3 deleted file mode 100644 index bec3f832..00000000 Binary files a/Sources/MpcNET.Test/Server/Music/Directory/2-Kids-Laughing.mp3 and /dev/null differ diff --git a/Sources/MpcNET.Test/Server/Music/Directory/ambient-noise-server-room.mp3 b/Sources/MpcNET.Test/Server/Music/Directory/ambient-noise-server-room.mp3 deleted file mode 100644 index 5d74a105..00000000 Binary files a/Sources/MpcNET.Test/Server/Music/Directory/ambient-noise-server-room.mp3 and /dev/null differ diff --git a/Sources/MpcNET.Test/Server/Music/_My Directory/gas-fire-lighting.mp3 b/Sources/MpcNET.Test/Server/Music/_My Directory/gas-fire-lighting.mp3 deleted file mode 100644 index d37ac0b3..00000000 Binary files a/Sources/MpcNET.Test/Server/Music/_My Directory/gas-fire-lighting.mp3 and /dev/null differ diff --git a/Sources/MpcNET.Test/Server/Music/teaspoon-stirring-mug-of-coffee.mp3 b/Sources/MpcNET.Test/Server/Music/teaspoon-stirring-mug-of-coffee.mp3 deleted file mode 100644 index 9c3abb03..00000000 Binary files a/Sources/MpcNET.Test/Server/Music/teaspoon-stirring-mug-of-coffee.mp3 and /dev/null differ diff --git a/Sources/MpcNET.Test/Server/Music/whistle-kettle-boiling.mp3 b/Sources/MpcNET.Test/Server/Music/whistle-kettle-boiling.mp3 deleted file mode 100644 index 339eb997..00000000 Binary files a/Sources/MpcNET.Test/Server/Music/whistle-kettle-boiling.mp3 and /dev/null differ diff --git a/Sources/MpcNET.Test/Server/Music/wine-glass-double-chink-clink-cheers.mp3 b/Sources/MpcNET.Test/Server/Music/wine-glass-double-chink-clink-cheers.mp3 deleted file mode 100644 index dc0ed1c4..00000000 Binary files a/Sources/MpcNET.Test/Server/Music/wine-glass-double-chink-clink-cheers.mp3 and /dev/null differ diff --git a/Sources/MpcNET.Test/Server/OpenAL32.dll b/Sources/MpcNET.Test/Server/OpenAL32.dll deleted file mode 100644 index b6b3f868..00000000 Binary files a/Sources/MpcNET.Test/Server/OpenAL32.dll and /dev/null differ diff --git a/Sources/MpcNET.Test/Server/Playlists/Playlist One.m3u b/Sources/MpcNET.Test/Server/Playlists/Playlist One.m3u deleted file mode 100644 index 5ad049f0..00000000 --- a/Sources/MpcNET.Test/Server/Playlists/Playlist One.m3u +++ /dev/null @@ -1,5 +0,0 @@ -teaspoon-stirring-mug-of-coffee.mp3 -whistle-kettle-boiling.mp3 -wine-glass-double-chink-clink-cheers.mp3 -Directory With Spaces/coin-spin-light.mp3 -Directory With Spaces/finger-snap-click.mp3 diff --git a/Sources/MpcNET.Test/Server/Playlists/Playlist Two.m3u b/Sources/MpcNET.Test/Server/Playlists/Playlist Two.m3u deleted file mode 100644 index c2b2a42b..00000000 --- a/Sources/MpcNET.Test/Server/Playlists/Playlist Two.m3u +++ /dev/null @@ -1,3 +0,0 @@ -A long name directory with some spaces/pouring-water-into-mug-of-coffee.mp3 -A long name directory with some spaces/Sub Directory Two/short-trouser-pants-zip-closing.mp3 -Directory/2-Kids-Laughing.mp3 diff --git a/Sources/MpcNET.Test/Server/Playlists/_My Playlist.m3u b/Sources/MpcNET.Test/Server/Playlists/_My Playlist.m3u deleted file mode 100644 index f31465e2..00000000 --- a/Sources/MpcNET.Test/Server/Playlists/_My Playlist.m3u +++ /dev/null @@ -1,5 +0,0 @@ -A long name directory with some spaces/Ghost-Sounds.mp3 -Directory/ambient-noise-server-room.mp3 -Directory With Spaces/SubDirectory One/central-locking-Ford-Mondeo-Mk-3.mp3 -_My Directory/gas-fire-lighting.mp3 -A long name directory with some spaces/Sub Directory Two/starting-engine-Ford-Mondeo-Mk-3-diesel.mp3 diff --git a/Sources/MpcNET.Test/Server/StartLocal.bat b/Sources/MpcNET.Test/Server/StartLocal.bat deleted file mode 100644 index fad9d33d..00000000 --- a/Sources/MpcNET.Test/Server/StartLocal.bat +++ /dev/null @@ -1 +0,0 @@ -mpd.exe mpd.conf -v \ No newline at end of file diff --git a/Sources/MpcNET.Test/Server/mpd.conf b/Sources/MpcNET.Test/Server/mpd.conf deleted file mode 100644 index 562c229c..00000000 --- a/Sources/MpcNET.Test/Server/mpd.conf +++ /dev/null @@ -1,30 +0,0 @@ -log_file "mpd_log.txt" - -db_file "mpd.db" - -bind_to_address "any" - -music_directory "Music" - -playlist_directory "Playlists" - -port "6600" - -audio_output { - type "null" - name "Enabled output to be disabled" - enabled "true" - mixer_type "none" -} -audio_output { - type "null" - name "Disabled output to be enabled" - enabled "false" - mixer_type "none" -} -audio_output { - type "null" - name "Enabled output to be toggled" - enabled "true" - mixer_type "none" -} diff --git a/Sources/MpcNET.Test/Server/mpd.db b/Sources/MpcNET.Test/Server/mpd.db deleted file mode 100644 index 98286de0..00000000 --- a/Sources/MpcNET.Test/Server/mpd.db +++ /dev/null @@ -1,163 +0,0 @@ -info_begin -format: 1 -mpd_version: 0.17.4 -fs_charset: cp1252 -tag: Artist -tag: ArtistSort -tag: Album -tag: AlbumArtist -tag: AlbumArtistSort -tag: Title -tag: Track -tag: Name -tag: Genre -tag: Date -tag: Composer -tag: Performer -tag: Disc -tag: MUSICBRAINZ_ARTISTID -tag: MUSICBRAINZ_ALBUMID -tag: MUSICBRAINZ_ALBUMARTISTID -tag: MUSICBRAINZ_TRACKID -info_end -directory: A long name directory with some spaces -mtime: 1482142041 -begin: A long name directory with some spaces -directory: Sub Directory Two -mtime: 1482142041 -begin: A long name directory with some spaces/Sub Directory Two -song_begin: short-trouser-pants-zip-closing.mp3 -Time: 1 -Artist: Geek & Dummy -Title: Sound effect: short trouser pants zip closing -Date: 2013 -Date: 2013 -mtime: 1481623577 -song_end -song_begin: starting-engine-Ford-Mondeo-Mk-3-diesel.mp3 -Time: 6 -Artist: Geek & Dummy -Title: Sound effect: starting engine - Ford Mondeo Mk 3 diesel -Album: Geek & Dummy Sound Library -Date: 2014 -Genre: soundfx -mtime: 1481623577 -song_end -end: A long name directory with some spaces/Sub Directory Two -song_begin: pouring-water-into-mug-of-coffee.mp3 -Time: 4 -Artist: Geek & Dummy -Title: Sound effect: pouring water into mug of coffee -Date: 2013 -Date: 2013 -mtime: 1481623577 -song_end -song_begin: Ghost-Sounds.mp3 -Time: 95 -Artist: Geek & Dummy -Title: Sound effect: ghostly haunted house (bells, ghostly laughs & knives sharpened) -Album: Geek & Dummy Sound Library -Date: 2014 -Date: 2014 -Genre: soundfx -mtime: 1481623577 -song_end -end: A long name directory with some spaces -directory: Directory -mtime: 1482142041 -begin: Directory -song_begin: 2-Kids-Laughing.mp3 -Time: 30 -Artist: Geek & Dummy -Title: Sound effect: two kids laughing -Album: Geek & Dummy Sound Library -Date: 2014 -Date: 2014 -Genre: soundfx -mtime: 1481623577 -song_end -song_begin: ambient-noise-server-room.mp3 -Time: 71 -Artist: Geek & Dummy -Title: Sound effect: ambient noise - server room -Album: Geek & Dummy Sound Library -Date: 2014 -Date: 2014 -Genre: soundfx -mtime: 1481623577 -song_end -end: Directory -directory: Directory With Spaces -mtime: 1482142041 -begin: Directory With Spaces -directory: SubDirectory One -mtime: 1482142041 -begin: Directory With Spaces/SubDirectory One -song_begin: central-locking-Ford-Mondeo-Mk-3.mp3 -Time: 5 -Artist: Geek & Dummy -Title: Sound effect: central locking - Ford Mondeo Mk 3 -Album: Geek & Dummy Sound Library -Date: 2014 -Date: 2014 -Genre: soundfx -mtime: 1481623577 -song_end -end: Directory With Spaces/SubDirectory One -song_begin: coin-spin-light.mp3 -Time: 5 -Artist: Geek & Dummy -Title: Sound effect: coin spin (light coin) -Date: 2013 -Date: 2013 -mtime: 1481623577 -song_end -song_begin: finger-snap-click.mp3 -Time: 0 -Artist: Geek & Dummy -Title: Sound effect: finger snap/click -Album: Geek & Dummy Sound Library -Date: 2014 -Date: 2014 -Genre: soundfx -mtime: 1481623577 -song_end -end: Directory With Spaces -directory: _My Directory -mtime: 1482142041 -begin: _My Directory -song_begin: gas-fire-lighting.mp3 -Time: 58 -Artist: Geek & Dummy -Title: Sound effect: gas fire lighting and warming up -Album: Geek & Dummy Sound Library -Date: 2014 -Date: 2014 -Genre: soundfx -mtime: 1481623577 -song_end -end: _My Directory -song_begin: teaspoon-stirring-mug-of-coffee.mp3 -Time: 4 -Artist: Geek & Dummy -Title: Sound effect: teaspoon stirring mug of coffee -Date: 2013 -Date: 2013 -mtime: 1481623577 -song_end -song_begin: whistle-kettle-boiling.mp3 -Time: 36 -Artist: Geek & Dummy -Title: Sound effect: whistle kettle boiling -Date: 2013 -Date: 2013 -mtime: 1481623577 -song_end -song_begin: wine-glass-double-chink-clink-cheers.mp3 -Time: 1 -Artist: Geek & Dummy -Title: Sound effect: wine glass double chink/clink/cheers -Date: 2013 -Date: 2013 -mtime: 1481623577 -song_end diff --git a/Sources/MpcNET.Test/Server/mpd.exe b/Sources/MpcNET.Test/Server/mpd.exe deleted file mode 100644 index 1449a1cf..00000000 Binary files a/Sources/MpcNET.Test/Server/mpd.exe and /dev/null differ diff --git a/Sources/MpcNET.Test/Server/mpd_log.txt b/Sources/MpcNET.Test/Server/mpd_log.txt deleted file mode 100644 index 22fab9f9..00000000 --- a/Sources/MpcNET.Test/Server/mpd_log.txt +++ /dev/null @@ -1,88 +0,0 @@ -Apr 12 14:17 : client: [0] opened from 127.0.0.1:65192 -Apr 12 14:17 : client: [0] expired -Apr 12 14:17 : client: [0] closed -Apr 12 14:17 : client: [1] opened from 127.0.0.1:65193 -Apr 12 14:17 : client: [1] expired -Apr 12 14:17 : client: [1] closed -Apr 12 14:17 : client: [2] opened from 127.0.0.1:65194 -Apr 12 14:17 : client: [2] expired -Apr 12 14:17 : client: [2] closed -Apr 12 14:17 : client: [3] opened from 127.0.0.1:65195 -Apr 12 14:17 : client: [3] expired -Apr 12 14:17 : client: [3] closed -Apr 12 14:18 : client: [4] opened from 127.0.0.1:65196 -Apr 12 14:18 : client: [4] expired -Apr 12 14:18 : client: [4] closed -Apr 12 14:18 : client: [5] opened from 127.0.0.1:65203 -Apr 12 14:18 : client: [5] expired -Apr 12 14:18 : client: [5] closed -Apr 12 14:19 : client: [6] opened from 127.0.0.1:65204 -Apr 12 14:19 : client: [6] process command "stats" -Apr 12 14:19 : client: [6] command returned 0 -Apr 12 14:19 : client: [6] expired -Apr 12 14:19 : client: [6] closed -Apr 12 14:20 : client: [7] opened from 127.0.0.1:65220 -Apr 12 14:20 : client: [7] process command "stats" -Apr 12 14:20 : client: [7] command returned 0 -Apr 12 14:20 : client: [7] expired -Apr 12 14:20 : client: [7] closed -Apr 12 14:20 : client: [8] opened from 127.0.0.1:65221 -Apr 12 14:20 : client: [8] process command "status" -Apr 12 14:20 : client: [8] command returned 0 -Apr 12 14:20 : client: [8] expired -Apr 12 14:20 : client: [8] closed -Apr 12 14:23 : client: [9] opened from 127.0.0.1:65226 -Apr 12 14:23 : client: [9] process command "stats" -Apr 12 14:23 : client: [9] command returned 0 -Apr 12 14:23 : client: [9] expired -Apr 12 14:23 : client: [9] closed -Apr 12 14:23 : client: [10] opened from 127.0.0.1:65227 -Apr 12 14:23 : client: [10] process command "stats" -Apr 12 14:23 : client: [10] command returned 0 -Apr 12 14:23 : client: [10] expired -Apr 12 14:23 : client: [10] closed -Apr 12 14:23 : client: [11] opened from 127.0.0.1:65228 -Apr 12 14:23 : client: [11] process command "stats" -Apr 12 14:23 : client: [11] command returned 0 -Apr 12 14:23 : client: [11] expired -Apr 12 14:23 : client: [11] closed -Apr 12 14:23 : client: [12] opened from 127.0.0.1:65229 -Apr 12 14:23 : client: [12] process command "status" -Apr 12 14:23 : client: [12] command returned 0 -Apr 12 14:23 : client: [12] expired -Apr 12 14:23 : client: [12] closed -Apr 12 14:23 : client: [13] opened from 127.0.0.1:65230 -Apr 12 14:23 : client: [13] process command "stats" -Apr 12 14:23 : client: [13] command returned 0 -Apr 12 14:23 : client: [13] expired -Apr 12 14:23 : client: [13] closed -Apr 12 14:25 : client: [14] opened from 127.0.0.1:65236 -Apr 12 14:25 : client: [14] process command "listplaylists" -Apr 12 14:25 : client: [14] command returned 0 -Apr 12 14:25 : client: [14] expired -Apr 12 14:25 : client: [14] closed -Apr 12 14:28 : client: [15] opened from 127.0.0.1:65383 -Apr 12 14:28 : client: [15] process command "listplaylists" -Apr 12 14:28 : client: [15] command returned 0 -Apr 12 14:28 : client: [15] expired -Apr 12 14:28 : client: [15] closed -Apr 12 14:29 : client: [16] opened from 127.0.0.1:65385 -Apr 12 14:29 : client: [16] process command "listplaylistinfo Playlist One" -Apr 12 14:29 : client: [16] command returned -1 -Apr 12 14:29 : client: [16] expired -Apr 12 14:29 : client: [16] closed -Apr 12 14:29 : client: [17] opened from 127.0.0.1:65386 -Apr 12 14:29 : client: [17] process command "listplaylistinfo "Playlist One"" -Apr 12 14:29 : database: get song: teaspoon-stirring-mug-of-coffee.mp3 -Apr 12 14:29 : database: get song: whistle-kettle-boiling.mp3 -Apr 12 14:29 : database: get song: wine-glass-double-chink-clink-cheers.mp3 -Apr 12 14:29 : database: get song: Directory With Spaces/coin-spin-light.mp3 -Apr 12 14:29 : database: get song: Directory With Spaces/finger-snap-click.mp3 -Apr 12 14:29 : client: [17] command returned 0 -Apr 12 14:29 : client: [17] expired -Apr 12 14:29 : client: [17] closed -Apr 12 14:32 : client: [18] opened from 127.0.0.1:65446 -Apr 12 14:32 : client: [18] process command "statstastats" -Apr 12 14:32 : client: [18] command returned -1 -Apr 12 14:32 : client: [18] process command "stats" -Apr 12 14:3 \ No newline at end of file diff --git a/Sources/MpcNET.Test/Server/openal-info.exe b/Sources/MpcNET.Test/Server/openal-info.exe deleted file mode 100644 index 0a7b9d8b..00000000 Binary files a/Sources/MpcNET.Test/Server/openal-info.exe and /dev/null differ diff --git a/Sources/MpcNET.Test/Server/winmm-info.exe b/Sources/MpcNET.Test/Server/winmm-info.exe deleted file mode 100644 index 6bdd7625..00000000 Binary files a/Sources/MpcNET.Test/Server/winmm-info.exe and /dev/null differ diff --git a/Sources/MpcNET.Test/TestOutput.cs b/Sources/MpcNET.Test/TestOutput.cs deleted file mode 100644 index 2c9339e1..00000000 --- a/Sources/MpcNET.Test/TestOutput.cs +++ /dev/null @@ -1,18 +0,0 @@ -namespace MpcNET.Test -{ - using System; - using MpcNET.Message; - - internal static class TestOutput - { - internal static void WriteLine(string value) - { - Console.Out.WriteLine(value); - } - - internal static void WriteLine(IMpdMessage message) - { - Console.Out.WriteLine(message.ToString()); - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET.Test/Tests/DatabaseCommandsTest.cs b/Sources/MpcNET.Test/Tests/DatabaseCommandsTest.cs deleted file mode 100644 index 94f85dd4..00000000 --- a/Sources/MpcNET.Test/Tests/DatabaseCommandsTest.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace MpcNET.Test -{ - using System.Linq; - using System.Threading.Tasks; - using Microsoft.VisualStudio.TestTools.UnitTesting; - using MpcNET.Tags; - - public partial class LibMpcTest - { - [TestMethod] - public async Task ListAllTest() - { - var response = await Mpc.SendAsync(new Commands.Database.ListAllCommand()); - - TestOutput.WriteLine("ListAllTest Result:"); - TestOutput.WriteLine(response); - - Assert.IsTrue(response.Response.Content.Count().Equals(7)); - } - - [TestMethod] - public async Task FindGenreTest() - { - var response = await Mpc.SendAsync(new Commands.Database.FindCommand(MpdTags.Genre, "soundfx")); - - TestOutput.WriteLine("FindGenreTest Result:"); - TestOutput.WriteLine(response); - - Assert.IsTrue(response.Response.Content.Count().Equals(7)); - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET.Test/Tests/MpdMessageExtension.cs b/Sources/MpcNET.Test/Tests/MpdMessageExtension.cs deleted file mode 100644 index a8489385..00000000 --- a/Sources/MpcNET.Test/Tests/MpdMessageExtension.cs +++ /dev/null @@ -1,16 +0,0 @@ -namespace MpcNET.Test -{ - using MpcNET.Message; - - public static class MpdMessageExtension - { - public static bool HasSuccessResponse(this IMpdMessage message) - { - return message.Response.Result.Connected && - message.Response.Result.Status == "OK" && - !message.Response.Result.Error && - message.Response.Result.ErrorMessage == string.Empty && - message.Response.Result.MpdError == string.Empty; - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET.Test/Tests/OutputCommandsTest.cs b/Sources/MpcNET.Test/Tests/OutputCommandsTest.cs deleted file mode 100644 index dcfd447d..00000000 --- a/Sources/MpcNET.Test/Tests/OutputCommandsTest.cs +++ /dev/null @@ -1,75 +0,0 @@ -namespace MpcNET.Test -{ - using System.Linq; - using System.Threading.Tasks; - using Microsoft.VisualStudio.TestTools.UnitTesting; - - public partial class LibMpcTest - { - [TestMethod] - public async Task DisableOutputTest() - { - var responseOutputs = await Mpc.SendAsync(new Commands.Output.OutputsCommand()); - Assert.IsTrue(responseOutputs.Response.Content.Single(output => output.Id.Equals(0)).IsEnabled); - - var response = await Mpc.SendAsync(new Commands.Output.DisableOutputCommand(0)); - - TestOutput.WriteLine("DisableOutputTest Result:"); - TestOutput.WriteLine(response); - - Assert.IsTrue(response.Response.Content.Equals(string.Empty)); - Assert.IsTrue(response.Response.Result.Status.Equals("OK")); - - responseOutputs = await Mpc.SendAsync(new Commands.Output.OutputsCommand()); - Assert.IsFalse(responseOutputs.Response.Content.Single(output => output.Id.Equals(0)).IsEnabled); - } - - [TestMethod] - public async Task EnableOutputTest() - { - var responseOutputs = await Mpc.SendAsync(new Commands.Output.OutputsCommand()); - // By default should be disable from mpd.config - Assert.IsFalse(responseOutputs.Response.Content.Single(output => output.Id.Equals(1)).IsEnabled); - - var response = await Mpc.SendAsync(new Commands.Output.EnableOutputCommand(1)); - - TestOutput.WriteLine("EnableOutputTest Result:"); - TestOutput.WriteLine(response); - - Assert.IsTrue(response.Response.Content.Equals(string.Empty)); - Assert.IsTrue(response.Response.Result.Status.Equals("OK")); - - responseOutputs = await Mpc.SendAsync(new Commands.Output.OutputsCommand()); - Assert.IsTrue(responseOutputs.Response.Content.Single(output => output.Id.Equals(1)).IsEnabled); - } - - [TestMethod] - public async Task ToggleOutputTest() - { - var responseOutputs = await Mpc.SendAsync(new Commands.Output.OutputsCommand()); - Assert.IsTrue(responseOutputs.Response.Content.Single(output => output.Id.Equals(2)).IsEnabled); - - var response = await Mpc.SendAsync(new Commands.Output.ToggleOutputCommand(2)); - - TestOutput.WriteLine("ToggleOutputTest Result:"); - TestOutput.WriteLine(response); - - Assert.IsTrue(response.Response.Content.Equals(string.Empty)); - Assert.IsTrue(response.Response.Result.Status.Equals("OK")); - - responseOutputs = await Mpc.SendAsync(new Commands.Output.OutputsCommand()); - Assert.IsFalse(responseOutputs.Response.Content.Single(output => output.Id.Equals(2)).IsEnabled); - } - - [TestMethod] - public async Task LisOutputsTest() - { - var response = await Mpc.SendAsync(new Commands.Output.OutputsCommand()); - - TestOutput.WriteLine("LisOutputsTest Result:"); - TestOutput.WriteLine(response); - - Assert.IsTrue(response.Response.Content.Count().Equals(3)); - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET.Test/Tests/PlaylistsCommandsTest.cs b/Sources/MpcNET.Test/Tests/PlaylistsCommandsTest.cs deleted file mode 100644 index 582b4a47..00000000 --- a/Sources/MpcNET.Test/Tests/PlaylistsCommandsTest.cs +++ /dev/null @@ -1,175 +0,0 @@ -namespace MpcNET.Test -{ - using System.Linq; - using System.Threading.Tasks; - using Microsoft.VisualStudio.TestTools.UnitTesting; - using MpcNET.Commands; - using MpcNET.Commands.Queue; - - public partial class LibMpcTest - { - [DataTestMethod] - [DataRow("Playlist One", 5)] - [DataRow("Playlist Two", 3)] - [DataRow("_My Playlist", 5)] - public async Task ListPlaylistTest(string playlistName, int numberOfFiles) - { - var response = await Mpc.SendAsync(new Commands.Playlist.ListPlaylistCommand(playlistName)); - - TestOutput.WriteLine($"ListPlaylistTest (playlistName: {playlistName}) Result:"); - TestOutput.WriteLine(response); - - Assert.IsTrue(response.Response.Content.Count().Equals(numberOfFiles)); - } - - [DataTestMethod] - [DataRow("Playlist One", 5)] - [DataRow("Playlist Two", 3)] - [DataRow("_My Playlist", 5)] - public async Task ListPlaylistInfoTest(string playlistName, int numberOfFiles) - { - var response = await Mpc.SendAsync(new Commands.Playlist.ListPlaylistInfoCommand(playlistName)); - - TestOutput.WriteLine($"ListPlaylistTest (playlistName: {playlistName}) Result:"); - TestOutput.WriteLine(response); - - Assert.IsTrue(response.Response.Content.Count().Equals(numberOfFiles)); - Assert.IsTrue(response.Response.Content.All(item => !string.IsNullOrEmpty(item.Artist))); - Assert.IsTrue(response.Response.Content.All(item => !string.IsNullOrEmpty(item.Title))); - Assert.IsTrue(response.Response.Content.All(item => !string.IsNullOrEmpty(item.Date))); - } - - [TestMethod] - public async Task ListPlaylistsTest() - { - var response = await Mpc.SendAsync(new Commands.Playlist.ListPlaylistsCommand()); - - TestOutput.WriteLine($"ListPlaylistsTest Result:"); - TestOutput.WriteLine(response); - - Assert.IsTrue(response.Response.Content.Count().Equals(3)); - } - - /// - /// These tests must run sequential because we have only one "Current Queue" - /// - [TestMethod] - public async Task QueueTests() - { - await this.LoadPlaylistTest(); - await this.ClearPlaylistTest(); - await this.AddDirectoryTest(); - await this.AddFileTest(); - await this.RemovePositionTest(); - await this.RemoveIdTest(); - } - - public async Task LoadPlaylistTest() - { - await this.Clear_Queue(); - await this.Check_Empty_Queue(); - await this.Load_Playlist("Playlist One"); - await this.Check_Queue_HasSongs(5); - } - - public async Task ClearPlaylistTest() - { - await this.Clear_Queue(); - await this.Check_Empty_Queue(); - await this.Load_Playlist("Playlist One"); - await this.Clear_Queue(); - await this.Check_Queue_HasSongs(0); - } - - public async Task AddDirectoryTest() - { - await this.Clear_Queue(); - await this.Check_Empty_Queue(); - await this.Add_Directory("Directory With Spaces"); - await this.Check_Queue_HasSongs(3); - } - - public async Task AddFileTest() - { - await this.Clear_Queue(); - await this.Check_Empty_Queue(); - await this.Add_File("teaspoon-stirring-mug-of-coffee.mp3"); - await this.Check_Queue_HasSongs(1); - } - - public async Task RemovePositionTest() - { - await this.Clear_Queue(); - await this.Check_Empty_Queue(); - await this.Add_File("teaspoon-stirring-mug-of-coffee.mp3"); - await this.Remove_Position(0); - await this.Check_Queue_HasSongs(0); - } - - public async Task RemoveIdTest() - { - await this.Clear_Queue(); - await this.Check_Empty_Queue(); - await this.Add_File("teaspoon-stirring-mug-of-coffee.mp3"); - var id = await this.Get_Song_Id(); - await this.Remove_Id(id); - await this.Check_Queue_HasSongs(0); - } - - private async Task Check_Empty_Queue() - { - var message = await Mpc.SendAsync(new PlaylistCommand()); - Assert.IsTrue(message.HasSuccessResponse()); - Assert.IsFalse(message.Response.Content.Any()); - } - - private async Task Load_Playlist(string playlistName) - { - var message = await Mpc.SendAsync(new Commands.Playlist.LoadCommand(playlistName)); - Assert.IsTrue(message.HasSuccessResponse()); - } - - private async Task Clear_Queue() - { - var message = await Mpc.SendAsync(new ClearCommand()); - Assert.IsTrue(message.HasSuccessResponse()); - } - - private async Task Check_Queue_HasSongs(int nrOfSongs) - { - var message = await Mpc.SendAsync(new PlaylistCommand()); - Assert.IsTrue(message.HasSuccessResponse()); - Assert.IsTrue(message.Response.Content.Count() == nrOfSongs); - } - - private async Task Add_Directory(string directory) - { - var message = await Mpc.SendAsync(new AddCommand(directory)); - Assert.IsTrue(message.HasSuccessResponse()); - } - - private async Task Add_File(string file) - { - var message = await Mpc.SendAsync(new AddIdCommand(file)); - Assert.IsTrue(message.HasSuccessResponse()); - } - - private async Task Remove_Position(int position) - { - var message = await Mpc.SendAsync(new DeleteCommand(position)); - Assert.IsTrue(message.HasSuccessResponse()); - } - - private async Task Remove_Id(int songId) - { - var message = await Mpc.SendAsync(new DeleteIdCommand(songId)); - Assert.IsTrue(message.HasSuccessResponse()); - } - - private async Task Get_Song_Id() - { - var message = await Mpc.SendAsync(new PlaylistInfoCommand()); - return message.Response.Content.Single().Id; - } - } -} diff --git a/Sources/MpcNET.Test/Tests/ReflectionCommandsTest.cs b/Sources/MpcNET.Test/Tests/ReflectionCommandsTest.cs deleted file mode 100644 index eaae40b4..00000000 --- a/Sources/MpcNET.Test/Tests/ReflectionCommandsTest.cs +++ /dev/null @@ -1,77 +0,0 @@ -namespace MpcNET.Test -{ - using System.Linq; - using System.Threading.Tasks; - using Microsoft.VisualStudio.TestTools.UnitTesting; - using MpcNET.Commands; - - public partial class LibMpcTest - { - [TestMethod] - public async Task CommandsTest() - { - var response = await Mpc.SendAsync(new Commands.Reflection.CommandsCommand()); - - TestOutput.WriteLine($"CommandsTest (commands: {response.Response.Content.Count()}) Result:"); - TestOutput.WriteLine(response); - - // Different answer from MPD on Windows and on Linux, beacuse of Version. - // Check some of the commands. - Assert.IsTrue(response.Response.Content.Any(command => command.Equals("listall"))); - Assert.IsTrue(response.Response.Content.Any(command => command.Equals("outputs"))); - Assert.IsTrue(response.Response.Content.Any(command => command.Equals("pause"))); - Assert.IsTrue(response.Response.Content.Any(command => command.Equals("play"))); - Assert.IsTrue(response.Response.Content.Any(command => command.Equals("setvol"))); - Assert.IsTrue(response.Response.Content.Any(command => command.Equals("stop"))); - } - - [TestMethod] - public async Task TagTypesTest() - { - var response = await Mpc.SendAsync(new Commands.Reflection.TagTypesCommand()); - - TestOutput.WriteLine("TagTypesTest Result:"); - TestOutput.WriteLine(response); - - Assert.IsTrue(response.Response.Content.Count().Equals(25)); - } - - [TestMethod] - public async Task UrlHandlersTest() - { - var response = await Mpc.SendAsync(new Commands.Reflection.UrlHandlersCommand()); - - TestOutput.WriteLine($"UrlHandlersTest (handlers: {response.Response.Content.Count()}) Result:"); - TestOutput.WriteLine(response); - - // Different answer from MPD on Windows and on Linux. - // Check some of the handlers. - Assert.IsTrue(response.Response.Content.Any(handler => handler.Equals("http://"))); - Assert.IsTrue(response.Response.Content.Any(handler => handler.Equals("nfs://"))); - } - - [TestMethod] - public async Task DecodersTest() - { - var response = await Mpc.SendAsync(new Commands.Reflection.DecodersCommand()); - - TestOutput.WriteLine($"DecodersTest (decoders: {response.Response.Content.Count()}) Result:"); - TestOutput.WriteLine(response); - - // Different answer from MPD on Windows and on Linux. - // Check some of the decoders. - Assert.IsTrue(response.Response.Content.Any(decoder => decoder.Name.Equals("vorbis"))); - Assert.IsTrue(response.Response.Content.Any(decoder => decoder.Suffixes.Any(suffix => suffix.Equals("mp3")))); - Assert.IsTrue(response.Response.Content.Any(decoder => decoder.MediaTypes.Any(mediaType => mediaType.Equals("audio/mpeg")))); - Assert.IsTrue(response.Response.Content.Any(decoder => decoder.Name.Equals("flac"))); - Assert.IsTrue(response.Response.Content.Any(decoder => decoder.Suffixes.Any(suffix => suffix.Equals("flac")))); - Assert.IsTrue(response.Response.Content.Any(decoder => decoder.MediaTypes.Any(mediaType => mediaType.Equals("audio/flac")))); - Assert.IsTrue(response.Response.Content.Any(decoder => decoder.MediaTypes.Any(mediaType => mediaType.Equals("audio/x-flac")))); - Assert.IsTrue(response.Response.Content.Any(decoder => decoder.Name.Equals("ffmpeg"))); - Assert.IsTrue(response.Response.Content.Any(decoder => decoder.Suffixes.Any(suffix => suffix.Equals("aac")))); - Assert.IsTrue(response.Response.Content.Any(decoder => decoder.Suffixes.Any(suffix => suffix.Equals("mpeg")))); - Assert.IsTrue(response.Response.Content.Any(decoder => decoder.MediaTypes.Any(mediaType => mediaType.Equals("audio/aac")))); - Assert.IsTrue(response.Response.Content.Any(decoder => decoder.MediaTypes.Any(mediaType => mediaType.Equals("audio/mpeg")))); - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll b/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll deleted file mode 100644 index 46351d8a..00000000 Binary files a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll and /dev/null differ diff --git a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.dll b/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.dll deleted file mode 100644 index 3d943544..00000000 Binary files a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.dll and /dev/null differ diff --git a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll b/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll deleted file mode 100644 index a211d0e6..00000000 Binary files a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll and /dev/null differ diff --git a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/MpcNET.Test.deps.json b/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/MpcNET.Test.deps.json deleted file mode 100644 index 50218d2d..00000000 --- a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/MpcNET.Test.deps.json +++ /dev/null @@ -1,1513 +0,0 @@ -{ - "runtimeTarget": { - "name": ".NETCoreApp,Version=v2.0", - "signature": "ce059b3926231aff7f4e4b795d2fbb0888bf2b77" - }, - "compilationOptions": {}, - "targets": { - ".NETCoreApp,Version=v2.0": { - "MpcNET.Test/1.0.0": { - "dependencies": { - "MSTest.TestAdapter": "1.3.0", - "MSTest.TestFramework": "1.3.0", - "Microsoft.NET.Test.Sdk": "15.7.2", - "MpcNET.SundewFork": "0.0.1-pre007" - }, - "runtime": { - "MpcNET.Test.dll": {} - } - }, - "Microsoft.CodeCoverage/1.0.3": { - "runtime": { - "lib/netstandard1.0/Microsoft.VisualStudio.CodeCoverage.Shim.dll": { - "assemblyVersion": "15.0.0.0", - "fileVersion": "15.0.26228.0" - } - } - }, - "Microsoft.DotNet.PlatformAbstractions/1.0.3": { - "dependencies": { - "System.AppContext": "4.1.0", - "System.Collections": "4.3.0", - "System.IO": "4.3.0", - "System.IO.FileSystem": "4.0.1", - "System.Reflection.TypeExtensions": "4.1.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.InteropServices": "4.1.0", - "System.Runtime.InteropServices.RuntimeInformation": "4.0.0" - }, - "runtime": { - "lib/netstandard1.3/Microsoft.DotNet.PlatformAbstractions.dll": { - "assemblyVersion": "1.0.1.0", - "fileVersion": "1.0.1.0" - } - } - }, - "Microsoft.Extensions.DependencyModel/1.0.3": { - "dependencies": { - "Microsoft.DotNet.PlatformAbstractions": "1.0.3", - "Newtonsoft.Json": "11.0.2", - "System.Diagnostics.Debug": "4.3.0", - "System.Dynamic.Runtime": "4.0.11", - "System.Linq": "4.1.0" - }, - "runtime": { - "lib/netstandard1.6/Microsoft.Extensions.DependencyModel.dll": { - "assemblyVersion": "1.0.1.0", - "fileVersion": "1.0.1.0" - } - } - }, - "Microsoft.NET.Test.Sdk/15.7.2": { - "dependencies": { - "Microsoft.CodeCoverage": "1.0.3", - "Microsoft.TestPlatform.TestHost": "15.7.2" - } - }, - "Microsoft.NETCore.Targets/1.1.0": {}, - "Microsoft.TestPlatform.ObjectModel/15.7.2": { - "dependencies": { - "System.ComponentModel.EventBasedAsync": "4.0.11", - "System.ComponentModel.TypeConverter": "4.1.0", - "System.Diagnostics.Process": "4.1.0", - "System.Diagnostics.TextWriterTraceListener": "4.3.0", - "System.Diagnostics.TraceSource": "4.3.0", - "System.Reflection.Metadata": "1.3.0", - "System.Reflection.TypeExtensions": "4.1.0", - "System.Runtime.InteropServices.RuntimeInformation": "4.0.0", - "System.Runtime.Loader": "4.0.0", - "System.Runtime.Serialization.Json": "4.0.2", - "System.Runtime.Serialization.Primitives": "4.1.1", - "System.Threading.Thread": "4.0.0", - "System.Xml.XPath.XmlDocument": "4.0.1" - }, - "runtime": { - "lib/netstandard1.5/Microsoft.TestPlatform.CoreUtilities.dll": { - "assemblyVersion": "15.0.0.0", - "fileVersion": "15.0.0.0" - }, - "lib/netstandard1.5/Microsoft.TestPlatform.PlatformAbstractions.dll": { - "assemblyVersion": "15.0.0.0", - "fileVersion": "15.0.0.0" - }, - "lib/netstandard1.5/Microsoft.VisualStudio.TestPlatform.ObjectModel.dll": { - "assemblyVersion": "15.0.0.0", - "fileVersion": "15.0.0.0" - } - }, - "resources": { - "lib/netstandard1.5/cs/Microsoft.TestPlatform.CoreUtilities.resources.dll": { - "locale": "cs" - }, - "lib/netstandard1.5/cs/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll": { - "locale": "cs" - }, - "lib/netstandard1.5/de/Microsoft.TestPlatform.CoreUtilities.resources.dll": { - "locale": "de" - }, - "lib/netstandard1.5/de/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll": { - "locale": "de" - }, - "lib/netstandard1.5/es/Microsoft.TestPlatform.CoreUtilities.resources.dll": { - "locale": "es" - }, - "lib/netstandard1.5/es/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll": { - "locale": "es" - }, - "lib/netstandard1.5/fr/Microsoft.TestPlatform.CoreUtilities.resources.dll": { - "locale": "fr" - }, - "lib/netstandard1.5/fr/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll": { - "locale": "fr" - }, - "lib/netstandard1.5/it/Microsoft.TestPlatform.CoreUtilities.resources.dll": { - "locale": "it" - }, - "lib/netstandard1.5/it/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll": { - "locale": "it" - }, - "lib/netstandard1.5/ja/Microsoft.TestPlatform.CoreUtilities.resources.dll": { - "locale": "ja" - }, - "lib/netstandard1.5/ja/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll": { - "locale": "ja" - }, - "lib/netstandard1.5/ko/Microsoft.TestPlatform.CoreUtilities.resources.dll": { - "locale": "ko" - }, - "lib/netstandard1.5/ko/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll": { - "locale": "ko" - }, - "lib/netstandard1.5/pl/Microsoft.TestPlatform.CoreUtilities.resources.dll": { - "locale": "pl" - }, - "lib/netstandard1.5/pl/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll": { - "locale": "pl" - }, - "lib/netstandard1.5/pt-BR/Microsoft.TestPlatform.CoreUtilities.resources.dll": { - "locale": "pt-BR" - }, - "lib/netstandard1.5/pt-BR/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll": { - "locale": "pt-BR" - }, - "lib/netstandard1.5/ru/Microsoft.TestPlatform.CoreUtilities.resources.dll": { - "locale": "ru" - }, - "lib/netstandard1.5/ru/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll": { - "locale": "ru" - }, - "lib/netstandard1.5/tr/Microsoft.TestPlatform.CoreUtilities.resources.dll": { - "locale": "tr" - }, - "lib/netstandard1.5/tr/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll": { - "locale": "tr" - }, - "lib/netstandard1.5/zh-Hans/Microsoft.TestPlatform.CoreUtilities.resources.dll": { - "locale": "zh-Hans" - }, - "lib/netstandard1.5/zh-Hans/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll": { - "locale": "zh-Hans" - }, - "lib/netstandard1.5/zh-Hant/Microsoft.TestPlatform.CoreUtilities.resources.dll": { - "locale": "zh-Hant" - }, - "lib/netstandard1.5/zh-Hant/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll": { - "locale": "zh-Hant" - } - } - }, - "Microsoft.TestPlatform.TestHost/15.7.2": { - "dependencies": { - "Microsoft.Extensions.DependencyModel": "1.0.3", - "Microsoft.TestPlatform.ObjectModel": "15.7.2", - "Newtonsoft.Json": "11.0.2" - }, - "runtime": { - "lib/netstandard1.5/Microsoft.TestPlatform.CommunicationUtilities.dll": { - "assemblyVersion": "15.0.0.0", - "fileVersion": "15.0.0.0" - }, - "lib/netstandard1.5/Microsoft.TestPlatform.CrossPlatEngine.dll": { - "assemblyVersion": "15.0.0.0", - "fileVersion": "15.0.0.0" - }, - "lib/netstandard1.5/Microsoft.VisualStudio.TestPlatform.Common.dll": { - "assemblyVersion": "15.0.0.0", - "fileVersion": "15.0.0.0" - }, - "lib/netstandard1.5/testhost.dll": { - "assemblyVersion": "15.0.0.0", - "fileVersion": "15.0.0.0" - } - }, - "resources": { - "lib/netstandard1.5/cs/Microsoft.TestPlatform.CommunicationUtilities.resources.dll": { - "locale": "cs" - }, - "lib/netstandard1.5/cs/Microsoft.TestPlatform.CrossPlatEngine.resources.dll": { - "locale": "cs" - }, - "lib/netstandard1.5/cs/Microsoft.VisualStudio.TestPlatform.Common.resources.dll": { - "locale": "cs" - }, - "lib/netstandard1.5/de/Microsoft.TestPlatform.CommunicationUtilities.resources.dll": { - "locale": "de" - }, - "lib/netstandard1.5/de/Microsoft.TestPlatform.CrossPlatEngine.resources.dll": { - "locale": "de" - }, - "lib/netstandard1.5/de/Microsoft.VisualStudio.TestPlatform.Common.resources.dll": { - "locale": "de" - }, - "lib/netstandard1.5/es/Microsoft.TestPlatform.CommunicationUtilities.resources.dll": { - "locale": "es" - }, - "lib/netstandard1.5/es/Microsoft.TestPlatform.CrossPlatEngine.resources.dll": { - "locale": "es" - }, - "lib/netstandard1.5/es/Microsoft.VisualStudio.TestPlatform.Common.resources.dll": { - "locale": "es" - }, - "lib/netstandard1.5/fr/Microsoft.TestPlatform.CommunicationUtilities.resources.dll": { - "locale": "fr" - }, - "lib/netstandard1.5/fr/Microsoft.TestPlatform.CrossPlatEngine.resources.dll": { - "locale": "fr" - }, - "lib/netstandard1.5/fr/Microsoft.VisualStudio.TestPlatform.Common.resources.dll": { - "locale": "fr" - }, - "lib/netstandard1.5/it/Microsoft.TestPlatform.CommunicationUtilities.resources.dll": { - "locale": "it" - }, - "lib/netstandard1.5/it/Microsoft.TestPlatform.CrossPlatEngine.resources.dll": { - "locale": "it" - }, - "lib/netstandard1.5/it/Microsoft.VisualStudio.TestPlatform.Common.resources.dll": { - "locale": "it" - }, - "lib/netstandard1.5/ja/Microsoft.TestPlatform.CommunicationUtilities.resources.dll": { - "locale": "ja" - }, - "lib/netstandard1.5/ja/Microsoft.TestPlatform.CrossPlatEngine.resources.dll": { - "locale": "ja" - }, - "lib/netstandard1.5/ja/Microsoft.VisualStudio.TestPlatform.Common.resources.dll": { - "locale": "ja" - }, - "lib/netstandard1.5/ko/Microsoft.TestPlatform.CommunicationUtilities.resources.dll": { - "locale": "ko" - }, - "lib/netstandard1.5/ko/Microsoft.TestPlatform.CrossPlatEngine.resources.dll": { - "locale": "ko" - }, - "lib/netstandard1.5/ko/Microsoft.VisualStudio.TestPlatform.Common.resources.dll": { - "locale": "ko" - }, - "lib/netstandard1.5/pl/Microsoft.TestPlatform.CommunicationUtilities.resources.dll": { - "locale": "pl" - }, - "lib/netstandard1.5/pl/Microsoft.TestPlatform.CrossPlatEngine.resources.dll": { - "locale": "pl" - }, - "lib/netstandard1.5/pl/Microsoft.VisualStudio.TestPlatform.Common.resources.dll": { - "locale": "pl" - }, - "lib/netstandard1.5/pt-BR/Microsoft.TestPlatform.CommunicationUtilities.resources.dll": { - "locale": "pt-BR" - }, - "lib/netstandard1.5/pt-BR/Microsoft.TestPlatform.CrossPlatEngine.resources.dll": { - "locale": "pt-BR" - }, - "lib/netstandard1.5/pt-BR/Microsoft.VisualStudio.TestPlatform.Common.resources.dll": { - "locale": "pt-BR" - }, - "lib/netstandard1.5/ru/Microsoft.TestPlatform.CommunicationUtilities.resources.dll": { - "locale": "ru" - }, - "lib/netstandard1.5/ru/Microsoft.TestPlatform.CrossPlatEngine.resources.dll": { - "locale": "ru" - }, - "lib/netstandard1.5/ru/Microsoft.VisualStudio.TestPlatform.Common.resources.dll": { - "locale": "ru" - }, - "lib/netstandard1.5/tr/Microsoft.TestPlatform.CommunicationUtilities.resources.dll": { - "locale": "tr" - }, - "lib/netstandard1.5/tr/Microsoft.TestPlatform.CrossPlatEngine.resources.dll": { - "locale": "tr" - }, - "lib/netstandard1.5/tr/Microsoft.VisualStudio.TestPlatform.Common.resources.dll": { - "locale": "tr" - }, - "lib/netstandard1.5/zh-Hans/Microsoft.TestPlatform.CommunicationUtilities.resources.dll": { - "locale": "zh-Hans" - }, - "lib/netstandard1.5/zh-Hans/Microsoft.TestPlatform.CrossPlatEngine.resources.dll": { - "locale": "zh-Hans" - }, - "lib/netstandard1.5/zh-Hans/Microsoft.VisualStudio.TestPlatform.Common.resources.dll": { - "locale": "zh-Hans" - }, - "lib/netstandard1.5/zh-Hant/Microsoft.TestPlatform.CommunicationUtilities.resources.dll": { - "locale": "zh-Hant" - }, - "lib/netstandard1.5/zh-Hant/Microsoft.TestPlatform.CrossPlatEngine.resources.dll": { - "locale": "zh-Hant" - }, - "lib/netstandard1.5/zh-Hant/Microsoft.VisualStudio.TestPlatform.Common.resources.dll": { - "locale": "zh-Hant" - } - } - }, - "Microsoft.Win32.Primitives/4.0.1": { - "dependencies": { - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "Microsoft.Win32.Registry/4.0.0": { - "dependencies": { - "System.Collections": "4.3.0", - "System.Globalization": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.0.1", - "System.Runtime.InteropServices": "4.1.0" - }, - "runtimeTargets": { - "runtime/unix/lib/_._": { - "rid": "unix", - "assetType": "runtime" - }, - "runtime/win/lib/_._": { - "rid": "win", - "assetType": "runtime" - } - } - }, - "MSTest.TestAdapter/1.3.0": { - "dependencies": { - "System.Diagnostics.TextWriterTraceListener": "4.3.0" - } - }, - "MSTest.TestFramework/1.3.0": { - "runtime": { - "lib/netstandard1.0/Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll": { - "assemblyVersion": "14.0.0.0", - "fileVersion": "14.0.2408.1" - }, - "lib/netstandard1.0/Microsoft.VisualStudio.TestPlatform.TestFramework.dll": { - "assemblyVersion": "14.0.0.0", - "fileVersion": "14.0.2408.1" - } - } - }, - "Newtonsoft.Json/11.0.2": { - "runtime": { - "lib/netstandard2.0/Newtonsoft.Json.dll": { - "assemblyVersion": "11.0.0.0", - "fileVersion": "11.0.2.21924" - } - } - }, - "runtime.native.System/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Targets": "1.1.0" - } - }, - "StyleCop.Analyzers/1.1.0-beta007": {}, - "Sundew.Base/3.2.0-pre024": { - "dependencies": { - "StyleCop.Analyzers": "1.1.0-beta007", - "System.ValueTuple": "4.5.0" - }, - "runtime": { - "lib/netstandard1.1/Sundew.Base.dll": { - "assemblyVersion": "3.2.0.0", - "fileVersion": "3.2.0.0" - } - } - }, - "System.AppContext/4.1.0": { - "dependencies": { - "System.Runtime": "4.3.0" - } - }, - "System.Collections/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Collections.Concurrent/4.0.12": { - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tracing": "4.1.0", - "System.Globalization": "4.3.0", - "System.Reflection": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.Collections.Immutable/1.2.0": { - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.Linq": "4.1.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Collections.NonGeneric/4.0.1": { - "dependencies": { - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Collections.Specialized/4.0.1": { - "dependencies": { - "System.Collections.NonGeneric": "4.0.1", - "System.Globalization": "4.3.0", - "System.Globalization.Extensions": "4.0.1", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.ComponentModel/4.0.1": { - "dependencies": { - "System.Runtime": "4.3.0" - } - }, - "System.ComponentModel.EventBasedAsync/4.0.11": { - "dependencies": { - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.ComponentModel.Primitives/4.1.0": { - "dependencies": { - "System.ComponentModel": "4.0.1", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.ComponentModel.TypeConverter/4.1.0": { - "dependencies": { - "System.Collections": "4.3.0", - "System.Collections.NonGeneric": "4.0.1", - "System.Collections.Specialized": "4.0.1", - "System.ComponentModel": "4.0.1", - "System.ComponentModel.Primitives": "4.1.0", - "System.Globalization": "4.3.0", - "System.Linq": "4.1.0", - "System.Reflection": "4.3.0", - "System.Reflection.Extensions": "4.0.1", - "System.Reflection.Primitives": "4.3.0", - "System.Reflection.TypeExtensions": "4.1.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Diagnostics.Debug/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Diagnostics.Process/4.1.0": { - "dependencies": { - "Microsoft.Win32.Primitives": "4.0.1", - "Microsoft.Win32.Registry": "4.0.0", - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.IO.FileSystem": "4.0.1", - "System.IO.FileSystem.Primitives": "4.0.1", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.0.1", - "System.Runtime.InteropServices": "4.1.0", - "System.Text.Encoding": "4.3.0", - "System.Text.Encoding.Extensions": "4.0.11", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "System.Threading.Thread": "4.0.0", - "System.Threading.ThreadPool": "4.0.10", - "runtime.native.System": "4.3.0" - }, - "runtimeTargets": { - "runtime/linux/lib/_._": { - "rid": "linux", - "assetType": "runtime" - }, - "runtime/osx/lib/_._": { - "rid": "osx", - "assetType": "runtime" - }, - "runtime/win/lib/_._": { - "rid": "win", - "assetType": "runtime" - } - } - }, - "System.Diagnostics.TextWriterTraceListener/4.3.0": { - "dependencies": { - "System.Diagnostics.TraceSource": "4.3.0", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Diagnostics.TraceSource/4.3.0": { - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Threading": "4.3.0", - "runtime.native.System": "4.3.0" - }, - "runtimeTargets": { - "runtime/unix/lib/_._": { - "rid": "unix", - "assetType": "runtime" - }, - "runtime/win/lib/_._": { - "rid": "win", - "assetType": "runtime" - } - } - }, - "System.Diagnostics.Tracing/4.1.0": { - "dependencies": { - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Dynamic.Runtime/4.0.11": { - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.Linq": "4.1.0", - "System.Linq.Expressions": "4.1.0", - "System.ObjectModel": "4.0.12", - "System.Reflection": "4.3.0", - "System.Reflection.Emit": "4.0.1", - "System.Reflection.Emit.ILGeneration": "4.0.1", - "System.Reflection.Primitives": "4.3.0", - "System.Reflection.TypeExtensions": "4.1.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Globalization/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Globalization.Extensions/4.0.1": { - "dependencies": { - "System.Globalization": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.InteropServices": "4.1.0" - }, - "runtimeTargets": { - "runtime/unix/lib/_._": { - "rid": "unix", - "assetType": "runtime" - }, - "runtime/win/lib/_._": { - "rid": "win", - "assetType": "runtime" - } - } - }, - "System.IO/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.IO.FileSystem/4.0.1": { - "dependencies": { - "Microsoft.NETCore.Targets": "1.1.0", - "System.IO": "4.3.0", - "System.IO.FileSystem.Primitives": "4.0.1", - "System.Runtime": "4.3.0", - "System.Runtime.Handles": "4.0.1", - "System.Text.Encoding": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.IO.FileSystem.Primitives/4.0.1": { - "dependencies": { - "System.Runtime": "4.3.0" - } - }, - "System.Linq/4.1.0": { - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0" - } - }, - "System.Linq.Expressions/4.1.0": { - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.Linq": "4.1.0", - "System.ObjectModel": "4.0.12", - "System.Reflection": "4.3.0", - "System.Reflection.Emit": "4.0.1", - "System.Reflection.Emit.ILGeneration": "4.0.1", - "System.Reflection.Emit.Lightweight": "4.0.1", - "System.Reflection.Extensions": "4.0.1", - "System.Reflection.Primitives": "4.3.0", - "System.Reflection.TypeExtensions": "4.1.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.ObjectModel/4.0.12": { - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Private.DataContractSerialization/4.1.1": { - "dependencies": { - "System.Collections": "4.3.0", - "System.Collections.Concurrent": "4.0.12", - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.Linq": "4.1.0", - "System.Reflection": "4.3.0", - "System.Reflection.Emit.ILGeneration": "4.0.1", - "System.Reflection.Emit.Lightweight": "4.0.1", - "System.Reflection.Extensions": "4.0.1", - "System.Reflection.Primitives": "4.3.0", - "System.Reflection.TypeExtensions": "4.1.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Serialization.Primitives": "4.1.1", - "System.Text.Encoding": "4.3.0", - "System.Text.Encoding.Extensions": "4.0.11", - "System.Text.RegularExpressions": "4.1.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "System.Xml.ReaderWriter": "4.0.11", - "System.Xml.XmlDocument": "4.0.1", - "System.Xml.XmlSerializer": "4.0.11" - } - }, - "System.Reflection/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Targets": "1.1.0", - "System.IO": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Emit/4.0.1": { - "dependencies": { - "System.IO": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Emit.ILGeneration": "4.0.1", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Emit.ILGeneration/4.0.1": { - "dependencies": { - "System.Reflection": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Emit.Lightweight/4.0.1": { - "dependencies": { - "System.Reflection": "4.3.0", - "System.Reflection.Emit.ILGeneration": "4.0.1", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Extensions/4.0.1": { - "dependencies": { - "Microsoft.NETCore.Targets": "1.1.0", - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Metadata/1.3.0": { - "dependencies": { - "System.Collections": "4.3.0", - "System.Collections.Immutable": "1.2.0", - "System.Diagnostics.Debug": "4.3.0", - "System.IO": "4.3.0", - "System.Linq": "4.1.0", - "System.Reflection": "4.3.0", - "System.Reflection.Extensions": "4.0.1", - "System.Reflection.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.InteropServices": "4.1.0", - "System.Text.Encoding": "4.3.0", - "System.Text.Encoding.Extensions": "4.0.11", - "System.Threading": "4.3.0" - } - }, - "System.Reflection.Primitives/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.TypeExtensions/4.1.0": { - "dependencies": { - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Resources.ResourceManager/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Targets": "1.1.0", - "System.Globalization": "4.3.0", - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Runtime/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Targets": "1.1.0" - } - }, - "System.Runtime.Extensions/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Runtime.Handles/4.0.1": { - "dependencies": { - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Runtime.InteropServices/4.1.0": { - "dependencies": { - "Microsoft.NETCore.Targets": "1.1.0", - "System.Reflection": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Handles": "4.0.1" - } - }, - "System.Runtime.InteropServices.RuntimeInformation/4.0.0": { - "dependencies": { - "System.Reflection": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.InteropServices": "4.1.0", - "System.Threading": "4.3.0", - "runtime.native.System": "4.3.0" - }, - "runtimeTargets": { - "runtime/unix/lib/_._": { - "rid": "unix", - "assetType": "runtime" - }, - "runtime/win/lib/_._": { - "rid": "win", - "assetType": "runtime" - } - } - }, - "System.Runtime.Loader/4.0.0": { - "dependencies": { - "System.IO": "4.3.0", - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Runtime.Serialization.Json/4.0.2": { - "dependencies": { - "System.IO": "4.3.0", - "System.Private.DataContractSerialization": "4.1.1", - "System.Runtime": "4.3.0" - } - }, - "System.Runtime.Serialization.Primitives/4.1.1": { - "dependencies": { - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Text.Encoding/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Text.Encoding.Extensions/4.0.11": { - "dependencies": { - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "System.Text.Encoding": "4.3.0" - } - }, - "System.Text.RegularExpressions/4.1.0": { - "dependencies": { - "System.Collections": "4.3.0", - "System.Globalization": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Threading/4.3.0": { - "dependencies": { - "System.Runtime": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.Threading.Tasks/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Threading.Tasks.Extensions/4.0.0": { - "dependencies": { - "System.Collections": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.Threading.Thread/4.0.0": { - "dependencies": { - "System.Runtime": "4.3.0" - } - }, - "System.Threading.ThreadPool/4.0.10": { - "dependencies": { - "System.Runtime": "4.3.0", - "System.Runtime.Handles": "4.0.1" - } - }, - "System.ValueTuple/4.5.0": {}, - "System.Xml.ReaderWriter/4.0.11": { - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.IO.FileSystem": "4.0.1", - "System.IO.FileSystem.Primitives": "4.0.1", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.InteropServices": "4.1.0", - "System.Text.Encoding": "4.3.0", - "System.Text.Encoding.Extensions": "4.0.11", - "System.Text.RegularExpressions": "4.1.0", - "System.Threading.Tasks": "4.3.0", - "System.Threading.Tasks.Extensions": "4.0.0" - } - }, - "System.Xml.XmlDocument/4.0.1": { - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0", - "System.Xml.ReaderWriter": "4.0.11" - } - }, - "System.Xml.XmlSerializer/4.0.11": { - "dependencies": { - "System.Collections": "4.3.0", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.Linq": "4.1.0", - "System.Reflection": "4.3.0", - "System.Reflection.Emit": "4.0.1", - "System.Reflection.Emit.ILGeneration": "4.0.1", - "System.Reflection.Extensions": "4.0.1", - "System.Reflection.Primitives": "4.3.0", - "System.Reflection.TypeExtensions": "4.1.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Text.RegularExpressions": "4.1.0", - "System.Threading": "4.3.0", - "System.Xml.ReaderWriter": "4.0.11", - "System.Xml.XmlDocument": "4.0.1" - } - }, - "System.Xml.XPath/4.0.1": { - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Threading": "4.3.0", - "System.Xml.ReaderWriter": "4.0.11" - } - }, - "System.Xml.XPath.XmlDocument/4.0.1": { - "dependencies": { - "System.Collections": "4.3.0", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Threading": "4.3.0", - "System.Xml.ReaderWriter": "4.0.11", - "System.Xml.XPath": "4.0.1", - "System.Xml.XmlDocument": "4.0.1" - }, - "runtime": { - "lib/netstandard1.3/System.Xml.XPath.XmlDocument.dll": { - "assemblyVersion": "4.0.1.0", - "fileVersion": "1.0.24212.1" - } - } - }, - "MpcNET.SundewFork/0.0.1-pre007": { - "dependencies": { - "Newtonsoft.Json": "11.0.2", - "Sundew.Base": "3.2.0-pre024", - "System.ValueTuple": "4.5.0" - }, - "runtime": { - "MpcNET.dll": {} - } - } - } - }, - "libraries": { - "MpcNET.Test/1.0.0": { - "type": "project", - "serviceable": false, - "sha512": "" - }, - "Microsoft.CodeCoverage/1.0.3": { - "type": "package", - "serviceable": true, - "sha512": "sha512-5KfX12XPfvBomjrZv9nCBfQ6lhZdroVxXvGnY6MqzG83bjqdq6SQ3xxJFdPgHv6oli83M9oNhZlynYehjmboUg==", - "path": "microsoft.codecoverage/1.0.3", - "hashPath": "microsoft.codecoverage.1.0.3.nupkg.sha512" - }, - "Microsoft.DotNet.PlatformAbstractions/1.0.3": { - "type": "package", - "serviceable": true, - "sha512": "sha512-rF92Gp5L2asYrFNf0cKNBxzzGLh1krHuj6TRDk9wdjN2qdvJLaNYOn1s9oYkMlptYX436KiEFqxhLB+I5veXvQ==", - "path": "microsoft.dotnet.platformabstractions/1.0.3", - "hashPath": "microsoft.dotnet.platformabstractions.1.0.3.nupkg.sha512" - }, - "Microsoft.Extensions.DependencyModel/1.0.3": { - "type": "package", - "serviceable": true, - "sha512": "sha512-Z3o19EnheuegmvgpCzwoSlnCWxYA6qIUhvKJ7ifKHHvU7U+oYR/gliLiL3LVYOOeGMEEzkpJ5W67sOcXizGtlw==", - "path": "microsoft.extensions.dependencymodel/1.0.3", - "hashPath": "microsoft.extensions.dependencymodel.1.0.3.nupkg.sha512" - }, - "Microsoft.NET.Test.Sdk/15.7.2": { - "type": "package", - "serviceable": true, - "sha512": "sha512-2qtmE+a+Zu847Zke4qjQaekLQg+ktoT88r2b+bW4Ev88bhm6EhHI36dy3qyXiCq0bTcaa2pF0YaVRtexL/YAkA==", - "path": "microsoft.net.test.sdk/15.7.2", - "hashPath": "microsoft.net.test.sdk.15.7.2.nupkg.sha512" - }, - "Microsoft.NETCore.Targets/1.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==", - "path": "microsoft.netcore.targets/1.1.0", - "hashPath": "microsoft.netcore.targets.1.1.0.nupkg.sha512" - }, - "Microsoft.TestPlatform.ObjectModel/15.7.2": { - "type": "package", - "serviceable": true, - "sha512": "sha512-W8ShtzLDlBiOYd+bGKuInpEHcL35rWlC+kTN/XT2BOi5pnBMW6xnBDseL/tIfZ4tjC+4ZMRcZxknT56Ygtc0pw==", - "path": "microsoft.testplatform.objectmodel/15.7.2", - "hashPath": "microsoft.testplatform.objectmodel.15.7.2.nupkg.sha512" - }, - "Microsoft.TestPlatform.TestHost/15.7.2": { - "type": "package", - "serviceable": true, - "sha512": "sha512-3O5FSif+/pCF2sybndiNBg5Q13RDckE6ZEv8RUDwku7iaIGOzAtrIImtc8D+UOJzTG+q+Gpe/fRw6cRFVhbjiw==", - "path": "microsoft.testplatform.testhost/15.7.2", - "hashPath": "microsoft.testplatform.testhost.15.7.2.nupkg.sha512" - }, - "Microsoft.Win32.Primitives/4.0.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-fQnBHO9DgcmkC9dYSJoBqo6sH1VJwJprUHh8F3hbcRlxiQiBUuTntdk8tUwV490OqC2kQUrinGwZyQHTieuXRA==", - "path": "microsoft.win32.primitives/4.0.1", - "hashPath": "microsoft.win32.primitives.4.0.1.nupkg.sha512" - }, - "Microsoft.Win32.Registry/4.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-ePwjDzHWYLWDSeLLyW2Yrv1AdkO3RJvH/kELUZGY7ds2QDApVwRjOByFqrSzxRoxkUH5Q+oukNaT6qxb65WxEQ==", - "path": "microsoft.win32.registry/4.0.0", - "hashPath": "microsoft.win32.registry.4.0.0.nupkg.sha512" - }, - "MSTest.TestAdapter/1.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-Q4SI3IAdijE3lbtqiRrlV2gmfcg2pRoqg4PpbM9H4qnMXdmrAyCmgdSGu+2UZUPBp0ToUbPHrNtfU0+Mr7wHsg==", - "path": "mstest.testadapter/1.3.0", - "hashPath": "mstest.testadapter.1.3.0.nupkg.sha512" - }, - "MSTest.TestFramework/1.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-W3elOx1QlYUNTrCo5EXLQ4rwARi+n3Nt6vYCngJEXij9XC0VhhLmaZIJew+RzhRwI5fr5CwlpAg1aqvh535+5w==", - "path": "mstest.testframework/1.3.0", - "hashPath": "mstest.testframework.1.3.0.nupkg.sha512" - }, - "Newtonsoft.Json/11.0.2": { - "type": "package", - "serviceable": true, - "sha512": "sha512-IvJe1pj7JHEsP8B8J8DwlMEx8UInrs/x+9oVY+oCD13jpLu4JbJU2WCIsMRn5C4yW9+DgkaO8uiVE5VHKjpmdQ==", - "path": "newtonsoft.json/11.0.2", - "hashPath": "newtonsoft.json.11.0.2.nupkg.sha512" - }, - "runtime.native.System/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-c/qWt2LieNZIj1jGnVNsE2Kl23Ya2aSTBuXMD6V7k9KWr6l16Tqdwq+hJScEpWER9753NWC8h96PaVNY5Ld7Jw==", - "path": "runtime.native.system/4.3.0", - "hashPath": "runtime.native.system.4.3.0.nupkg.sha512" - }, - "StyleCop.Analyzers/1.1.0-beta007": { - "type": "package", - "serviceable": true, - "sha512": "sha512-XWFcO5aHLtm5/VGlCMEO2YhlZNO5WFQkjxQj5J/mg4n3FTW+WBLmishITkar6qqlo9crIBC9JuyE/a+aTpfgRQ==", - "path": "stylecop.analyzers/1.1.0-beta007", - "hashPath": "stylecop.analyzers.1.1.0-beta007.nupkg.sha512" - }, - "Sundew.Base/3.2.0-pre024": { - "type": "package", - "serviceable": true, - "sha512": "sha512-ZTUdaFxZn2Eqc8mmwhWAqvJ5O9DgYlJ4Y/VuMSRwS25PkP3C5AOF1zrjXZI/tGOkInEM8UEpncsX9okSFniU9w==", - "path": "sundew.base/3.2.0-pre024", - "hashPath": "sundew.base.3.2.0-pre024.nupkg.sha512" - }, - "System.AppContext/4.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-3QjO4jNV7PdKkmQAVp9atA+usVnKRwI3Kx1nMwJ93T0LcQfx7pKAYk0nKz5wn1oP5iqlhZuy6RXOFdhr7rDwow==", - "path": "system.appcontext/4.1.0", - "hashPath": "system.appcontext.4.1.0.nupkg.sha512" - }, - "System.Collections/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-3Dcj85/TBdVpL5Zr+gEEBUuFe2icOnLalmEh9hfck1PTYbbyWuZgh4fmm2ysCLTrqLQw6t3TgTyJ+VLp+Qb+Lw==", - "path": "system.collections/4.3.0", - "hashPath": "system.collections.4.3.0.nupkg.sha512" - }, - "System.Collections.Concurrent/4.0.12": { - "type": "package", - "serviceable": true, - "sha512": "sha512-2gBcbb3drMLgxlI0fBfxMA31ec6AEyYCHygGse4vxceJan8mRIWeKJ24BFzN7+bi/NFTgdIgufzb94LWO5EERQ==", - "path": "system.collections.concurrent/4.0.12", - "hashPath": "system.collections.concurrent.4.0.12.nupkg.sha512" - }, - "System.Collections.Immutable/1.2.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-Z+K7+yV66Ok0eZOHVrgFy2TyUPwd7BQe+PaNPGCZbk3mePkYynf6AsqbBUYjwufL0yJE36JhTwqfVOSFG+rSyQ==", - "path": "system.collections.immutable/1.2.0", - "hashPath": "system.collections.immutable.1.2.0.nupkg.sha512" - }, - "System.Collections.NonGeneric/4.0.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-hMxFT2RhhlffyCdKLDXjx8WEC5JfCvNozAZxCablAuFRH74SCV4AgzE8yJCh/73bFnEoZgJ9MJmkjQ0dJmnKqA==", - "path": "system.collections.nongeneric/4.0.1", - "hashPath": "system.collections.nongeneric.4.0.1.nupkg.sha512" - }, - "System.Collections.Specialized/4.0.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-/HKQyVP0yH1I0YtK7KJL/28snxHNH/bi+0lgk/+MbURF6ULhAE31MDI+NZDerNWu264YbxklXCCygISgm+HMug==", - "path": "system.collections.specialized/4.0.1", - "hashPath": "system.collections.specialized.4.0.1.nupkg.sha512" - }, - "System.ComponentModel/4.0.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-2wyHkJ+P2tqWsudl6aWduDBDSq4rkP1xg9DY263jYPE3yEk29Qa9ewOMJTpSI8/H3ckglUjLjpi/MvTv2z9C8Q==", - "path": "system.componentmodel/4.0.1", - "hashPath": "system.componentmodel.4.0.1.nupkg.sha512" - }, - "System.ComponentModel.EventBasedAsync/4.0.11": { - "type": "package", - "serviceable": true, - "sha512": "sha512-Z7SO6vvQIR84daPE4uhaNdef9CjgjDMGYkas8epUhf0U3WGuaGgZ0Mm4QuNycMdbHUY8KEdZrtgxonkAiJaAlA==", - "path": "system.componentmodel.eventbasedasync/4.0.11", - "hashPath": "system.componentmodel.eventbasedasync.4.0.11.nupkg.sha512" - }, - "System.ComponentModel.Primitives/4.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-sc/7eVCdxPrp3ljpgTKVaQGUXiW05phNWvtv/m2kocXqrUQvTVWKou1Edas2aDjTThLPZOxPYIGNb/HN0QjURg==", - "path": "system.componentmodel.primitives/4.1.0", - "hashPath": "system.componentmodel.primitives.4.1.0.nupkg.sha512" - }, - "System.ComponentModel.TypeConverter/4.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-MnDAlaeJZy9pdB5ZdOlwdxfpI+LJQ6e0hmH7d2+y2LkiD8DRJynyDYl4Xxf3fWFm7SbEwBZh4elcfzONQLOoQw==", - "path": "system.componentmodel.typeconverter/4.1.0", - "hashPath": "system.componentmodel.typeconverter.4.1.0.nupkg.sha512" - }, - "System.Diagnostics.Debug/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-ZUhUOdqmaG5Jk3Xdb8xi5kIyQYAA4PnTNlHx1mu9ZY3qv4ELIdKbnL/akbGaKi2RnNUWaZsAs31rvzFdewTj2g==", - "path": "system.diagnostics.debug/4.3.0", - "hashPath": "system.diagnostics.debug.4.3.0.nupkg.sha512" - }, - "System.Diagnostics.Process/4.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-6Mp2SU5vrFVaegl7VS2h0NCRqp6Npju9dnHH+ZjAcYsuH6c0nx43BmQkHPJhSZl6q/6vPWpR5htlUnriV+Gb3Q==", - "path": "system.diagnostics.process/4.1.0", - "hashPath": "system.diagnostics.process.4.1.0.nupkg.sha512" - }, - "System.Diagnostics.TextWriterTraceListener/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-F11kHWeiwYjFWto+kr8tt9ULMH0k8MsT1XmdCGPTLYHhWgN+2g7JsIZiXDrxlFGccSNkbjfwQy4xIS38gzUiZA==", - "path": "system.diagnostics.textwritertracelistener/4.3.0", - "hashPath": "system.diagnostics.textwritertracelistener.4.3.0.nupkg.sha512" - }, - "System.Diagnostics.TraceSource/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-VnYp1NxGx8Ww731y2LJ1vpfb/DKVNKEZ8Jsh5SgQTZREL/YpWRArgh9pI8CDLmgHspZmLL697CaLvH85qQpRiw==", - "path": "system.diagnostics.tracesource/4.3.0", - "hashPath": "system.diagnostics.tracesource.4.3.0.nupkg.sha512" - }, - "System.Diagnostics.Tracing/4.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-vDN1PoMZCkkdNjvZLql592oYJZgS7URcJzJ7bxeBgGtx5UtR5leNm49VmfHGqIffX4FKacHbI3H6UyNSHQknBg==", - "path": "system.diagnostics.tracing/4.1.0", - "hashPath": "system.diagnostics.tracing.4.1.0.nupkg.sha512" - }, - "System.Dynamic.Runtime/4.0.11": { - "type": "package", - "serviceable": true, - "sha512": "sha512-3sDg7WOXnoBYUQdYIlJozO3Qi5DWOCR5WoWWLNsAmadnyk12RD5Yx8EsWF7XdTGnm/ImUbUs2fLbmpVFraQgFA==", - "path": "system.dynamic.runtime/4.0.11", - "hashPath": "system.dynamic.runtime.4.0.11.nupkg.sha512" - }, - "System.Globalization/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-kYdVd2f2PAdFGblzFswE4hkNANJBKRmsfa2X5LG2AcWE1c7/4t0pYae1L8vfZ5xvE2nK/R9JprtToA61OSHWIg==", - "path": "system.globalization/4.3.0", - "hashPath": "system.globalization.4.3.0.nupkg.sha512" - }, - "System.Globalization.Extensions/4.0.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-KKo23iKeOaIg61SSXwjANN7QYDr/3op3OWGGzDzz7mypx0Za0fZSeG0l6cco8Ntp8YMYkIQcAqlk8yhm5/Uhcg==", - "path": "system.globalization.extensions/4.0.1", - "hashPath": "system.globalization.extensions.4.0.1.nupkg.sha512" - }, - "System.IO/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-3qjaHvxQPDpSOYICjUoTsmoq5u6QJAFRUITgeT/4gqkF1bajbSmb1kwSxEA8AHlofqgcKJcM8udgieRNhaJ5Cg==", - "path": "system.io/4.3.0", - "hashPath": "system.io.4.3.0.nupkg.sha512" - }, - "System.IO.FileSystem/4.0.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-IBErlVq5jOggAD69bg1t0pJcHaDbJbWNUZTPI96fkYWzwYbN6D9wRHMULLDd9dHsl7C2YsxXL31LMfPI1SWt8w==", - "path": "system.io.filesystem/4.0.1", - "hashPath": "system.io.filesystem.4.0.1.nupkg.sha512" - }, - "System.IO.FileSystem.Primitives/4.0.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-kWkKD203JJKxJeE74p8aF8y4Qc9r9WQx4C0cHzHPrY3fv/L/IhWnyCHaFJ3H1QPOH6A93whlQ2vG5nHlBDvzWQ==", - "path": "system.io.filesystem.primitives/4.0.1", - "hashPath": "system.io.filesystem.primitives.4.0.1.nupkg.sha512" - }, - "System.Linq/4.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-bQ0iYFOQI0nuTnt+NQADns6ucV4DUvMdwN6CbkB1yj8i7arTGiTN5eok1kQwdnnNWSDZfIUySQY+J3d5KjWn0g==", - "path": "system.linq/4.1.0", - "hashPath": "system.linq.4.1.0.nupkg.sha512" - }, - "System.Linq.Expressions/4.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-I+y02iqkgmCAyfbqOmSDOgqdZQ5tTj80Akm5BPSS8EeB0VGWdy6X1KCoYe8Pk6pwDoAKZUOdLVxnTJcExiv5zw==", - "path": "system.linq.expressions/4.1.0", - "hashPath": "system.linq.expressions.4.1.0.nupkg.sha512" - }, - "System.ObjectModel/4.0.12": { - "type": "package", - "serviceable": true, - "sha512": "sha512-tAgJM1xt3ytyMoW4qn4wIqgJYm7L7TShRZG4+Q4Qsi2PCcj96pXN7nRywS9KkB3p/xDUjc2HSwP9SROyPYDYKQ==", - "path": "system.objectmodel/4.0.12", - "hashPath": "system.objectmodel.4.0.12.nupkg.sha512" - }, - "System.Private.DataContractSerialization/4.1.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-lcqFBUaCZxPiUkA4dlSOoPZGtZsAuuElH2XHgLwGLxd7ZozWetV5yiz0qGAV2AUYOqw97MtZBjbLMN16Xz4vXA==", - "path": "system.private.datacontractserialization/4.1.1", - "hashPath": "system.private.datacontractserialization.4.1.1.nupkg.sha512" - }, - "System.Reflection/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-KMiAFoW7MfJGa9nDFNcfu+FpEdiHpWgTcS2HdMpDvt9saK3y/G4GwprPyzqjFH9NTaGPQeWNHU+iDlDILj96aQ==", - "path": "system.reflection/4.3.0", - "hashPath": "system.reflection.4.3.0.nupkg.sha512" - }, - "System.Reflection.Emit/4.0.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-P2wqAj72fFjpP6wb9nSfDqNBMab+2ovzSDzUZK7MVIm54tBJEPr9jWfSjjoTpPwj1LeKcmX3vr0ttyjSSFM47g==", - "path": "system.reflection.emit/4.0.1", - "hashPath": "system.reflection.emit.4.0.1.nupkg.sha512" - }, - "System.Reflection.Emit.ILGeneration/4.0.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-Ov6dU8Bu15Bc7zuqttgHF12J5lwSWyTf1S+FJouUXVMSqImLZzYaQ+vRr1rQ0OZ0HqsrwWl4dsKHELckQkVpgA==", - "path": "system.reflection.emit.ilgeneration/4.0.1", - "hashPath": "system.reflection.emit.ilgeneration.4.0.1.nupkg.sha512" - }, - "System.Reflection.Emit.Lightweight/4.0.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-sSzHHXueZ5Uh0OLpUQprhr+ZYJrLPA2Cmr4gn0wj9+FftNKXx8RIMKvO9qnjk2ebPYUjZ+F2ulGdPOsvj+MEjA==", - "path": "system.reflection.emit.lightweight/4.0.1", - "hashPath": "system.reflection.emit.lightweight.4.0.1.nupkg.sha512" - }, - "System.Reflection.Extensions/4.0.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-GYrtRsZcMuHF3sbmRHfMYpvxZoIN2bQGrYGerUiWLEkqdEUQZhH3TRSaC/oI4wO0II1RKBPlpIa1TOMxIcOOzQ==", - "path": "system.reflection.extensions/4.0.1", - "hashPath": "system.reflection.extensions.4.0.1.nupkg.sha512" - }, - "System.Reflection.Metadata/1.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-ar5EbZXdU4z7XElcM+qoYRnwHXSzjznXcuPxuzhwMSkZ+oKzdAHRZ3QbtPo2NCTolpSkvmhjb/TOsNF0jVjXoQ==", - "path": "system.reflection.metadata/1.3.0", - "hashPath": "system.reflection.metadata.1.3.0.nupkg.sha512" - }, - "System.Reflection.Primitives/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-5RXItQz5As4xN2/YUDxdpsEkMhvw3e6aNveFXUn4Hl/udNTCNhnKp8lT9fnc3MhvGKh1baak5CovpuQUXHAlIA==", - "path": "system.reflection.primitives/4.3.0", - "hashPath": "system.reflection.primitives.4.3.0.nupkg.sha512" - }, - "System.Reflection.TypeExtensions/4.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-tsQ/ptQ3H5FYfON8lL4MxRk/8kFyE0A+tGPXmVP967cT/gzLHYxIejIYSxp4JmIeFHVP78g/F2FE1mUUTbDtrg==", - "path": "system.reflection.typeextensions/4.1.0", - "hashPath": "system.reflection.typeextensions.4.1.0.nupkg.sha512" - }, - "System.Resources.ResourceManager/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-/zrcPkkWdZmI4F92gL/TPumP98AVDu/Wxr3CSJGQQ+XN6wbRZcyfSKVoPo17ilb3iOr0cCRqJInGwNMolqhS8A==", - "path": "system.resources.resourcemanager/4.3.0", - "hashPath": "system.resources.resourcemanager.4.3.0.nupkg.sha512" - }, - "System.Runtime/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==", - "path": "system.runtime/4.3.0", - "hashPath": "system.runtime.4.3.0.nupkg.sha512" - }, - "System.Runtime.Extensions/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-guW0uK0fn5fcJJ1tJVXYd7/1h5F+pea1r7FLSOz/f8vPEqbR2ZAknuRDvTQ8PzAilDveOxNjSfr0CHfIQfFk8g==", - "path": "system.runtime.extensions/4.3.0", - "hashPath": "system.runtime.extensions.4.3.0.nupkg.sha512" - }, - "System.Runtime.Handles/4.0.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-nCJvEKguXEvk2ymk1gqj625vVnlK3/xdGzx0vOKicQkoquaTBJTP13AIYkocSUwHCLNBwUbXTqTWGDxBTWpt7g==", - "path": "system.runtime.handles/4.0.1", - "hashPath": "system.runtime.handles.4.0.1.nupkg.sha512" - }, - "System.Runtime.InteropServices/4.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-16eu3kjHS633yYdkjwShDHZLRNMKVi/s0bY8ODiqJ2RfMhDMAwxZaUaWVnZ2P71kr/or+X9o/xFWtNqz8ivieQ==", - "path": "system.runtime.interopservices/4.1.0", - "hashPath": "system.runtime.interopservices.4.1.0.nupkg.sha512" - }, - "System.Runtime.InteropServices.RuntimeInformation/4.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-hWPhJxc453RCa8Z29O91EmfGeZIHX1ZH2A8L6lYQVSaKzku2DfArSfMEb1/MYYzPQRJZeu0c9dmYeJKxW5Fgng==", - "path": "system.runtime.interopservices.runtimeinformation/4.0.0", - "hashPath": "system.runtime.interopservices.runtimeinformation.4.0.0.nupkg.sha512" - }, - "System.Runtime.Loader/4.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-b4IppA1QSmTIbznpzTptwPfUwv9BFbOq3bJfOnjcdcl+dG1Ebbt7UrF6flAStXi7labVpeZV7FM0BIgWnsVRQQ==", - "path": "system.runtime.loader/4.0.0", - "hashPath": "system.runtime.loader.4.0.0.nupkg.sha512" - }, - "System.Runtime.Serialization.Json/4.0.2": { - "type": "package", - "serviceable": true, - "sha512": "sha512-+7DIJhnKYgCzUgcLbVTtRQb2l1M0FP549XFlFkQM5lmNiUBl44AfNbx4bz61xA8PzLtlYwfmif4JJJW7MPPnjg==", - "path": "system.runtime.serialization.json/4.0.2", - "hashPath": "system.runtime.serialization.json.4.0.2.nupkg.sha512" - }, - "System.Runtime.Serialization.Primitives/4.1.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-HZ6Du5QrTG8MNJbf4e4qMO3JRAkIboGT5Fk804uZtg3Gq516S7hAqTm2UZKUHa7/6HUGdVy3AqMQKbns06G/cg==", - "path": "system.runtime.serialization.primitives/4.1.1", - "hashPath": "system.runtime.serialization.primitives.4.1.1.nupkg.sha512" - }, - "System.Text.Encoding/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-BiIg+KWaSDOITze6jGQynxg64naAPtqGHBwDrLaCtixsa5bKiR8dpPOHA7ge3C0JJQizJE+sfkz1wV+BAKAYZw==", - "path": "system.text.encoding/4.3.0", - "hashPath": "system.text.encoding.4.3.0.nupkg.sha512" - }, - "System.Text.Encoding.Extensions/4.0.11": { - "type": "package", - "serviceable": true, - "sha512": "sha512-jtbiTDtvfLYgXn8PTfWI+SiBs51rrmO4AAckx4KR6vFK9Wzf6tI8kcRdsYQNwriUeQ1+CtQbM1W4cMbLXnj/OQ==", - "path": "system.text.encoding.extensions/4.0.11", - "hashPath": "system.text.encoding.extensions.4.0.11.nupkg.sha512" - }, - "System.Text.RegularExpressions/4.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-i88YCXpRTjCnoSQZtdlHkAOx4KNNik4hMy83n0+Ftlb7jvV6ZiZWMpnEZHhjBp6hQVh8gWd/iKNPzlPF7iyA2g==", - "path": "system.text.regularexpressions/4.1.0", - "hashPath": "system.text.regularexpressions.4.1.0.nupkg.sha512" - }, - "System.Threading/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-VkUS0kOBcUf3Wwm0TSbrevDDZ6BlM+b/HRiapRFWjM5O0NS0LviG0glKmFK+hhPDd1XFeSdU1GmlLhb2CoVpIw==", - "path": "system.threading/4.3.0", - "hashPath": "system.threading.4.3.0.nupkg.sha512" - }, - "System.Threading.Tasks/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-LbSxKEdOUhVe8BezB/9uOGGppt+nZf6e1VFyw6v3DN6lqitm0OSn2uXMOdtP0M3W4iMcqcivm2J6UgqiwwnXiA==", - "path": "system.threading.tasks/4.3.0", - "hashPath": "system.threading.tasks.4.3.0.nupkg.sha512" - }, - "System.Threading.Tasks.Extensions/4.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-pH4FZDsZQ/WmgJtN4LWYmRdJAEeVkyriSwrv2Teoe5FOU0Yxlb6II6GL8dBPOfRmutHGATduj3ooMt7dJ2+i+w==", - "path": "system.threading.tasks.extensions/4.0.0", - "hashPath": "system.threading.tasks.extensions.4.0.0.nupkg.sha512" - }, - "System.Threading.Thread/4.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-6gD3/hcT42ffhc7Vk8XjKmGn5IdOJgwCT8Xw9nEND0byj0hf9/WToADppSs3mC909BHpLjsN2NpjbGHC1sfAbw==", - "path": "system.threading.thread/4.0.0", - "hashPath": "system.threading.thread.4.0.0.nupkg.sha512" - }, - "System.Threading.ThreadPool/4.0.10": { - "type": "package", - "serviceable": true, - "sha512": "sha512-r9B0S+YXD+XHJawe9WlPepCu5UEjck0Tb05BNaFUKScA7eudBl0O2D+8BPUL4PKKBBnvlrclElCoES8N0GkmYA==", - "path": "system.threading.threadpool/4.0.10", - "hashPath": "system.threading.threadpool.4.0.10.nupkg.sha512" - }, - "System.ValueTuple/4.5.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-xZtSZNEHGa+tGsKuP4sh257vxJ/yemShz4EusmomkynMzuEDDjVaErBNewpzEF6swUgbcrSQAX3ELsEp1zCOwA==", - "path": "system.valuetuple/4.5.0", - "hashPath": "system.valuetuple.4.5.0.nupkg.sha512" - }, - "System.Xml.ReaderWriter/4.0.11": { - "type": "package", - "serviceable": true, - "sha512": "sha512-ZIiLPsf67YZ9zgr31vzrFaYQqxRPX9cVHjtPSnmx4eN6lbS/yEyYNr2vs1doGDEscF0tjCZFsk9yUg1sC9e8tg==", - "path": "system.xml.readerwriter/4.0.11", - "hashPath": "system.xml.readerwriter.4.0.11.nupkg.sha512" - }, - "System.Xml.XmlDocument/4.0.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-c+SF/a9beIQdiD6TTmBi55M9MnR+zDwV6rY0RE7efGTqrD6h9C8PXjCqFkeRUb1ltrWB+gT/rQXkguD11Rn+sw==", - "path": "system.xml.xmldocument/4.0.1", - "hashPath": "system.xml.xmldocument.4.0.1.nupkg.sha512" - }, - "System.Xml.XmlSerializer/4.0.11": { - "type": "package", - "serviceable": true, - "sha512": "sha512-FrazwwqfIXTfq23mfv4zH+BjqkSFNaNFBtjzu3I9NRmG8EELYyrv/fJnttCIwRMFRR/YKXF1hmsMmMEnl55HGw==", - "path": "system.xml.xmlserializer/4.0.11", - "hashPath": "system.xml.xmlserializer.4.0.11.nupkg.sha512" - }, - "System.Xml.XPath/4.0.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-DnBmb14UutKAp4TaQ9Rf2AVX0s6wyVvFcn9bZJYCI2JllLL7h5J4F3duWt6zs3NEorK7q6AIeaR9HHFU9dc6sQ==", - "path": "system.xml.xpath/4.0.1", - "hashPath": "system.xml.xpath.4.0.1.nupkg.sha512" - }, - "System.Xml.XPath.XmlDocument/4.0.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-Zm2BdeanuncYs3NhCj4c9e1x3EXFzFBVv2wPEc/Dj4ZbI9R8ecLSR5frAsx4zJCPBtKQreQ7Q/KxJEohJZbfzA==", - "path": "system.xml.xpath.xmldocument/4.0.1", - "hashPath": "system.xml.xpath.xmldocument.4.0.1.nupkg.sha512" - }, - "MpcNET.SundewFork/0.0.1-pre007": { - "type": "project", - "serviceable": false, - "sha512": "" - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/MpcNET.Test.dll b/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/MpcNET.Test.dll deleted file mode 100644 index 2e35babd..00000000 Binary files a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/MpcNET.Test.dll and /dev/null differ diff --git a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/MpcNET.Test.pdb b/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/MpcNET.Test.pdb deleted file mode 100644 index 12dbe0d0..00000000 Binary files a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/MpcNET.Test.pdb and /dev/null differ diff --git a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/MpcNET.Test.runtimeconfig.dev.json b/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/MpcNET.Test.runtimeconfig.dev.json deleted file mode 100644 index 7d57f2f4..00000000 --- a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/MpcNET.Test.runtimeconfig.dev.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "runtimeOptions": { - "additionalProbingPaths": [ - "C:\\Users\\kim\\.dotnet\\store\\|arch|\\|tfm|", - "C:\\Users\\kim\\.nuget\\packages", - "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder" - ] - } -} \ No newline at end of file diff --git a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/MpcNET.Test.runtimeconfig.json b/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/MpcNET.Test.runtimeconfig.json deleted file mode 100644 index 7539019b..00000000 --- a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/MpcNET.Test.runtimeconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "runtimeOptions": { - "tfm": "netcoreapp2.0", - "framework": { - "name": "Microsoft.NETCore.App", - "version": "2.0.0" - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/MpcNET.dll b/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/MpcNET.dll deleted file mode 100644 index 6b9685c6..00000000 Binary files a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/MpcNET.dll and /dev/null differ diff --git a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/MpcNET.pdb b/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/MpcNET.pdb deleted file mode 100644 index b8464c45..00000000 Binary files a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/MpcNET.pdb and /dev/null differ diff --git a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/MpcNET.xml b/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/MpcNET.xml deleted file mode 100644 index 472b3559..00000000 --- a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/MpcNET.xml +++ /dev/null @@ -1,2187 +0,0 @@ - - - - MpcNET - - - - - Finds songs in the database that is exactly "searchText". - https://www.musicpd.org/doc/protocol/database.html. - - - - - Initializes a new instance of the class. - - The tag. - The search text. - - - - Serializes the command. - - - The serialize command. - - - - - Deserializes the specified response text pairs. - - The response. - - The deserialized response. - - - - - Lists all songs and directories in URI. - https://www.musicpd.org/doc/protocol/database.html. - - - - - Serializes the command. - - - The serialize command. - - - - - Deserializes the specified response text pairs. - - The response. - - The deserialized response. - - - - - Lists the specified tag. - https://www.musicpd.org/doc/protocol/database.html. - - - - - Initializes a new instance of the class. - - The tag. - - - - Serializes the command. - - - The serialize command. - - - - - Deserializes the specified response text pairs. - - The response. - - The deserialized response. - - - - - Updates the specified URI. - https://www.musicpd.org/doc/protocol/database.html. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The URI. - - - - Serializes the command. - - - The serialize command. - - - - - Deserializes the specified response text pairs. - - The response. - - The deserialized response. - - - - - Turns an output off. - https://www.musicpd.org/doc/protocol/output_commands.html. - - - - - Initializes a new instance of the class. - - The output identifier. - - - - Serializes the command. - - - The serialize command. - - - - - Deserializes the specified response text pairs. - - The response. - - The deserialized response. - - - - - Turns an output on. - https://www.musicpd.org/doc/protocol/output_commands.html. - - - - - Initializes a new instance of the class. - - The output identifier. - - - - Serializes the command. - - - The serialize command. - - - - - Deserializes the specified response text pairs. - - The response. - - The deserialized response. - - - - - Shows information about all outputs. - https://www.musicpd.org/doc/protocol/output_commands.html. - - - - - Serializes the command. - - - The serialize command. - - - - - Deserializes the specified response text pairs. - - The response. - - The deserialized response. - - - - - Turns an output on or off, depending on the current state. - https://www.musicpd.org/doc/protocol/output_commands.html. - - - - - Initializes a new instance of the class. - - The output identifier. - - - - Serializes the command. - - - The serialize command. - - - - - Deserializes the specified response text pairs. - - The response. - - The deserialized response. - - - - - Command to go to next song. - https://www.musicpd.org/doc/protocol/playback_commands.html. - - - - - Serializes the command. - - - The serialize command. - - - - - Deserializes the specified response text pairs. - - The response. - - The deserialized response. - - - - - Command to pause or resume. - https://www.musicpd.org/doc/protocol/playback_commands.html. - - - - - Initializes a new instance of the class. - - if set to true [pause]. - - - - Initializes a new instance of the class. - - - - - Serializes the command. - - - The serialize command. - - - - - Deserializes the specified response text pairs. - - The response. - - The deserialized response. - - - - - Command to start playback. - https://www.musicpd.org/doc/protocol/playback_commands.html. - - - - - Initializes a new instance of the class. - - The position. - - - - Serializes the command. - - - The serialize command. - - - - - Deserializes the specified response text pairs. - - The response. - - The deserialized response. - - - - - Command to start playback. - https://www.musicpd.org/doc/protocol/playback_commands.html. - - - - - Initializes a new instance of the class. - - The identifier. - - - - Serializes the command. - - - The serialize command. - - - - - Deserializes the specified response text pairs. - - The response. - - The deserialized response. - - - - - Command to goto previous song. - https://www.musicpd.org/doc/protocol/playback_commands.html. - - - - - Serializes the command. - - - The serialize command. - - - - - Deserializes the specified response text pairs. - - The response. - - The deserialized response. - - - - - Command to set volume. - https://www.musicpd.org/doc/protocol/playback_commands.html. - - - - - Initializes a new instance of the class. - - The volume. - - - - Serializes the command. - - - The serialize command. - - - - - Deserializes the specified response text pairs. - - The response. - - The deserialized response. - - - - - Command to stop playback. - https://www.musicpd.org/doc/protocol/playback_commands.html. - - - - - Serializes the command. - - - The serialize command. - - - - - Deserializes the specified response text pairs. - - The response. - - The deserialized response. - - - - - Adds the file URI to the playlist (directories add recursively). URI can also be a single file. - https://www.musicpd.org/doc/protocol/queue.html. - - - - - Initializes a new instance of the class. - - The URI. - - - - Serializes the command. - - - The serialize command. - - - - - Deserializes the specified response text pairs. - - The response. - - The deserialized response. - - - - - Adds a song to the playlist (non-recursive) and returns the song id. - https://www.musicpd.org/doc/protocol/queue.html. - - - - - Initializes a new instance of the class. - - The URI. - - - - Serializes the command. - - - The serialize command. - - - - - Deserializes the specified response text pairs. - - The response. - - The deserialized response. - - - - - Clears the current playlist. - https://www.musicpd.org/doc/protocol/queue.html. - - - - - Serializes the command. - - - The serialize command. - - - - - Deserializes the specified response text pairs. - - The response. - - The deserialized response. - - - - - Deletes a song from the playlist. - https://www.musicpd.org/doc/protocol/queue.html. - - - - - Initializes a new instance of the class. - - The position. - - - - Serializes the command. - - - The serialize command. - - - - - Deserializes the specified response text pairs. - - The response. - - The deserialized response. - - - - - Deletes the song SONGID from the playlist. - https://www.musicpd.org/doc/protocol/queue.html. - - - - - Initializes a new instance of the class. - - The song identifier. - - - - Serializes the command. - - - The serialize command. - - - - - Deserializes the specified response text pairs. - - The response. - - The deserialized response. - - - - - Lists the songs in the playlist. - https://www.musicpd.org/doc/protocol/playlist_files.html. - - - - - Initializes a new instance of the class. - - Name of the playlist. - - - - Serializes the command. - - - The serialize command. - - - - - Deserializes the specified response text pairs. - - The response. - - The deserialized response. - - - - - Lists the songs with metadata in the playlist. - https://www.musicpd.org/doc/protocol/playlist_files.html. - - - - - Initializes a new instance of the class. - - Name of the playlist. - - - - Serializes the command. - - - The serialize command. - - - - - Deserializes the specified response text pairs. - - The response. - - The deserialized response. - - - - - Prints a list of the playlist directory. - https://www.musicpd.org/doc/protocol/playlist_files.html. - - - - - Serializes the command. - - - The serialize command. - - - - - Deserializes the specified response text pairs. - - The response. - - The deserialized response. - - - - - Loads the playlist into the current queue. - https://www.musicpd.org/doc/protocol/playlist_files.html. - - - - - Initializes a new instance of the class. - - Name of the playlist. - - - - Serializes the command. - - - The serialize command. - - - - - Deserializes the specified response text pairs. - - The response. - - The deserialized response. - - - - - Displays the current playlist. - https://www.musicpd.org/doc/protocol/queue.html. - - - - - Serializes the command. - - - The serialize command. - - - - - Deserializes the specified response text pairs. - - The response. - - The deserialized response. - - - - - Displays song ID in the playlist. - https://www.musicpd.org/doc/protocol/queue.html. - - - - - Initializes a new instance of the class. - - The song identifier. - - - - Serializes the command. - - - The serialize command. - - - - - Deserializes the specified response text pairs. - - The response. - - The deserialized response. - - - - - Displays a list of all songs in the playlist. - https://www.musicpd.org/doc/protocol/queue.html. - - - - - Serializes the command. - - - The serialize command. - - - - - Deserializes the specified response text pairs. - - The response. - - The deserialized response. - - - - - Shows which commands the current user has access to. - config : This command is only permitted to "local" clients (connected via UNIX domain socket). - https://www.musicpd.org/doc/protocol/reflection_commands.html. - - - - - Serializes the command. - - - The serialize command. - - - - - Deserializes the specified response text pairs. - - The response. - - The deserialized response. - - - - - Print a list of decoder plugins, followed by their supported suffixes and MIME types. - https://www.musicpd.org/doc/protocol/reflection_commands.html. - - - - - Serializes the command. - - - The serialize command. - - - - - Deserializes the specified response text pairs. - - The response. - - The deserialized response. - - - - - Shows a list of available song metadata. - https://www.musicpd.org/doc/protocol/reflection_commands.html. - - - - - Serializes the command. - - - The serialize command. - - - - - Deserializes the specified response text pairs. - - The response. - - The deserialized response. - - - - - Gets a list of available URL handlers. - https://www.musicpd.org/doc/protocol/reflection_commands.html. - - - - - Serializes the command. - - - The serialize command. - - - - - Deserializes the specified response text pairs. - - The response. - - The deserialized response. - - - - - Gets the current song. - https://www.musicpd.org/doc/protocol/command_reference.html#status_commands. - - - - - Serializes the command. - - - The serialize command. - - - - - Deserializes the specified response text pairs. - - The response. - - The deserialized response. - - - - - Idles mpd until something happens. - https://www.musicpd.org/doc/protocol/command_reference.html#status_commands. - - - - - Initializes a new instance of the class. - - The sub system. - - - - Serializes the command. - - - The serialize command. - - - - - Deserializes the specified response text pairs. - - The response. - - The deserialized response. - - - - - Cancels idle command. - https://www.musicpd.org/doc/protocol/command_reference.html#status_commands. - - - - - Serializes the command. - - - The serialize command. - - - - - Deserializes the specified response text pairs. - - The response. - - The deserialized response. - - - - - Gets the status. - https://www.musicpd.org/doc/protocol/command_reference.html#status_commands. - - - - - Serializes the command. - - - The serialize command. - - - - - Deserializes the specified response text pairs. - - The response. - - The deserialized response. - - - - - Thrown by when the command is null. - - - - - - Exception throw when an empty response is received. - - - - - - Initializes a new instance of the class. - - The command. - - - - Exception thrown when there are problems with the . - - - - - - Initializes a new instance of the class. - - The message that describes the error. - - - - Base class for all exceptions. - - - - - - Initializes a new instance of the class. - - The message. - - - - Interface for implementing a MPD command. - - The type of the value. - - - - Serializes the command. - - The serialize command. - - - - Deserializes the specified response text pairs. - - The response. - The deserialized response. - - - - Interface for implementing an MPD connection. - - - - - - Gets the version. - - - - - Connects asynchronously. - - The connect task. - - - - Disconnects asynchronously. - - The disconnect task. - - - - Sends the command asynchronously. - - The response type. - The command selector. - - The send task. - - - - - Interface for implementing an observer for . - - - - - Called when connecting. - - if set to true [is reconnect]. - The connect attempt. - - - - Called when connection is accepted. - - if set to true [is reconnect]. - The connect attempt. - - - - Called when connected. - - if set to true [is reconnect]. - The connect attempt. - The connection information. - - - - Called when sending command. - - The command. - - - - Called when send exception occured. - - The command text. - The send attempt. - The exception. - - - - Called when send is retried. - - The command. - The send attempt. - - - - Called when response is read. - - The response line. - - - - Called when disconnecting. - - if set to true the disconnect was explicitly called. - - - - Called when disconnected. - - if set to true the disconnect was explicitly called. - - - - Implementation of in case of an error. - - The content type. - - - - - Initializes a new instance of the class. - - The exception. - - - - Gets the state. - - - The state. - - - - - Gets the content. - - - The content. - - - - - Interface for implementing MPD message. - - The type of the content. - - - - Gets the request. - - - The request. - - - - - Gets the response. - - - The response. - - - - - Gets a value indicating whether this instance is response valid. - - - true if this instance is response valid; otherwise, false. - - - - - Interface for implementing a MPD request. - - The response content. - - - - Gets the command. - - - The command. - - - - - Represents response to a . - - The type of the content. - - - - Gets the state. - - - The state. - - - - - Gets the content. - - - The content. - - - - - Interface for implementing a MPD response result. - - - - - Gets the status. - - - The status. - - - - - Gets the error message. - - - The error message. - - - - - Gets the MPD error. - - - The MPD error. - - - - - Gets a value indicating whether an error occured. - - - true if error; otherwise, false. - - - - - Gets a value indicating whether this is connected. - - - true if connected; otherwise, false. - - - - - MPD request containing the command. - - The content of the reponse. - - - - - Initializes a new instance of the class. - - The command. - - - - Gets the command. - - - The command. - - - - - Represents a response to a . - - The content type. - - - - - Initializes a new instance of the class. - - The end line. - The content. - if set to true [connected]. - - - - Gets the state. - - - The state. - - - - - Gets the content. - - - The content. - - - - - Keeps the connection to the MPD server and handels the most basic structure of the MPD protocol. - class. - - - - - Initializes a new instance of the class. - - The server. - The MPC connection logger. - - - - Gets the version. - - - - - Connects asynchronously. - - The connect task. - - - - Disconnects asynchronously. - - The disconnect task. - - - - Sends the command asynchronously. - - The response type. - The MPC command. - - The send task. - - - - - Releases unmanaged and - optionally - managed resources. - - - - - The MpdDirectoryListing class contains the response of a MPD server to a list command. - - - - - Initializes a new instance of the class. - - The file. - The directory. - The playlist. - - - - Gets the list of files in the directory. - - - - - Gets the list of subdirectories in the directory. - - - - - Gets the list of playlists in the directory. - - - - - The possible states of the MPD. - - - - - The state of the MPD could not be translated into this enumeration. - - - - - The MPD is playing a track. - - - - - The MPD is not playing a track. - - - - - The playback of the MPD is currently paused. - - - - - The MpdStatistics class contains statistics of the MPD file database. - - - - - Initializes a new instance of the class. - - The number of artists in the MPD database. - The number of albums in the MPD database. - The number of songs in the MPD database. - The time the MPD server is running in seconds. - The number of seconds the MPD played so far. - The total playtime of all songs in the MPD database. - The timestamp of the last MPD database update. - - - - Gets the number of artists in the MPD database. - - - - - Gets the number of albums in the MPD database. - - - - - Gets the number of songs in the MPD database. - - - - - Gets the time the MPD server is running in seconds. - - - - - Gets the number of seconds the MPD played so far. - - - - - Gets the total playtime of all songs in the MPD database. - - - - - Gets the timestamp of the last MPD database update. - - - - - Returns a string representation of the object mainly for debugging purpuse. - - A string representation of the object. - - - - The MpdStatus class contains all values describing the current status of the MPD. - - - - - Initializes a new instance of the class. - - The volume. - if set to true [repeat]. - if set to true [random]. - if set to true [consume]. - if set to true [single]. - The playlist. - Length of the playlist. - The x fade. - The state. - The song. - The song identifier. - The next song. - The next song identifier. - The elapsed. - The duration. - The bitrate. - The audio sample rate. - The audio bits. - The audio channels. - The updating database. - The error. - - - - Gets the current volume of the output. - - - - - Gets a value indicating whether the playlist is repeated after finish. - - - - - Gets a value indicating whether the playlist is played in random order. - - - - - Gets a value indicating whether the playlist is consumed. - - - - - Gets a value indicating whether the playlist only plays a song once when random is enabled. - - - - - Gets the version number of the playlist. - - - - - Gets the length of the playlist. - - - - - Gets the number of seconds crossfaded between song changes. - - - - - Gets the state of the MPD. - - - - - Gets the index of the currently played song in the playlist. - - - - - Gets the id of the song currently played. - - - - - Gets the next song. - - - - - Gets the next song identifier. - - - - - Gets the number of seconds already played of the current song. - - - - - Gets the length of the current song in seconds. - - - - - Gets the bitrate of the current song. - - - - - Gets the audio sample rate of the current song. - - - - - Gets the audio bits of the current song. - - - - - Gets the number of audio channels of the current song. - - - - - Gets the number of the update on the MPD database currently running. - - - - - Gets the error message, if there is an error. - - - - - Returns a string representation of the object maily for debugging purpuses. - - A string representation of the object. - - - - https://www.musicpd.org/doc/protocol/database.html : find {TYPE} {WHAT} [...] [window START:END]. - - - - - Gets the any tag. - - - Any. - - - - - Gets the file tag. - - - The file. - - - - - Gets the base tag. - - - The base. - - - - - Gets the modified since tag. - - - The modified since. - - - - - Interface for representing a tag. - - - - - Gets the value. - - - The value. - - - - - https://www.musicpd.org/doc/protocol/tags.html. - - - - - Gets the artist. - - - The artist. - - - - - Gets the artist sort. - - - The artist sort. - - - - - Gets the album. - - - The album. - - - - - Gets the album sort. - - - The album sort. - - - - - Gets the album artist. - - - The album artist. - - - - - Gets the album artist sort. - - - The album artist sort. - - - - - Gets the title. - - - The title. - - - - - Gets the track. - - - The track. - - - - - Gets the name. - - - The name. - - - - - Gets the genre. - - - The genre. - - - - - Gets the date. - - - The date. - - - - - Gets the composer. - - - The composer. - - - - - Gets the performer. - - - The performer. - - - - - Gets the comment. - - - The comment. - - - - - Gets the disc. - - - The disc. - - - - - Interface for representing MPD files. - - - - - - Gets the time. - - - The time. - - - - - Gets the album. - - - The album. - - - - - Gets the artist. - - - The artist. - - - - - Gets the title. - - - The title. - - - - - Gets the track. - - - The track. - - - - - Gets the name. - - - The name. - - - - - Gets the genre. - - - The genre. - - - - - Gets the date. - - - The date. - - - - - Gets the composer. - - - The composer. - - - - - Gets the performer. - - - The performer. - - - - - Gets the comment. - - - The comment. - - - - - Gets the disc. - - - The disc. - - - - - Gets the position. - - - The position. - - - - - Gets the identifier. - - - The identifier. - - - - - Gets the unknown metadata. - - - The unknown metadata. - - - - - Gets a value indicating whether the MpdFile has the property set. - - - - - Gets a value indicating whether the MpdFile has the property set. - - - - - Gets a value indicating whether the MpdFile has the property set. - - - - - Gets a value indicating whether the MpdFile has the property set. - - - - - Gets a value indicating whether the MpdFile has the property set. - - - - - Gets a value indicating whether the MpdFile has the property set. - - - - - Gets a value indicating whether the MpdFile has the property set. - - - - - Gets a value indicating whether the MpdFile has the property set. - - - - - Gets a value indicating whether the MpdFile has the property set. - - - - - Gets a value indicating whether the MpdFile has the property set. - - - - - Gets a value indicating whether the MpdFile has the property set. - - - - - Gets a value indicating whether the MpdFile has the property set. - - - - - Gets a value indicating whether the MpdFile has the property set. - - - - - Gets a value indicating whether the MpdFile has the property set. - - - - - Interface for representing a MPD file path. - - - - - Gets the path. - - - The path. - - - - - Represents a MPD decoder plugin. - - - - - The empty plugiun. - - - - - Initializes a new instance of the class. - - The name. - - - - Gets the name. - - - The name. - - - - - Gets the suffixes. - - - The suffixes. - - - - - Gets the media types. - - - The media types. - - - - - Represents a MPD directory. - - - - - Initializes a new instance of the class. - - The path. - - - - Gets the path. - - - The path. - - - - - Gets the name. - - - The name. - - - - - Gets the files. - - - The files. - - - - - The MpdFile class contains all meta data for a file of the MPD. - - - - - Gets a value indicating whether the MpdFile has the property set. - - - - - Gets a value indicating whether the MpdFile has the property set. - - - - - Gets a value indicating whether the MpdFile has the property set. - - - - - Gets a value indicating whether the MpdFile has the property set. - - - - - Gets a value indicating whether the MpdFile has the property set. - - - - - Gets a value indicating whether the MpdFile has the property set. - - - - - Gets a value indicating whether the MpdFile has the property set. - - - - - Gets a value indicating whether the MpdFile has the property set. - - - - - Gets a value indicating whether the MpdFile has the property set. - - - - - Gets a value indicating whether the MpdFile has the property set. - - - - - Gets a value indicating whether the MpdFile has the property set. - - - - - Gets a value indicating whether the MpdFile has the property set. - - - - - Gets a value indicating whether the MpdFile has the property set. - - - - - Gets a value indicating whether the MpdFile has the property set. - - - - - Represents a MPD output. - - - - - Initializes a new instance of the class. - - The identifier. - The name. - if set to true [enabled]. - - - - Gets the identifier. - - - The identifier. - - - - - Gets the name. - - - The name. - - - - - Gets a value indicating whether this instance is enabled. - - - true if this instance is enabled; otherwise, false. - - - - - Represents a MPD playlist. - - - - - Initializes a new instance of the class. - - The name. - - - - Gets the name. - - - The name. - - - - - Gets the last modified. - - - The last modified. - - - - diff --git a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/Music/A long name directory with some spaces/Ghost-Sounds.mp3 b/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/Music/A long name directory with some spaces/Ghost-Sounds.mp3 deleted file mode 100644 index ae0a0482..00000000 Binary files a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/Music/A long name directory with some spaces/Ghost-Sounds.mp3 and /dev/null differ diff --git a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/Music/A long name directory with some spaces/Sub Directory Two/short-trouser-pants-zip-closing.mp3 b/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/Music/A long name directory with some spaces/Sub Directory Two/short-trouser-pants-zip-closing.mp3 deleted file mode 100644 index 22c42906..00000000 Binary files a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/Music/A long name directory with some spaces/Sub Directory Two/short-trouser-pants-zip-closing.mp3 and /dev/null differ diff --git a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/Music/A long name directory with some spaces/Sub Directory Two/starting-engine-Ford-Mondeo-Mk-3-diesel.mp3 b/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/Music/A long name directory with some spaces/Sub Directory Two/starting-engine-Ford-Mondeo-Mk-3-diesel.mp3 deleted file mode 100644 index d287fb04..00000000 Binary files a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/Music/A long name directory with some spaces/Sub Directory Two/starting-engine-Ford-Mondeo-Mk-3-diesel.mp3 and /dev/null differ diff --git a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/Music/A long name directory with some spaces/pouring-water-into-mug-of-coffee.mp3 b/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/Music/A long name directory with some spaces/pouring-water-into-mug-of-coffee.mp3 deleted file mode 100644 index 501b9658..00000000 Binary files a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/Music/A long name directory with some spaces/pouring-water-into-mug-of-coffee.mp3 and /dev/null differ diff --git a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/Music/Directory With Spaces/SubDirectory One/central-locking-Ford-Mondeo-Mk-3.mp3 b/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/Music/Directory With Spaces/SubDirectory One/central-locking-Ford-Mondeo-Mk-3.mp3 deleted file mode 100644 index 3150a26b..00000000 Binary files a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/Music/Directory With Spaces/SubDirectory One/central-locking-Ford-Mondeo-Mk-3.mp3 and /dev/null differ diff --git a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/Music/Directory With Spaces/coin-spin-light.mp3 b/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/Music/Directory With Spaces/coin-spin-light.mp3 deleted file mode 100644 index 24e46204..00000000 Binary files a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/Music/Directory With Spaces/coin-spin-light.mp3 and /dev/null differ diff --git a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/Music/Directory With Spaces/finger-snap-click.mp3 b/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/Music/Directory With Spaces/finger-snap-click.mp3 deleted file mode 100644 index 849b21f5..00000000 Binary files a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/Music/Directory With Spaces/finger-snap-click.mp3 and /dev/null differ diff --git a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/Music/Directory/2-Kids-Laughing.mp3 b/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/Music/Directory/2-Kids-Laughing.mp3 deleted file mode 100644 index bec3f832..00000000 Binary files a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/Music/Directory/2-Kids-Laughing.mp3 and /dev/null differ diff --git a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/Music/Directory/ambient-noise-server-room.mp3 b/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/Music/Directory/ambient-noise-server-room.mp3 deleted file mode 100644 index 5d74a105..00000000 Binary files a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/Music/Directory/ambient-noise-server-room.mp3 and /dev/null differ diff --git a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/Music/_My Directory/gas-fire-lighting.mp3 b/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/Music/_My Directory/gas-fire-lighting.mp3 deleted file mode 100644 index d37ac0b3..00000000 Binary files a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/Music/_My Directory/gas-fire-lighting.mp3 and /dev/null differ diff --git a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/Music/teaspoon-stirring-mug-of-coffee.mp3 b/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/Music/teaspoon-stirring-mug-of-coffee.mp3 deleted file mode 100644 index 9c3abb03..00000000 Binary files a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/Music/teaspoon-stirring-mug-of-coffee.mp3 and /dev/null differ diff --git a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/Music/whistle-kettle-boiling.mp3 b/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/Music/whistle-kettle-boiling.mp3 deleted file mode 100644 index 339eb997..00000000 Binary files a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/Music/whistle-kettle-boiling.mp3 and /dev/null differ diff --git a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/Music/wine-glass-double-chink-clink-cheers.mp3 b/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/Music/wine-glass-double-chink-clink-cheers.mp3 deleted file mode 100644 index dc0ed1c4..00000000 Binary files a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/Music/wine-glass-double-chink-clink-cheers.mp3 and /dev/null differ diff --git a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/OpenAL32.dll b/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/OpenAL32.dll deleted file mode 100644 index b6b3f868..00000000 Binary files a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/OpenAL32.dll and /dev/null differ diff --git a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/Playlists/Playlist One.m3u b/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/Playlists/Playlist One.m3u deleted file mode 100644 index 5ad049f0..00000000 --- a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/Playlists/Playlist One.m3u +++ /dev/null @@ -1,5 +0,0 @@ -teaspoon-stirring-mug-of-coffee.mp3 -whistle-kettle-boiling.mp3 -wine-glass-double-chink-clink-cheers.mp3 -Directory With Spaces/coin-spin-light.mp3 -Directory With Spaces/finger-snap-click.mp3 diff --git a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/Playlists/Playlist Two.m3u b/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/Playlists/Playlist Two.m3u deleted file mode 100644 index c2b2a42b..00000000 --- a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/Playlists/Playlist Two.m3u +++ /dev/null @@ -1,3 +0,0 @@ -A long name directory with some spaces/pouring-water-into-mug-of-coffee.mp3 -A long name directory with some spaces/Sub Directory Two/short-trouser-pants-zip-closing.mp3 -Directory/2-Kids-Laughing.mp3 diff --git a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/Playlists/_My Playlist.m3u b/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/Playlists/_My Playlist.m3u deleted file mode 100644 index f31465e2..00000000 --- a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/Playlists/_My Playlist.m3u +++ /dev/null @@ -1,5 +0,0 @@ -A long name directory with some spaces/Ghost-Sounds.mp3 -Directory/ambient-noise-server-room.mp3 -Directory With Spaces/SubDirectory One/central-locking-Ford-Mondeo-Mk-3.mp3 -_My Directory/gas-fire-lighting.mp3 -A long name directory with some spaces/Sub Directory Two/starting-engine-Ford-Mondeo-Mk-3-diesel.mp3 diff --git a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/StartLocal.bat b/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/StartLocal.bat deleted file mode 100644 index fad9d33d..00000000 --- a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/StartLocal.bat +++ /dev/null @@ -1 +0,0 @@ -mpd.exe mpd.conf -v \ No newline at end of file diff --git a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/mpd.conf b/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/mpd.conf deleted file mode 100644 index 562c229c..00000000 --- a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/mpd.conf +++ /dev/null @@ -1,30 +0,0 @@ -log_file "mpd_log.txt" - -db_file "mpd.db" - -bind_to_address "any" - -music_directory "Music" - -playlist_directory "Playlists" - -port "6600" - -audio_output { - type "null" - name "Enabled output to be disabled" - enabled "true" - mixer_type "none" -} -audio_output { - type "null" - name "Disabled output to be enabled" - enabled "false" - mixer_type "none" -} -audio_output { - type "null" - name "Enabled output to be toggled" - enabled "true" - mixer_type "none" -} diff --git a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/mpd.db b/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/mpd.db deleted file mode 100644 index 98286de0..00000000 --- a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/mpd.db +++ /dev/null @@ -1,163 +0,0 @@ -info_begin -format: 1 -mpd_version: 0.17.4 -fs_charset: cp1252 -tag: Artist -tag: ArtistSort -tag: Album -tag: AlbumArtist -tag: AlbumArtistSort -tag: Title -tag: Track -tag: Name -tag: Genre -tag: Date -tag: Composer -tag: Performer -tag: Disc -tag: MUSICBRAINZ_ARTISTID -tag: MUSICBRAINZ_ALBUMID -tag: MUSICBRAINZ_ALBUMARTISTID -tag: MUSICBRAINZ_TRACKID -info_end -directory: A long name directory with some spaces -mtime: 1482142041 -begin: A long name directory with some spaces -directory: Sub Directory Two -mtime: 1482142041 -begin: A long name directory with some spaces/Sub Directory Two -song_begin: short-trouser-pants-zip-closing.mp3 -Time: 1 -Artist: Geek & Dummy -Title: Sound effect: short trouser pants zip closing -Date: 2013 -Date: 2013 -mtime: 1481623577 -song_end -song_begin: starting-engine-Ford-Mondeo-Mk-3-diesel.mp3 -Time: 6 -Artist: Geek & Dummy -Title: Sound effect: starting engine - Ford Mondeo Mk 3 diesel -Album: Geek & Dummy Sound Library -Date: 2014 -Genre: soundfx -mtime: 1481623577 -song_end -end: A long name directory with some spaces/Sub Directory Two -song_begin: pouring-water-into-mug-of-coffee.mp3 -Time: 4 -Artist: Geek & Dummy -Title: Sound effect: pouring water into mug of coffee -Date: 2013 -Date: 2013 -mtime: 1481623577 -song_end -song_begin: Ghost-Sounds.mp3 -Time: 95 -Artist: Geek & Dummy -Title: Sound effect: ghostly haunted house (bells, ghostly laughs & knives sharpened) -Album: Geek & Dummy Sound Library -Date: 2014 -Date: 2014 -Genre: soundfx -mtime: 1481623577 -song_end -end: A long name directory with some spaces -directory: Directory -mtime: 1482142041 -begin: Directory -song_begin: 2-Kids-Laughing.mp3 -Time: 30 -Artist: Geek & Dummy -Title: Sound effect: two kids laughing -Album: Geek & Dummy Sound Library -Date: 2014 -Date: 2014 -Genre: soundfx -mtime: 1481623577 -song_end -song_begin: ambient-noise-server-room.mp3 -Time: 71 -Artist: Geek & Dummy -Title: Sound effect: ambient noise - server room -Album: Geek & Dummy Sound Library -Date: 2014 -Date: 2014 -Genre: soundfx -mtime: 1481623577 -song_end -end: Directory -directory: Directory With Spaces -mtime: 1482142041 -begin: Directory With Spaces -directory: SubDirectory One -mtime: 1482142041 -begin: Directory With Spaces/SubDirectory One -song_begin: central-locking-Ford-Mondeo-Mk-3.mp3 -Time: 5 -Artist: Geek & Dummy -Title: Sound effect: central locking - Ford Mondeo Mk 3 -Album: Geek & Dummy Sound Library -Date: 2014 -Date: 2014 -Genre: soundfx -mtime: 1481623577 -song_end -end: Directory With Spaces/SubDirectory One -song_begin: coin-spin-light.mp3 -Time: 5 -Artist: Geek & Dummy -Title: Sound effect: coin spin (light coin) -Date: 2013 -Date: 2013 -mtime: 1481623577 -song_end -song_begin: finger-snap-click.mp3 -Time: 0 -Artist: Geek & Dummy -Title: Sound effect: finger snap/click -Album: Geek & Dummy Sound Library -Date: 2014 -Date: 2014 -Genre: soundfx -mtime: 1481623577 -song_end -end: Directory With Spaces -directory: _My Directory -mtime: 1482142041 -begin: _My Directory -song_begin: gas-fire-lighting.mp3 -Time: 58 -Artist: Geek & Dummy -Title: Sound effect: gas fire lighting and warming up -Album: Geek & Dummy Sound Library -Date: 2014 -Date: 2014 -Genre: soundfx -mtime: 1481623577 -song_end -end: _My Directory -song_begin: teaspoon-stirring-mug-of-coffee.mp3 -Time: 4 -Artist: Geek & Dummy -Title: Sound effect: teaspoon stirring mug of coffee -Date: 2013 -Date: 2013 -mtime: 1481623577 -song_end -song_begin: whistle-kettle-boiling.mp3 -Time: 36 -Artist: Geek & Dummy -Title: Sound effect: whistle kettle boiling -Date: 2013 -Date: 2013 -mtime: 1481623577 -song_end -song_begin: wine-glass-double-chink-clink-cheers.mp3 -Time: 1 -Artist: Geek & Dummy -Title: Sound effect: wine glass double chink/clink/cheers -Date: 2013 -Date: 2013 -mtime: 1481623577 -song_end diff --git a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/mpd.exe b/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/mpd.exe deleted file mode 100644 index ef013f91..00000000 Binary files a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/mpd.exe and /dev/null differ diff --git a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/mpd_log.txt b/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/mpd_log.txt deleted file mode 100644 index 22fab9f9..00000000 --- a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/mpd_log.txt +++ /dev/null @@ -1,88 +0,0 @@ -Apr 12 14:17 : client: [0] opened from 127.0.0.1:65192 -Apr 12 14:17 : client: [0] expired -Apr 12 14:17 : client: [0] closed -Apr 12 14:17 : client: [1] opened from 127.0.0.1:65193 -Apr 12 14:17 : client: [1] expired -Apr 12 14:17 : client: [1] closed -Apr 12 14:17 : client: [2] opened from 127.0.0.1:65194 -Apr 12 14:17 : client: [2] expired -Apr 12 14:17 : client: [2] closed -Apr 12 14:17 : client: [3] opened from 127.0.0.1:65195 -Apr 12 14:17 : client: [3] expired -Apr 12 14:17 : client: [3] closed -Apr 12 14:18 : client: [4] opened from 127.0.0.1:65196 -Apr 12 14:18 : client: [4] expired -Apr 12 14:18 : client: [4] closed -Apr 12 14:18 : client: [5] opened from 127.0.0.1:65203 -Apr 12 14:18 : client: [5] expired -Apr 12 14:18 : client: [5] closed -Apr 12 14:19 : client: [6] opened from 127.0.0.1:65204 -Apr 12 14:19 : client: [6] process command "stats" -Apr 12 14:19 : client: [6] command returned 0 -Apr 12 14:19 : client: [6] expired -Apr 12 14:19 : client: [6] closed -Apr 12 14:20 : client: [7] opened from 127.0.0.1:65220 -Apr 12 14:20 : client: [7] process command "stats" -Apr 12 14:20 : client: [7] command returned 0 -Apr 12 14:20 : client: [7] expired -Apr 12 14:20 : client: [7] closed -Apr 12 14:20 : client: [8] opened from 127.0.0.1:65221 -Apr 12 14:20 : client: [8] process command "status" -Apr 12 14:20 : client: [8] command returned 0 -Apr 12 14:20 : client: [8] expired -Apr 12 14:20 : client: [8] closed -Apr 12 14:23 : client: [9] opened from 127.0.0.1:65226 -Apr 12 14:23 : client: [9] process command "stats" -Apr 12 14:23 : client: [9] command returned 0 -Apr 12 14:23 : client: [9] expired -Apr 12 14:23 : client: [9] closed -Apr 12 14:23 : client: [10] opened from 127.0.0.1:65227 -Apr 12 14:23 : client: [10] process command "stats" -Apr 12 14:23 : client: [10] command returned 0 -Apr 12 14:23 : client: [10] expired -Apr 12 14:23 : client: [10] closed -Apr 12 14:23 : client: [11] opened from 127.0.0.1:65228 -Apr 12 14:23 : client: [11] process command "stats" -Apr 12 14:23 : client: [11] command returned 0 -Apr 12 14:23 : client: [11] expired -Apr 12 14:23 : client: [11] closed -Apr 12 14:23 : client: [12] opened from 127.0.0.1:65229 -Apr 12 14:23 : client: [12] process command "status" -Apr 12 14:23 : client: [12] command returned 0 -Apr 12 14:23 : client: [12] expired -Apr 12 14:23 : client: [12] closed -Apr 12 14:23 : client: [13] opened from 127.0.0.1:65230 -Apr 12 14:23 : client: [13] process command "stats" -Apr 12 14:23 : client: [13] command returned 0 -Apr 12 14:23 : client: [13] expired -Apr 12 14:23 : client: [13] closed -Apr 12 14:25 : client: [14] opened from 127.0.0.1:65236 -Apr 12 14:25 : client: [14] process command "listplaylists" -Apr 12 14:25 : client: [14] command returned 0 -Apr 12 14:25 : client: [14] expired -Apr 12 14:25 : client: [14] closed -Apr 12 14:28 : client: [15] opened from 127.0.0.1:65383 -Apr 12 14:28 : client: [15] process command "listplaylists" -Apr 12 14:28 : client: [15] command returned 0 -Apr 12 14:28 : client: [15] expired -Apr 12 14:28 : client: [15] closed -Apr 12 14:29 : client: [16] opened from 127.0.0.1:65385 -Apr 12 14:29 : client: [16] process command "listplaylistinfo Playlist One" -Apr 12 14:29 : client: [16] command returned -1 -Apr 12 14:29 : client: [16] expired -Apr 12 14:29 : client: [16] closed -Apr 12 14:29 : client: [17] opened from 127.0.0.1:65386 -Apr 12 14:29 : client: [17] process command "listplaylistinfo "Playlist One"" -Apr 12 14:29 : database: get song: teaspoon-stirring-mug-of-coffee.mp3 -Apr 12 14:29 : database: get song: whistle-kettle-boiling.mp3 -Apr 12 14:29 : database: get song: wine-glass-double-chink-clink-cheers.mp3 -Apr 12 14:29 : database: get song: Directory With Spaces/coin-spin-light.mp3 -Apr 12 14:29 : database: get song: Directory With Spaces/finger-snap-click.mp3 -Apr 12 14:29 : client: [17] command returned 0 -Apr 12 14:29 : client: [17] expired -Apr 12 14:29 : client: [17] closed -Apr 12 14:32 : client: [18] opened from 127.0.0.1:65446 -Apr 12 14:32 : client: [18] process command "statstastats" -Apr 12 14:32 : client: [18] command returned -1 -Apr 12 14:32 : client: [18] process command "stats" -Apr 12 14:3 \ No newline at end of file diff --git a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/openal-info.exe b/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/openal-info.exe deleted file mode 100644 index 0a7b9d8b..00000000 Binary files a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/openal-info.exe and /dev/null differ diff --git a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/winmm-info.exe b/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/winmm-info.exe deleted file mode 100644 index 6bdd7625..00000000 Binary files a/Sources/MpcNET.Test/bin/Release/netcoreapp2.0/Server/winmm-info.exe and /dev/null differ diff --git a/Sources/MpcNET/Commands/Database/AlbumArtCommand.cs b/Sources/MpcNET/Commands/Database/AlbumArtCommand.cs deleted file mode 100644 index 17189130..00000000 --- a/Sources/MpcNET/Commands/Database/AlbumArtCommand.cs +++ /dev/null @@ -1,52 +0,0 @@ -using MpcNET.Types; -using System.Linq; - -namespace MpcNET.Commands.Database -{ - /// - /// Gets the album art for the given song. - /// https://www.musicpd.org/doc/html/protocol.html#the-music-database - /// - public class AlbumArtCommand : IMpcCommand - { - private readonly string path; - private readonly long binaryOffset; - - /// - /// Initializes a new instance of the class. - /// - /// The URI. - /// Binary data offset if needed - public AlbumArtCommand(string path, long offset = 0) - { - this.path = path; - this.binaryOffset = offset; - } - - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() => $"albumart \"{path}\" {binaryOffset}"; - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public MpdBinaryData Deserialize(SerializedResponse response) - { - if (response.ResponseValues.Count == 0) - return null; - - var totalSize = long.Parse(response.ResponseValues.Where(kvp => kvp.Key == "size").Select(kvp => kvp.Value).First()); - var payloadSize = long.Parse(response.ResponseValues.Where(kvp => kvp.Key == "binary").Select(kvp => kvp.Value).First()); - - return new MpdBinaryData(totalSize, payloadSize, response.BinaryData); - } - } -} diff --git a/Sources/MpcNET/Commands/Database/FindAndSearchCommands.cs b/Sources/MpcNET/Commands/Database/FindAndSearchCommands.cs deleted file mode 100644 index 3b2a0211..00000000 --- a/Sources/MpcNET/Commands/Database/FindAndSearchCommands.cs +++ /dev/null @@ -1,207 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Commands.Database -{ - using System.Collections.Generic; - using System.Linq; - using MpcNET.Tags; - using MpcNET.Types; - - /// - /// Finds songs in the database that contain "searchText". - /// Since MPD 0.21, search syntax is now (TAG == 'VALUE'). - /// https://www.musicpd.org/doc/html/protocol.html#filters - /// - public class SearchCommand : BaseFilterCommand - { - /// - /// - /// - public override string CommandName => "search"; - /// - /// - /// - public override string Operand => "contains"; - - /// - /// Initializes a new instance of the class. - /// - /// The tag. - /// The search text. - /// Start of the portion of the results desired - /// End of the portion of the results desired - public SearchCommand(ITag tag, string searchText, int windowStart = -1, int windowEnd = -1) : base(tag, searchText, windowStart, windowEnd) { } - - /// - /// Initializes a new instance of the class. - /// - /// List of key/value filters - /// Start of the portion of the results desired - /// End of the portion of the results desired - public SearchCommand(List> filters, int windowStart = -1, int windowEnd = -1) : base(filters, windowStart, windowEnd) { } - - } - - /// - /// Finds songs in the database that contain "searchText" and adds them to the queue. - /// Since MPD 0.21, search syntax is now (TAG == 'VALUE'). - /// https://www.musicpd.org/doc/html/protocol.html#filters - /// - public class SearchAddCommand : BaseFilterCommand - { - /// - /// - /// - public override string CommandName => "searchadd"; - /// - /// - /// - public override string Operand => "contains"; - - /// - /// Initializes a new instance of the class. - /// - /// The tag. - /// The search text. - /// Start of the portion of the results desired - /// End of the portion of the results desired - public SearchAddCommand(ITag tag, string searchText, int windowStart = -1, int windowEnd = -1) : base(tag, searchText, windowStart, windowEnd) { } - - /// - /// Initializes a new instance of the class. - /// - /// List of key/value filters - /// Start of the portion of the results desired - /// End of the portion of the results desired - public SearchAddCommand(List> filters, int windowStart = -1, int windowEnd = -1) : base(filters, windowStart, windowEnd) { } - - } - - /// - /// Finds songs in the database that is exactly "searchText". - /// Since MPD 0.21, search syntax is now (TAG == 'VALUE'). - /// https://www.musicpd.org/doc/html/protocol.html#filters - /// - public class FindCommand : BaseFilterCommand - { - /// - /// - /// - public override string CommandName => "find"; - /// - /// - /// - public override string Operand => "=="; - - /// - /// Initializes a new instance of the class. - /// - /// The tag. - /// The search text. - /// Start of the portion of the results desired - /// End of the portion of the results desired - public FindCommand(ITag tag, string searchText, int windowStart = -1, int windowEnd = -1) : base(tag, searchText, windowStart, windowEnd) { } - - /// - /// Initializes a new instance of the class. - /// - /// List of key/value filters - /// Start of the portion of the results desired - /// End of the portion of the results desired - public FindCommand(List> filters, int windowStart = -1, int windowEnd = -1) : base(filters, windowStart, windowEnd) { } - - } - - - /// - /// Base class for find/search commands. - /// - public abstract class BaseFilterCommand : IMpcCommand> - { - private readonly List> filters; - private readonly int _start; - private readonly int _end; - - /// - /// Name of the command to use when deserializing - /// - public abstract string CommandName { get; } - /// - /// Operand to use between tags and search text. Can be ==, !=, contains... - /// - public abstract string Operand { get; } - - - /// - /// Initializes a new instance of the class. - /// - /// The tag. - /// The search text. - /// Start of the portion of the results desired - /// End of the portion of the results desired - public BaseFilterCommand(ITag tag, string searchText, int windowStart = -1, int windowEnd = -1) - { - this.filters = new List>(); - this.filters.Add(new KeyValuePair(tag, searchText)); - - _start = windowStart; - _end = windowEnd; - } - - /// - /// Initializes a new instance of the class. - /// - /// List of key/value filters - /// Start of the portion of the results desired - /// End of the portion of the results desired - public BaseFilterCommand(List> filters, int windowStart = -1, int windowEnd = -1) - { - this.filters = filters; - - _start = windowStart; - _end = windowEnd; - } - - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() - { - var cmd = - CommandName + " \"(" + - string.Join(" AND ", - filters.Select(x => $"({x.Key.Value} {Operand} {escape(x.Value)})") - ) + - ")\""; - - if (_start > -1) - { - cmd += $" window {_start}:{_end}"; - } - - return cmd; - } - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public IEnumerable Deserialize(SerializedResponse response) - { - return MpdFile.CreateList(response.ResponseValues); - } - - private string escape(string value) => string.Format("\\\"{0}\\\"", value.Replace("\\", "\\\\\\").Replace("'", "\\\\'").Replace("\"", "\\\\\\\"")); - } - // TODO: rescan -} diff --git a/Sources/MpcNET/Commands/Database/ListAllCommand.cs b/Sources/MpcNET/Commands/Database/ListAllCommand.cs deleted file mode 100644 index ea14f5df..00000000 --- a/Sources/MpcNET/Commands/Database/ListAllCommand.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Commands.Database -{ - using System.Collections.Generic; - using System.Linq; - using MpcNET.Types; - - /// - /// Lists all songs and directories. - /// https://www.musicpd.org/doc/protocol/database.html. - /// - public class ListAllCommand : IMpcCommand> - { - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() => "listall"; - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public IEnumerable Deserialize(SerializedResponse response) - { - var rootDirectory = new List - { - new MpdDirectory("/"), // Add by default the root directory - }; - - foreach (var line in response.ResponseValues) - { - if (line.Key.Equals("file")) - { - rootDirectory.Last().AddFile(line.Value); - } - - if (line.Key.Equals("directory")) - { - rootDirectory.Add(new MpdDirectory(line.Value)); - } - } - - return rootDirectory; - } - } - - // TODO: findadd - // TODO: rescan -} \ No newline at end of file diff --git a/Sources/MpcNET/Commands/Database/ListCommand.cs b/Sources/MpcNET/Commands/Database/ListCommand.cs deleted file mode 100644 index 54edcea6..00000000 --- a/Sources/MpcNET/Commands/Database/ListCommand.cs +++ /dev/null @@ -1,75 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Commands.Database -{ - using System.Collections.Generic; - using System.Linq; - using MpcNET.Tags; - - /// - /// Lists the specified tag. - /// https://www.musicpd.org/doc/protocol/database.html. - /// - public class ListCommand : IMpcCommand> - { - private readonly ITag tag; - private readonly ITag filterTag; - private readonly string filterValue; - - /// - /// Initializes a new instance of the class. - /// - /// The tag. - public ListCommand(ITag tag) - { - this.tag = tag; - } - - /// - /// Initializes a new instance of the class. - /// - /// The tag. - /// The filter tag. - /// Filter value. - public ListCommand(ITag tag, ITag filterTag, string filterValue) - { - this.tag = tag; - this.filterTag = filterTag; - this.filterValue = filterValue; - } - - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() - { - if (this.filterTag == null) - return string.Join(" ", "list", this.tag.Value); - - return string.Join(" ", "list", this.tag.Value, this.filterTag.Value, escape(this.filterValue)); - } - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public List Deserialize(SerializedResponse response) - { - return response.ResponseValues.Select(x => x.Value).ToList(); - } - - private string escape(string value) => string.Format("\"{0}\"", value.Replace("\\", "\\\\").Replace("\"", "\\\"")); - } - - // TODO: rescan -} diff --git a/Sources/MpcNET/Commands/Database/LsInfoCommand.cs b/Sources/MpcNET/Commands/Database/LsInfoCommand.cs deleted file mode 100644 index d69d2389..00000000 --- a/Sources/MpcNET/Commands/Database/LsInfoCommand.cs +++ /dev/null @@ -1,68 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Commands.Database -{ - using System; - using System.Collections.Generic; - using System.Linq; - using MpcNET.Types; - - /// - /// Lists the contents of the directory URI. The response contains records starting with file, directory or playlist, each followed by metadata - /// https://www.musicpd.org/doc/protocol/database.html. - /// - public class LsInfoCommand : IMpcCommand> - { - private readonly string uri; - - /// - /// Initializes a new instance of the class. - /// - /// The uri. - public LsInfoCommand(string uri) - { - this.uri = uri; - } - - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() => $"lsinfo \"{uri}\""; - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public IEnumerable Deserialize(SerializedResponse response) - { - var rootDirectory = new List(); - - foreach (var line in response.ResponseValues) - { - // lsinfo can also return playlists, but this is a deprecated behavior I'm entirely willing to not support. - - if (line.Key.Equals("file")) - { - rootDirectory.Add(new MpdFile(line.Value)); - } - - if (line.Key.Equals("directory")) - { - rootDirectory.Add(new MpdDirectory(line.Value)); - } - } - - return rootDirectory; - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Commands/Database/ReadPictureCommand.cs b/Sources/MpcNET/Commands/Database/ReadPictureCommand.cs deleted file mode 100644 index c93b382e..00000000 --- a/Sources/MpcNET/Commands/Database/ReadPictureCommand.cs +++ /dev/null @@ -1,56 +0,0 @@ -using MpcNET.Types; -using System; -using System.Collections.Generic; -using System.Drawing; -using System.Linq; -using System.Text; - -namespace MpcNET.Commands.Database -{ - /// - /// Gets the album art for the given song, using ID3 metadata. - /// https://www.musicpd.org/doc/html/protocol.html#the-music-database - /// - public class ReadPictureCommand : IMpcCommand - { - private readonly string path; - private readonly long binaryOffset; - - /// - /// Initializes a new instance of the class. - /// - /// The URI. - /// Binary data offset if needed - public ReadPictureCommand(string path, long offset = 0) - { - this.path = path; - this.binaryOffset = offset; - } - - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() => $"readpicture \"{path}\" {binaryOffset}"; - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public MpdBinaryData Deserialize(SerializedResponse response) - { - if (response.ResponseValues.Count == 0) - return null; - - var totalSize = long.Parse(response.ResponseValues.Where(kvp => kvp.Key == "size").Select(kvp => kvp.Value).First()); - var payloadSize = long.Parse(response.ResponseValues.Where(kvp => kvp.Key == "binary").Select(kvp => kvp.Value).First()); - - return new MpdBinaryData(totalSize, payloadSize, response.BinaryData); - } - } -} diff --git a/Sources/MpcNET/Commands/Database/UpdateCommand.cs b/Sources/MpcNET/Commands/Database/UpdateCommand.cs deleted file mode 100644 index 8a9b4a23..00000000 --- a/Sources/MpcNET/Commands/Database/UpdateCommand.cs +++ /dev/null @@ -1,75 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Commands.Database -{ - using System.Collections.Generic; - - /// - /// Updates the specified URI. - /// https://www.musicpd.org/doc/protocol/database.html. - /// - public class UpdateCommand : IMpcCommand - { - private readonly string uri; - - /// - /// Initializes a new instance of the class. - /// - public UpdateCommand() - : this(null) - { - } - - /// - /// Initializes a new instance of the class. - /// - /// The URI. - public UpdateCommand(string uri) - { - this.uri = uri; - } - - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() - { - if (string.IsNullOrEmpty(this.uri)) - { - return "update"; - } - - var newUri = this.uri; - if (this.uri.StartsWith(@"""")) - { - newUri = @"""" + this.uri; - } - - if (this.uri.EndsWith(@"""")) - { - newUri = this.uri + @""""; - } - - return string.Join(" ", "update", newUri); - } - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public string Deserialize(SerializedResponse response) - { - return string.Join(", ", response.ResponseValues); - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Commands/Output/DisableOutputCommand.cs b/Sources/MpcNET/Commands/Output/DisableOutputCommand.cs deleted file mode 100644 index 18394ca3..00000000 --- a/Sources/MpcNET/Commands/Output/DisableOutputCommand.cs +++ /dev/null @@ -1,49 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Commands.Output -{ - using System.Collections.Generic; - - /// - /// Turns an output off. - /// https://www.musicpd.org/doc/protocol/output_commands.html. - /// - public class DisableOutputCommand : IMpcCommand - { - private readonly int outputId; - - /// - /// Initializes a new instance of the class. - /// - /// The output identifier. - public DisableOutputCommand(int outputId) - { - this.outputId = outputId; - } - - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() => string.Join(" ", "disableoutput", this.outputId); - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public string Deserialize(SerializedResponse response) - { - // Response should be empty. - return string.Join(", ", response.ResponseValues); - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Commands/Output/EnableOutputCommand.cs b/Sources/MpcNET/Commands/Output/EnableOutputCommand.cs deleted file mode 100644 index 4164e268..00000000 --- a/Sources/MpcNET/Commands/Output/EnableOutputCommand.cs +++ /dev/null @@ -1,49 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Commands.Output -{ - using System.Collections.Generic; - - /// - /// Turns an output on. - /// https://www.musicpd.org/doc/protocol/output_commands.html. - /// - public class EnableOutputCommand : IMpcCommand - { - private readonly int outputId; - - /// - /// Initializes a new instance of the class. - /// - /// The output identifier. - public EnableOutputCommand(int outputId) - { - this.outputId = outputId; - } - - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() => string.Join(" ", "enableoutput", this.outputId); - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public string Deserialize(SerializedResponse response) - { - // Response should be empty. - return string.Join(", ", response.ResponseValues); - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Commands/Output/OutputsCommand.cs b/Sources/MpcNET/Commands/Output/OutputsCommand.cs deleted file mode 100644 index 625e952c..00000000 --- a/Sources/MpcNET/Commands/Output/OutputsCommand.cs +++ /dev/null @@ -1,54 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Commands.Output -{ - using System.Collections.Generic; - using System.Linq; - using MpcNET.Types; - - /// - /// Shows information about all outputs. - /// https://www.musicpd.org/doc/protocol/output_commands.html. - /// - public class OutputsCommand : IMpcCommand> - { - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() => "outputs"; - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public IEnumerable Deserialize(SerializedResponse response) - { - var result = new List(); - - // Strip out attributes so we can keep parsing the response by blocks of 4 - var strippedResult = response.ResponseValues.Where(kvp => kvp.Key != "attribute").ToList(); - - for (var i = 0; i < strippedResult.Count; i+=4) - { - var outputId = int.Parse(strippedResult[i].Value); - var outputName = strippedResult[i + 1].Value; - var outputPlugin = strippedResult[i + 2].Value; - var outputEnabled = strippedResult[i + 3].Value == "1"; - - result.Add(new MpdOutput(outputId, outputName, outputPlugin, outputEnabled)); - } - - return result; - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Commands/Output/ToggleOutputCommand.cs b/Sources/MpcNET/Commands/Output/ToggleOutputCommand.cs deleted file mode 100644 index 4271cdfb..00000000 --- a/Sources/MpcNET/Commands/Output/ToggleOutputCommand.cs +++ /dev/null @@ -1,48 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Commands.Output -{ - using System.Collections.Generic; - - /// - /// Turns an output on or off, depending on the current state. - /// https://www.musicpd.org/doc/protocol/output_commands.html. - /// - public class ToggleOutputCommand : IMpcCommand - { - private readonly int outputId; - - /// - /// Initializes a new instance of the class. - /// - /// The output identifier. - public ToggleOutputCommand(int outputId) - { - this.outputId = outputId; - } - - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() => string.Join(" ", "toggleoutput", this.outputId); - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public string Deserialize(SerializedResponse response) - { - return string.Join(", ", response.ResponseValues); - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Commands/Playback/NextCommand.cs b/Sources/MpcNET/Commands/Playback/NextCommand.cs deleted file mode 100644 index 456586f1..00000000 --- a/Sources/MpcNET/Commands/Playback/NextCommand.cs +++ /dev/null @@ -1,37 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Commands.Playback -{ - using System.Collections.Generic; - - /// - /// Command to go to next song. - /// https://www.musicpd.org/doc/protocol/playback_commands.html. - /// - public class NextCommand : IMpcCommand - { - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() => string.Join(" ", "next"); - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public string Deserialize(SerializedResponse response) - { - return string.Join(", ", response.ResponseValues); - } - } -} diff --git a/Sources/MpcNET/Commands/Playback/PauseResumeCommand.cs b/Sources/MpcNET/Commands/Playback/PauseResumeCommand.cs deleted file mode 100644 index 1ce047e9..00000000 --- a/Sources/MpcNET/Commands/Playback/PauseResumeCommand.cs +++ /dev/null @@ -1,63 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Commands.Playback -{ - using System.Collections.Generic; - - /// - /// Command to pause or resume. - /// https://www.musicpd.org/doc/protocol/playback_commands.html. - /// - public class PauseResumeCommand : IMpcCommand - { - private readonly string playArgument; - - /// - /// Initializes a new instance of the class. - /// - /// if set to true [pause]. - public PauseResumeCommand(bool pause) - { - this.playArgument = pause ? "1" : "0"; - } - - /// - /// Initializes a new instance of the class. - /// - public PauseResumeCommand() - { - } - - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() - { - if (this.playArgument == null) - { - return string.Join(" ", "pause"); - } - - return string.Join(" ", "pause", this.playArgument); - } - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public string Deserialize(SerializedResponse response) - { - return string.Join(", ", response.ResponseValues); - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Commands/Playback/PlayCommand.cs b/Sources/MpcNET/Commands/Playback/PlayCommand.cs deleted file mode 100644 index 0d6cf4f1..00000000 --- a/Sources/MpcNET/Commands/Playback/PlayCommand.cs +++ /dev/null @@ -1,57 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Commands.Playback -{ - using System; - using System.Collections.Generic; - using MpcNET.Types; - - /// - /// Command to start playback. - /// https://www.musicpd.org/doc/protocol/playback_commands.html. - /// - public class PlayCommand : IMpcCommand - { - private readonly int position; - - /// - /// Initializes a new instance of the class. - /// - /// The position. - public PlayCommand(int position) - { - this.position = position; - if (this.position == MpdFile.NoPos) - { - throw new ArgumentException("PlayCommand requires Position"); - } - } - - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() - { - return string.Join(" ", "play", this.position); - } - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public string Deserialize(SerializedResponse response) - { - return string.Join(", ", response.ResponseValues); - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Commands/Playback/PlayIdCommand.cs b/Sources/MpcNET/Commands/Playback/PlayIdCommand.cs deleted file mode 100644 index 14a75cfd..00000000 --- a/Sources/MpcNET/Commands/Playback/PlayIdCommand.cs +++ /dev/null @@ -1,57 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Commands.Playback -{ - using System; - using System.Collections.Generic; - using MpcNET.Types; - - /// - /// Command to start playback. - /// https://www.musicpd.org/doc/protocol/playback_commands.html. - /// - public class PlayIdCommand : IMpcCommand - { - private readonly int id; - - /// - /// Initializes a new instance of the class. - /// - /// The identifier. - public PlayIdCommand(int id) - { - this.id = id; - if (this.id == MpdFile.NoId) - { - throw new ArgumentException("PlayIdCommand requires Id"); - } - } - - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() - { - return string.Join(" ", "playid", this.id); - } - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public string Deserialize(SerializedResponse response) - { - return string.Join(", ", response.ResponseValues); - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Commands/Playback/PreviousCommand.cs b/Sources/MpcNET/Commands/Playback/PreviousCommand.cs deleted file mode 100644 index 971b3520..00000000 --- a/Sources/MpcNET/Commands/Playback/PreviousCommand.cs +++ /dev/null @@ -1,37 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Commands.Playback -{ - using System.Collections.Generic; - - /// - /// Command to goto previous song. - /// https://www.musicpd.org/doc/protocol/playback_commands.html. - /// - public class PreviousCommand : IMpcCommand - { - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() => string.Join(" ", "previous"); - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public string Deserialize(SerializedResponse response) - { - return string.Join(", ", response.ResponseValues); - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Commands/Playback/RandomCommand.cs b/Sources/MpcNET/Commands/Playback/RandomCommand.cs deleted file mode 100644 index 54e8b9d6..00000000 --- a/Sources/MpcNET/Commands/Playback/RandomCommand.cs +++ /dev/null @@ -1,63 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Commands.Playback -{ - using System.Collections.Generic; - - /// - /// Command to set random state. - /// https://www.musicpd.org/doc/html/protocol.html#playback-options - /// - public class RandomCommand : IMpcCommand - { - private readonly string playArgument; - - /// - /// Initializes a new instance of the class. - /// - /// if set to true [random]. - public RandomCommand(bool random) - { - this.playArgument = random ? "1" : "0"; - } - - /// - /// Initializes a new instance of the class. - /// - public RandomCommand() - { - } - - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() - { - if (this.playArgument == null) - { - return string.Join(" ", "random"); - } - - return string.Join(" ", "random", this.playArgument); - } - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public string Deserialize(SerializedResponse response) - { - return string.Join(", ", response.ResponseValues); - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Commands/Playback/RepeatCommand.cs b/Sources/MpcNET/Commands/Playback/RepeatCommand.cs deleted file mode 100644 index 34903470..00000000 --- a/Sources/MpcNET/Commands/Playback/RepeatCommand.cs +++ /dev/null @@ -1,63 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Commands.Playback -{ - using System.Collections.Generic; - - /// - /// Command to set repeat state. - /// https://www.musicpd.org/doc/html/protocol.html#status_commands - /// - public class RepeatCommand : IMpcCommand - { - private readonly string playArgument; - - /// - /// Initializes a new instance of the class. - /// - /// if set to true [repeat]. - public RepeatCommand(bool repeat) - { - this.playArgument = repeat ? "1" : "0"; - } - - /// - /// Initializes a new instance of the class. - /// - public RepeatCommand() - { - } - - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() - { - if (this.playArgument == null) - { - return string.Join(" ", "repeat"); - } - - return string.Join(" ", "repeat", this.playArgument); - } - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public string Deserialize(SerializedResponse response) - { - return string.Join(", ", response.ResponseValues); - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Commands/Playback/SeekCurCommand.cs b/Sources/MpcNET/Commands/Playback/SeekCurCommand.cs deleted file mode 100644 index 062ead4c..00000000 --- a/Sources/MpcNET/Commands/Playback/SeekCurCommand.cs +++ /dev/null @@ -1,52 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- - -namespace MpcNET.Commands.Playback -{ - using System.Collections.Generic; - - /// - /// Seeks to the position TIME (in seconds; fractions allowed) within the current song. - /// https://www.musicpd.org/doc/html/protocol.html#status_commands - /// - public class SeekCurCommand : IMpcCommand - { - private readonly double time; - - /// - /// Initializes a new instance of the class. - /// - /// The time. - public SeekCurCommand(double time) - { - this.time = time; - } - - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() - { - return string.Join(" ", "seekcur", this.time); - } - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public string Deserialize(SerializedResponse response) - { - return string.Join(", ", response.ResponseValues); - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Commands/Playback/SetVolumeCommand.cs b/Sources/MpcNET/Commands/Playback/SetVolumeCommand.cs deleted file mode 100644 index 8812e117..00000000 --- a/Sources/MpcNET/Commands/Playback/SetVolumeCommand.cs +++ /dev/null @@ -1,52 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- - -namespace MpcNET.Commands.Playback -{ - using System.Collections.Generic; - - /// - /// Command to set volume. - /// https://www.musicpd.org/doc/protocol/playback_commands.html. - /// - public class SetVolumeCommand : IMpcCommand - { - private readonly byte volume; - - /// - /// Initializes a new instance of the class. - /// - /// The volume. - public SetVolumeCommand(byte volume) - { - this.volume = volume; - } - - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() - { - return string.Join(" ", "setvol", this.volume); - } - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public string Deserialize(SerializedResponse response) - { - return string.Join(", ", response.ResponseValues); - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Commands/Playback/SingleCommand.cs b/Sources/MpcNET/Commands/Playback/SingleCommand.cs deleted file mode 100644 index 6b33e07b..00000000 --- a/Sources/MpcNET/Commands/Playback/SingleCommand.cs +++ /dev/null @@ -1,64 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Commands.Playback -{ - using System.Collections.Generic; - - /// - /// Command to set single state. - /// When single is activated, playback is stopped after current song, or song is repeated if the ‘repeat’ mode is enabled. - /// https://www.musicpd.org/doc/html/protocol.html#status_commands - /// - public class SingleCommand : IMpcCommand - { - private readonly string playArgument; - - /// - /// Initializes a new instance of the class. - /// - /// if set to true [single]. - public SingleCommand(bool single) - { - this.playArgument = single ? "1" : "0"; - } - - /// - /// Initializes a new instance of the class. - /// - public SingleCommand() - { - } - - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() - { - if (this.playArgument == null) - { - return string.Join(" ", "single"); - } - - return string.Join(" ", "single", this.playArgument); - } - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public string Deserialize(SerializedResponse response) - { - return string.Join(", ", response.ResponseValues); - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Commands/Playback/StopCommand.cs b/Sources/MpcNET/Commands/Playback/StopCommand.cs deleted file mode 100644 index 0ad0e23f..00000000 --- a/Sources/MpcNET/Commands/Playback/StopCommand.cs +++ /dev/null @@ -1,37 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Commands.Playback -{ - using System.Collections.Generic; - - /// - /// Command to stop playback. - /// https://www.musicpd.org/doc/protocol/playback_commands.html. - /// - public class StopCommand : IMpcCommand - { - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() => string.Join(" ", "stop"); - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public string Deserialize(SerializedResponse response) - { - return string.Join(", ", response.ResponseValues); - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Commands/Playlist/ListPlaylistCommand.cs b/Sources/MpcNET/Commands/Playlist/ListPlaylistCommand.cs deleted file mode 100644 index aaa3a2ca..00000000 --- a/Sources/MpcNET/Commands/Playlist/ListPlaylistCommand.cs +++ /dev/null @@ -1,52 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Commands.Playlist -{ - using System.Collections.Generic; - using System.Linq; - using MpcNET.Types; - - /// - /// Lists the songs in the playlist. - /// https://www.musicpd.org/doc/protocol/playlist_files.html. - /// - public class ListPlaylistCommand : IMpcCommand> - { - private readonly string playlistName; - - /// - /// Initializes a new instance of the class. - /// - /// Name of the playlist. - public ListPlaylistCommand(string playlistName) - { - this.playlistName = playlistName; - } - - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() => string.Join(" ", "listplaylist", $"\"{this.playlistName}\""); - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public IEnumerable Deserialize(SerializedResponse response) - { - var results = response.ResponseValues.Where(line => line.Key.Equals("file")).Select(line => new MpdFile(line.Value)); - - return results; - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Commands/Playlist/ListPlaylistInfoCommand.cs b/Sources/MpcNET/Commands/Playlist/ListPlaylistInfoCommand.cs deleted file mode 100644 index c49296dd..00000000 --- a/Sources/MpcNET/Commands/Playlist/ListPlaylistInfoCommand.cs +++ /dev/null @@ -1,49 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Commands.Playlist -{ - using System.Collections.Generic; - using MpcNET.Types; - - /// - /// Lists the songs with metadata in the playlist. - /// https://www.musicpd.org/doc/protocol/playlist_files.html. - /// - public class ListPlaylistInfoCommand : IMpcCommand> - { - private readonly string playlistName; - - /// - /// Initializes a new instance of the class. - /// - /// Name of the playlist. - public ListPlaylistInfoCommand(string playlistName) - { - this.playlistName = playlistName; - } - - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() => string.Join(" ", "listplaylistinfo", $"\"{this.playlistName}\""); - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public IEnumerable Deserialize(SerializedResponse response) - { - return MpdFile.CreateList(response.ResponseValues); - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Commands/Playlist/ListPlaylistsCommand.cs b/Sources/MpcNET/Commands/Playlist/ListPlaylistsCommand.cs deleted file mode 100644 index 9e2951e0..00000000 --- a/Sources/MpcNET/Commands/Playlist/ListPlaylistsCommand.cs +++ /dev/null @@ -1,53 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Commands.Playlist -{ - using System.Collections.Generic; - using System.Linq; - using MpcNET.Types; - - /// - /// Prints a list of the playlist directory. - /// https://www.musicpd.org/doc/protocol/playlist_files.html. - /// - public class ListPlaylistsCommand : IMpcCommand> - { - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() => "listplaylists"; - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public IEnumerable Deserialize(SerializedResponse response) - { - var result = new List(); - - foreach (var line in response.ResponseValues) - { - if (line.Key.Equals("playlist")) - { - result.Add(new MpdPlaylist(line.Value)); - } - else if (line.Key.Equals("Last-Modified")) - { - result.Last().AddLastModified(line.Value); - } - } - - return result; - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Commands/Playlist/LoadCommand.cs b/Sources/MpcNET/Commands/Playlist/LoadCommand.cs deleted file mode 100644 index af6d2cc8..00000000 --- a/Sources/MpcNET/Commands/Playlist/LoadCommand.cs +++ /dev/null @@ -1,48 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Commands.Playlist -{ - using System.Collections.Generic; - - /// - /// Loads the playlist into the current queue. - /// https://www.musicpd.org/doc/protocol/playlist_files.html. - /// - public class LoadCommand : IMpcCommand - { - private readonly string playlistName; - - /// - /// Initializes a new instance of the class. - /// - /// Name of the playlist. - public LoadCommand(string playlistName) - { - this.playlistName = playlistName; - } - - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() => string.Join(" ", "load", $"\"{this.playlistName}\""); - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public string Deserialize(SerializedResponse response) - { - return string.Join(", ", response.ResponseValues); - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Commands/Playlist/PlaylistAddCommand.cs b/Sources/MpcNET/Commands/Playlist/PlaylistAddCommand.cs deleted file mode 100644 index 2b089ad0..00000000 --- a/Sources/MpcNET/Commands/Playlist/PlaylistAddCommand.cs +++ /dev/null @@ -1,50 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Commands.Playlist -{ - - /// - /// Adds URI to the playlist NAME.m3u. NAME.m3u will be created if it does not exist. - /// https://www.musicpd.org/doc/html/protocol.html#command-load - /// - public class PlaylistAddCommand : IMpcCommand - { - private readonly string playlist; - private readonly string pathUri; - - /// - /// Initializes a new instance of the class. - /// - /// The playlistn name. - /// The path to add. - public PlaylistAddCommand(string playlistName, string uri) - { - this.playlist = playlistName; - this.pathUri = uri; - } - - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() => string.Join(" ", "playlistadd", $"\"{playlist}\"", $"\"{pathUri}\""); - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public string Deserialize(SerializedResponse response) - { - return string.Join(", ", response.ResponseValues); - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Commands/Playlist/PlaylistDeleteCommand.cs b/Sources/MpcNET/Commands/Playlist/PlaylistDeleteCommand.cs deleted file mode 100644 index 944fa460..00000000 --- a/Sources/MpcNET/Commands/Playlist/PlaylistDeleteCommand.cs +++ /dev/null @@ -1,50 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Commands.Playlist -{ - - /// - /// Deletes SONGPOS from the playlist NAME.m3u. - /// https://www.musicpd.org/doc/html/protocol.html#stored-playlists - /// - public class PlaylistDeleteCommand : IMpcCommand - { - private readonly string playlist; - private readonly int songpos; - - /// - /// Initializes a new instance of the class. - /// - /// The playlist name. - /// Position of the song to remove - public PlaylistDeleteCommand(string playlistName, int songpos) - { - this.playlist = playlistName; - this.songpos = songpos; - } - - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() => string.Join(" ", "playlistdelete", $"\"{playlist}\"", songpos); - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public string Deserialize(SerializedResponse response) - { - return string.Join(", ", response.ResponseValues); - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Commands/Playlist/PlaylistMoveCommand.cs b/Sources/MpcNET/Commands/Playlist/PlaylistMoveCommand.cs deleted file mode 100644 index 95f615d2..00000000 --- a/Sources/MpcNET/Commands/Playlist/PlaylistMoveCommand.cs +++ /dev/null @@ -1,53 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Commands.Playlist -{ - - /// - /// Moves the song at position FROM in the playlist NAME.m3u to the position TO. - /// https://www.musicpd.org/doc/html/protocol.html#stored-playlists - /// - public class PlaylistMoveCommand : IMpcCommand - { - private readonly string playlist; - private readonly int from; - private readonly int to; - - /// - /// Initializes a new instance of the class. - /// - /// The playlist name. - /// Position of the song to move - /// New position of the song - public PlaylistMoveCommand(string playlistName, int from, int to) - { - this.playlist = playlistName; - this.from = from; - this.to = to; - } - - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() => string.Join(" ", "playlistmove", $"\"{playlist}\"", from, to); - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public string Deserialize(SerializedResponse response) - { - return string.Join(", ", response.ResponseValues); - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Commands/Playlist/RmCommand.cs b/Sources/MpcNET/Commands/Playlist/RmCommand.cs deleted file mode 100644 index e3542e7d..00000000 --- a/Sources/MpcNET/Commands/Playlist/RmCommand.cs +++ /dev/null @@ -1,48 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Commands.Playlist -{ - using System.Collections.Generic; - - /// - /// Removes the playlist NAME.m3u from the playlist directory. - /// https://www.musicpd.org/doc/html/protocol.html#stored-playlists - /// - public class RmCommand : IMpcCommand - { - private readonly string playlistName; - - /// - /// Initializes a new instance of the class. - /// - /// Name of the playlist. - public RmCommand(string playlistName) - { - this.playlistName = playlistName; - } - - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() => string.Join(" ", "rm", $"\"{this.playlistName}\""); - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public string Deserialize(SerializedResponse response) - { - return string.Join(", ", response.ResponseValues); - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Commands/Playlist/SaveCommand.cs b/Sources/MpcNET/Commands/Playlist/SaveCommand.cs deleted file mode 100644 index f1df9682..00000000 --- a/Sources/MpcNET/Commands/Playlist/SaveCommand.cs +++ /dev/null @@ -1,48 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Commands.Playlist -{ - using System.Collections.Generic; - - /// - /// Saves the queue to NAME.m3u in the playlist directory. - /// https://www.musicpd.org/doc/html/protocol.html#stored-playlists - /// - public class SaveCommand : IMpcCommand - { - private readonly string playlistName; - - /// - /// Initializes a new instance of the class. - /// - /// Name of the playlist. - public SaveCommand(string playlistName) - { - this.playlistName = playlistName; - } - - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() => string.Join(" ", "save", $"\"{this.playlistName}\""); - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public string Deserialize(SerializedResponse response) - { - return string.Join(", ", response.ResponseValues); - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Commands/Queue/AddCommand.cs b/Sources/MpcNET/Commands/Queue/AddCommand.cs deleted file mode 100644 index 5618e7f4..00000000 --- a/Sources/MpcNET/Commands/Queue/AddCommand.cs +++ /dev/null @@ -1,49 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Commands.Queue -{ - using MpcNET; - using System.Collections.Generic; - - /// - /// Adds the file URI to the playlist (directories add recursively). URI can also be a single file. - /// https://www.musicpd.org/doc/protocol/queue.html. - /// - public class AddCommand : IMpcCommand - { - private readonly string uri; - - /// - /// Initializes a new instance of the class. - /// - /// The URI. - public AddCommand(string uri) - { - this.uri = uri; - } - - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() => string.Join(" ", "add", $"\"{uri}\""); - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public string Deserialize(SerializedResponse response) - { - return string.Join(", ", response.ResponseValues); - } - } -} diff --git a/Sources/MpcNET/Commands/Queue/AddIdCommand.cs b/Sources/MpcNET/Commands/Queue/AddIdCommand.cs deleted file mode 100644 index 68ead605..00000000 --- a/Sources/MpcNET/Commands/Queue/AddIdCommand.cs +++ /dev/null @@ -1,49 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Commands.Queue -{ - using MpcNET; - using System.Collections.Generic; - - /// - /// Adds a song to the playlist (non-recursive) and returns the song id. - /// https://www.musicpd.org/doc/protocol/queue.html. - /// - public class AddIdCommand : IMpcCommand - { - private readonly string uri; - - /// - /// Initializes a new instance of the class. - /// - /// The URI. - public AddIdCommand(string uri) - { - this.uri = uri; - } - - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() => string.Join(" ", "addid", $"\"{uri}\""); - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public string Deserialize(SerializedResponse response) - { - return string.Join(", ", response.ResponseValues); - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Commands/Queue/ClearCommand.cs b/Sources/MpcNET/Commands/Queue/ClearCommand.cs deleted file mode 100644 index 80dabe46..00000000 --- a/Sources/MpcNET/Commands/Queue/ClearCommand.cs +++ /dev/null @@ -1,38 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- - -namespace MpcNET.Commands.Queue -{ - using System.Collections.Generic; - - /// - /// Clears the current playlist. - /// https://www.musicpd.org/doc/protocol/queue.html. - /// - public class ClearCommand : IMpcCommand - { - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() => "clear"; - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public string Deserialize(SerializedResponse response) - { - return string.Join(", ", response.ResponseValues); - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Commands/Queue/DeleteCommand.cs b/Sources/MpcNET/Commands/Queue/DeleteCommand.cs deleted file mode 100644 index a7bf3d41..00000000 --- a/Sources/MpcNET/Commands/Queue/DeleteCommand.cs +++ /dev/null @@ -1,49 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Commands.Queue -{ - using MpcNET; - using System.Collections.Generic; - - /// - /// Deletes a song from the playlist. - /// https://www.musicpd.org/doc/protocol/queue.html. - /// - public class DeleteCommand : IMpcCommand - { - private readonly int position; - - /// - /// Initializes a new instance of the class. - /// - /// The position. - public DeleteCommand(int position) - { - this.position = position; - } - - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() => string.Join(" ", "delete", position); - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public string Deserialize(SerializedResponse response) - { - return string.Join(", ", response.ResponseValues); - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Commands/Queue/DeleteIdCommand.cs b/Sources/MpcNET/Commands/Queue/DeleteIdCommand.cs deleted file mode 100644 index a6177101..00000000 --- a/Sources/MpcNET/Commands/Queue/DeleteIdCommand.cs +++ /dev/null @@ -1,49 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Commands.Queue -{ - using MpcNET; - using System.Collections.Generic; - - /// - /// Deletes the song SONGID from the playlist. - /// https://www.musicpd.org/doc/protocol/queue.html. - /// - public class DeleteIdCommand : IMpcCommand - { - private readonly int songId; - - /// - /// Initializes a new instance of the class. - /// - /// The song identifier. - public DeleteIdCommand(int songId) - { - this.songId = songId; - } - - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() => string.Join(" ", "deleteid", songId); - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public string Deserialize(SerializedResponse response) - { - return string.Join(", ", response.ResponseValues); - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Commands/Queue/MoveIdCommand.cs b/Sources/MpcNET/Commands/Queue/MoveIdCommand.cs deleted file mode 100644 index 030bd54f..00000000 --- a/Sources/MpcNET/Commands/Queue/MoveIdCommand.cs +++ /dev/null @@ -1,53 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Commands.Queue -{ - using MpcNET; - using System.Collections.Generic; - - /// - /// Moves the song with FROM (songid) to TO (playlist index) in the playlist. - /// If TO is negative, it is relative to the current song in the playlist (if there is one) - /// https://www.musicpd.org/doc/protocol/queue.html. - /// - public class MoveIdCommand : IMpcCommand - { - private readonly int from; - private readonly int to; - - /// - /// Initializes a new instance of the class. - /// - /// From (songid) - /// To (playlist index) - public MoveIdCommand(int from, int to) - { - this.from = from; - this.to = to; - } - - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() => string.Join(" ", "moveid", from, to); - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public string Deserialize(SerializedResponse response) - { - return string.Join(", ", response.ResponseValues); - } - } -} diff --git a/Sources/MpcNET/Commands/Queue/PlChangesCommand.cs b/Sources/MpcNET/Commands/Queue/PlChangesCommand.cs deleted file mode 100644 index a120f3be..00000000 --- a/Sources/MpcNET/Commands/Queue/PlChangesCommand.cs +++ /dev/null @@ -1,50 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- - -namespace MpcNET.Commands.Queue -{ - using System.Collections.Generic; - using MpcNET.Types; - - /// - /// Displays changed songs currently in the playlist since VERSION. - /// https://www.musicpd.org/doc/html/protocol.html#the-queue. - /// - public class PlChangesCommand : IMpcCommand> - { - private readonly string version; - - /// - /// Initializes a new instance of the class. - /// - /// Version to compare to the current playlist. - public PlChangesCommand(int version = -1) - { - this.version = version.ToString(); - } - - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() => $"plchanges {version}"; - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public IEnumerable Deserialize(SerializedResponse response) - { - return MpdFile.CreateList(response.ResponseValues); - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Commands/Queue/PlaylistCommand.cs b/Sources/MpcNET/Commands/Queue/PlaylistCommand.cs deleted file mode 100644 index ccd84450..00000000 --- a/Sources/MpcNET/Commands/Queue/PlaylistCommand.cs +++ /dev/null @@ -1,42 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- - -namespace MpcNET.Commands.Queue -{ - using System.Collections.Generic; - using System.Linq; - using MpcNET.Types; - - /// - /// Displays the current playlist. - /// https://www.musicpd.org/doc/protocol/queue.html. - /// - public class PlaylistCommand : IMpcCommand> - { - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() => "playlist"; - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public IEnumerable Deserialize(SerializedResponse response) - { - var results = response.ResponseValues.Select(line => MpdFile.Create(line.Value, int.Parse(line.Key))); - - return results; - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Commands/Queue/PlaylistIdCommand.cs b/Sources/MpcNET/Commands/Queue/PlaylistIdCommand.cs deleted file mode 100644 index e229a8c3..00000000 --- a/Sources/MpcNET/Commands/Queue/PlaylistIdCommand.cs +++ /dev/null @@ -1,50 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Commands.Queue -{ - using System.Collections.Generic; - using MpcNET; - using MpcNET.Types; - - /// - /// Displays song ID in the playlist. - /// https://www.musicpd.org/doc/protocol/queue.html. - /// - public class PlaylistIdCommand : IMpcCommand> - { - private readonly int songId; - - /// - /// Initializes a new instance of the class. - /// - /// The song identifier. - public PlaylistIdCommand(int songId) - { - this.songId = songId; - } - - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() => string.Join(" ", "playlistid", songId); - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public IEnumerable Deserialize(SerializedResponse response) - { - return MpdFile.CreateList(response.ResponseValues); - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Commands/Queue/PlaylistInfoCommand.cs b/Sources/MpcNET/Commands/Queue/PlaylistInfoCommand.cs deleted file mode 100644 index 8b4c87b5..00000000 --- a/Sources/MpcNET/Commands/Queue/PlaylistInfoCommand.cs +++ /dev/null @@ -1,39 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- - -namespace MpcNET.Commands.Queue -{ - using System.Collections.Generic; - using MpcNET.Types; - - /// - /// Displays a list of all songs in the playlist. - /// https://www.musicpd.org/doc/protocol/queue.html. - /// - public class PlaylistInfoCommand : IMpcCommand> - { - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() => "playlistinfo"; - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public IEnumerable Deserialize(SerializedResponse response) - { - return MpdFile.CreateList(response.ResponseValues); - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Commands/Reflection/CommandList.cs b/Sources/MpcNET/Commands/Reflection/CommandList.cs deleted file mode 100644 index b2b7f797..00000000 --- a/Sources/MpcNET/Commands/Reflection/CommandList.cs +++ /dev/null @@ -1,74 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Commands.Reflection -{ - using System.Collections.Generic; - using System.Linq; - - /// - /// To facilitate faster adding of files etc. you can pass a list of commands all at once using a command list. - /// The command list begins with command_list_begin or command_list_ok_begin and ends with command_list_end. - /// https://www.musicpd.org/doc/html/protocol.html#command-lists. - /// - public class CommandList : IMpcCommand - { - - private readonly List> commands; - - /// - /// Initializes a new instance of the class. - /// - /// IMpcCommand items to add to the list. - public CommandList(IEnumerable> mpcCommands = null) - { - commands = new List>(); - - if (mpcCommands != null) - AddRange(mpcCommands); - } - - /// - /// Add a command to the list. - /// - /// - public void Add(IMpcCommand c) => commands.Add(c); - - /// - /// Add a range of commands to the list. - /// - /// - public void AddRange(IEnumerable> r) => commands.AddRange(r); - - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() - { - var serializedCommands = commands.Select(c => c.Serialize()).ToList(); - - serializedCommands.Insert(0, "command_list_begin"); - serializedCommands.Add("command_list_end"); - - return string.Join("\n", serializedCommands.ToArray()); - } - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public string Deserialize(SerializedResponse response) - { - return string.Join(", ", response.ResponseValues); - } - } -} diff --git a/Sources/MpcNET/Commands/Reflection/CommandsCommand.cs b/Sources/MpcNET/Commands/Reflection/CommandsCommand.cs deleted file mode 100644 index 95e528a4..00000000 --- a/Sources/MpcNET/Commands/Reflection/CommandsCommand.cs +++ /dev/null @@ -1,41 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Commands.Reflection -{ - using System.Collections.Generic; - using System.Linq; - - /// - /// Shows which commands the current user has access to. - /// config : This command is only permitted to "local" clients (connected via UNIX domain socket). - /// https://www.musicpd.org/doc/protocol/reflection_commands.html. - /// - public class CommandsCommand : IMpcCommand> - { - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() => "commands"; - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public IEnumerable Deserialize(SerializedResponse response) - { - var result = response.ResponseValues.Where(item => item.Key.Equals("command")).Select(item => item.Value); - - return result; - } - } -} diff --git a/Sources/MpcNET/Commands/Reflection/DecodersCommand.cs b/Sources/MpcNET/Commands/Reflection/DecodersCommand.cs deleted file mode 100644 index 6e39b285..00000000 --- a/Sources/MpcNET/Commands/Reflection/DecodersCommand.cs +++ /dev/null @@ -1,64 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Commands.Reflection -{ - using System.Collections.Generic; - using MpcNET.Types; - - /// - /// Print a list of decoder plugins, followed by their supported suffixes and MIME types. - /// https://www.musicpd.org/doc/protocol/reflection_commands.html. - /// - public class DecodersCommand : IMpcCommand> - { - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() => "decoders"; - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public IEnumerable Deserialize(SerializedResponse response) - { - var result = new List(); - - var mpdDecoderPlugin = MpdDecoderPlugin.Empty; - foreach (var line in response.ResponseValues) - { - if (line.Key.Equals("plugin")) - { - if (mpdDecoderPlugin.IsInitialized) - { - result.Add(mpdDecoderPlugin); - } - - mpdDecoderPlugin = new MpdDecoderPlugin(line.Value); - } - - if (line.Key.Equals("suffix") && mpdDecoderPlugin.IsInitialized) - { - mpdDecoderPlugin.AddSuffix(line.Value); - } - - if (line.Key.Equals("mime_type") && mpdDecoderPlugin.IsInitialized) - { - mpdDecoderPlugin.AddMediaType(line.Value); - } - } - - return result; - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Commands/Reflection/PasswordCommand.cs b/Sources/MpcNET/Commands/Reflection/PasswordCommand.cs deleted file mode 100644 index 72905512..00000000 --- a/Sources/MpcNET/Commands/Reflection/PasswordCommand.cs +++ /dev/null @@ -1,53 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Commands.Reflection -{ - using System; - using System.Collections.Generic; - - /// - /// Command to authenticate with a password. - /// https://mpd.readthedocs.io/en/stable/protocol.html#connection-settings. - /// - public class PasswordCommand : IMpcCommand - { - private readonly string _password; - - /// - /// Initializes a new instance of the class. - /// - /// The password. - public PasswordCommand(string pass) - { - _password = pass; - if (_password == "") - { - throw new ArgumentException("Empty string given to PasswordCommand"); - } - } - - /// - /// Serializes the command. - /// - /// - /// The serialized command. - /// - public string Serialize() => string.Join(" ", new[] { "password", _password }); - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public string Deserialize(SerializedResponse response) - { - return string.Join(", ", response.ResponseValues); - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Commands/Reflection/TagTypesCommand.cs b/Sources/MpcNET/Commands/Reflection/TagTypesCommand.cs deleted file mode 100644 index cb543319..00000000 --- a/Sources/MpcNET/Commands/Reflection/TagTypesCommand.cs +++ /dev/null @@ -1,42 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Commands.Reflection -{ - using System.Collections.Generic; - using System.Linq; - - // TODO: notcommands : Shows which commands the current user does not have access to. - - /// - /// Shows a list of available song metadata. - /// https://www.musicpd.org/doc/protocol/reflection_commands.html. - /// - public class TagTypesCommand : IMpcCommand> - { - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() => "tagtypes"; - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public IEnumerable Deserialize(SerializedResponse response) - { - var result = response.ResponseValues.Where(item => item.Key.Equals("tagtype")).Select(item => item.Value); - - return result; - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Commands/Reflection/UrlHandlersCommand.cs b/Sources/MpcNET/Commands/Reflection/UrlHandlersCommand.cs deleted file mode 100644 index bfa16253..00000000 --- a/Sources/MpcNET/Commands/Reflection/UrlHandlersCommand.cs +++ /dev/null @@ -1,40 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Commands.Reflection -{ - using System.Collections.Generic; - using System.Linq; - - /// - /// Gets a list of available URL handlers. - /// https://www.musicpd.org/doc/protocol/reflection_commands.html. - /// - public class UrlHandlersCommand : IMpcCommand> - { - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() => "urlhandlers"; - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public IEnumerable Deserialize(SerializedResponse response) - { - var result = response.ResponseValues.Where(item => item.Key.Equals("handler")).Select(item => item.Value); - - return result; - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Commands/Status/CurrentSongCommand.cs b/Sources/MpcNET/Commands/Status/CurrentSongCommand.cs deleted file mode 100644 index 070a2de0..00000000 --- a/Sources/MpcNET/Commands/Status/CurrentSongCommand.cs +++ /dev/null @@ -1,38 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Commands.Status -{ - using System.Collections.Generic; - using MpcNET.Types; - - /// - /// Gets the current song. - /// https://www.musicpd.org/doc/protocol/command_reference.html#status_commands. - /// - public class CurrentSongCommand : IMpcCommand - { - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() => "currentsong"; - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public IMpdFile Deserialize(SerializedResponse response) - { - return MpdFile.Create(response.ResponseValues, 0).mpdFile; - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Commands/Status/IdleCommand.cs b/Sources/MpcNET/Commands/Status/IdleCommand.cs deleted file mode 100644 index f1082dbf..00000000 --- a/Sources/MpcNET/Commands/Status/IdleCommand.cs +++ /dev/null @@ -1,56 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Commands.Status -{ - using System.Collections.Generic; - - /// - /// Idles mpd until something happens. - /// https://www.musicpd.org/doc/protocol/command_reference.html#status_commands. - /// - public class IdleCommand : IMpcCommand - { - private readonly string subSystem; - - /// - /// Initializes a new instance of the class. - /// - /// The sub system. - public IdleCommand(string subSystem) - { - this.subSystem = subSystem; - } - - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() - { - if (string.IsNullOrEmpty(this.subSystem)) - { - return "idle"; - } - - return "idle " + this.subSystem; - } - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public string Deserialize(SerializedResponse response) - { - return string.Join(", ", response.ResponseValues); - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Commands/Status/NoIdleCommand.cs b/Sources/MpcNET/Commands/Status/NoIdleCommand.cs deleted file mode 100644 index 0d520c39..00000000 --- a/Sources/MpcNET/Commands/Status/NoIdleCommand.cs +++ /dev/null @@ -1,35 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Commands.Status -{ - /// - /// Cancels idle command. - /// https://www.musicpd.org/doc/protocol/command_reference.html#status_commands. - /// - public class NoIdleCommand : IMpcCommand - { - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() => "noidle"; - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public string Deserialize(SerializedResponse response) - { - return string.Join(", ", response.ResponseValues); - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Commands/Status/StatsCommand.cs b/Sources/MpcNET/Commands/Status/StatsCommand.cs deleted file mode 100644 index 8d1cfb12..00000000 --- a/Sources/MpcNET/Commands/Status/StatsCommand.cs +++ /dev/null @@ -1,51 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Commands.Status -{ - using System.Collections.Generic; - - /// - /// Get stats from the daemon. - /// https://www.musicpd.org/doc/protocol/command_reference.html#status_commands. - /// - public class StatsCommand : IMpcCommand> - { - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() => "stats"; - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public Dictionary Deserialize(SerializedResponse response) - { - var result = new Dictionary(); - - foreach (var pair in response.ResponseValues) - { - // If a similar key has already been added to the result dictionary, add a ' to this second one so it can still be passed through. - // (It probably won't be used though...) - var key = pair.Key; - while (result.ContainsKey(key)) - { - key = key + "'"; - } - - result.Add(key, pair.Value); - } - return result; - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Commands/Status/StatusCommand.cs b/Sources/MpcNET/Commands/Status/StatusCommand.cs deleted file mode 100644 index 02b26748..00000000 --- a/Sources/MpcNET/Commands/Status/StatusCommand.cs +++ /dev/null @@ -1,190 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Commands.Status -{ - using System; - using System.Collections.Generic; - using System.Diagnostics; - - /// - /// Gets the status. - /// https://www.musicpd.org/doc/protocol/command_reference.html#status_commands. - /// - public class StatusCommand : IMpcCommand - { - private const string VolumeText = "volume"; - private const string RepeatText = "repeat"; - private const string RandomText = "random"; - private const string SingleText = "single"; - private const string ConsumeText = "consume"; - private const string PlaylistText = "playlist"; - private const string PlaylistlengthText = "playlistlength"; - private const string SongText = "song"; - private const string SongidText = "songid"; - private const string NextsongText = "nextsong"; - private const string NextsongidText = "nextsongid"; - private const string BitrateText = "bitrate"; - private const string AudioText = "audio"; - private const string XfadeText = "xfade"; - private const string StateText = "state"; - private const string TimeText = "time"; - private const string ElapsedText = "elapsed"; - private const string DurationText = "duration"; - private const string MixrampDbText = "mixrampdb"; - private const string UpdatingDbText = "updating_db"; - private const string PartitionText = "partition"; - - /// - /// Serializes the command. - /// - /// - /// The serialize command. - /// - public string Serialize() => "status"; - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// - /// The deserialized response. - /// - public MpdStatus Deserialize(SerializedResponse response) - { - int volume = -1; - bool repeat = false; - bool random = false; - bool single = false; - bool consume = false; - int playlist = -1; - int playlistLength = 0; - int playlistSong = -1; - int playlistSongId = -1; - int playlistNextSong = -1; - int playlistNextSongId = -1; - int bitrate = 0; - int audioSampleRate = -1; - int audioBits = -1; - int audioChannels = -1; - int crossfade = -1; - MpdState mpdState = MpdState.Unknown; - TimeSpan elapsed; - TimeSpan duration; - double mixrampDb = -1; - int updatingDb = -1; - string partition = string.Empty; - string error = string.Empty; - foreach (var keyValuePair in response.ResponseValues) - { - var value = keyValuePair.Value; - switch (keyValuePair.Key) - { - case VolumeText: - int.TryParse(value, out volume); - break; - case RepeatText: - repeat = value == "1"; - break; - case RandomText: - random = value == "1"; - break; - case SingleText: - single = value == "1"; - break; - case ConsumeText: - consume = value == "1"; - break; - case PlaylistText: - int.TryParse(value, out playlist); - break; - case PlaylistlengthText: - int.TryParse(value, out playlistLength); - break; - case SongText: - int.TryParse(value, out playlistSong); - break; - case SongidText: - int.TryParse(value, out playlistSongId); - break; - case NextsongText: - int.TryParse(value, out playlistNextSong); - break; - case NextsongidText: - int.TryParse(value, out playlistNextSongId); - break; - case BitrateText: - int.TryParse(value, out bitrate); - break; - case AudioText: - var audioFormat = value.Split(':'); - int.TryParse(audioFormat[0], out audioSampleRate); - int.TryParse(audioFormat[1], out audioBits); - int.TryParse(audioFormat[2], out audioChannels); - break; - case XfadeText: - int.TryParse(value, out crossfade); - break; - case StateText: - Enum.TryParse(value, true, out mpdState); - break; - case ElapsedText: - elapsed = ParseTime(value); - break; - case TimeText: - break; - case DurationText: - duration = ParseTime(value); - break; - case MixrampDbText: - double.TryParse(value, out mixrampDb); - break; - case UpdatingDbText: - int.TryParse(value, out updatingDb); - break; - case PartitionText: - partition = value; - break; - default: - Debug.WriteLine($"Unprocessed status: {keyValuePair.Key} - {keyValuePair.Value}"); - break; - } - } - - return new MpdStatus( - volume, - repeat, - random, - consume, - single, - playlist, - playlistLength, - crossfade, - mpdState, - playlistSong, - playlistSongId, - playlistNextSong, - playlistNextSongId, - elapsed, - duration, - bitrate, - audioSampleRate, - audioBits, - audioChannels, - updatingDb, - partition, - error); - } - - private static TimeSpan ParseTime(string value) - { - var timeParts = value.Split(new[] { '.' }, 2); - int.TryParse(timeParts[0], out var seconds); - int.TryParse(timeParts[1], out var milliseconds); - return TimeSpan.FromSeconds(seconds) + TimeSpan.FromMilliseconds(milliseconds); - } - } -} diff --git a/Sources/MpcNET/Constants.cs b/Sources/MpcNET/Constants.cs deleted file mode 100644 index 31546b8d..00000000 --- a/Sources/MpcNET/Constants.cs +++ /dev/null @@ -1,26 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -using System.Text; - -namespace MpcNET -{ - internal class Constants - { - public static readonly string Ok = "OK"; - - public static readonly string Ack = "ACK"; - - public static readonly string Binary = "binary: "; - - public static readonly string FirstLinePrefix = "OK MPD "; - - /// - /// Encoding used when reading server responses. - /// - public static readonly Encoding Encoding = new UTF8Encoding(); - } -} diff --git a/Sources/MpcNET/Exceptions/CommandNullException.cs b/Sources/MpcNET/Exceptions/CommandNullException.cs deleted file mode 100644 index 6714355f..00000000 --- a/Sources/MpcNET/Exceptions/CommandNullException.cs +++ /dev/null @@ -1,20 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Exceptions -{ - /// - /// Thrown by when the command is null. - /// - /// - public class CommandNullException : MpcException - { - internal CommandNullException() - : base("No command was specified") - { - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Exceptions/EmptyResponseException.cs b/Sources/MpcNET/Exceptions/EmptyResponseException.cs deleted file mode 100644 index 1eba2183..00000000 --- a/Sources/MpcNET/Exceptions/EmptyResponseException.cs +++ /dev/null @@ -1,26 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Exceptions -{ - using System; - - /// - /// Exception throw when an empty response is received. - /// - /// - public class EmptyResponseException : MpcException - { - /// - /// Initializes a new instance of the class. - /// - /// The command. - public EmptyResponseException(string command) - : base($"The command: {command} returned no response") - { - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Exceptions/MpcConnectException.cs b/Sources/MpcNET/Exceptions/MpcConnectException.cs deleted file mode 100644 index fbd4a247..00000000 --- a/Sources/MpcNET/Exceptions/MpcConnectException.cs +++ /dev/null @@ -1,26 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Exceptions -{ - using System; - - /// - /// Exception thrown when there are problems with the . - /// - /// - public class MpcConnectException : MpcException - { - /// - /// Initializes a new instance of the class. - /// - /// The message that describes the error. - public MpcConnectException(string message) - : base(message) - { - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Exceptions/MpcException.cs b/Sources/MpcNET/Exceptions/MpcException.cs deleted file mode 100644 index 4c6991f7..00000000 --- a/Sources/MpcNET/Exceptions/MpcException.cs +++ /dev/null @@ -1,26 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Exceptions -{ - using System; - - /// - /// Base class for all exceptions. - /// - /// - public class MpcException : Exception - { - /// - /// Initializes a new instance of the class. - /// - /// The message. - public MpcException(string message) - : base(message) - { - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/IMpcCommand.cs b/Sources/MpcNET/IMpcCommand.cs deleted file mode 100644 index b26da089..00000000 --- a/Sources/MpcNET/IMpcCommand.cs +++ /dev/null @@ -1,30 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET -{ - using System.Collections.Generic; - - /// - /// Interface for implementing a MPD command. - /// - /// The type of the value. - public interface IMpcCommand - { - /// - /// Serializes the command. - /// - /// The serialize command. - string Serialize(); - - /// - /// Deserializes the specified response text pairs. - /// - /// The response. - /// The deserialized response. - TValue Deserialize(SerializedResponse response); - } -} \ No newline at end of file diff --git a/Sources/MpcNET/IMpcConnection.cs b/Sources/MpcNET/IMpcConnection.cs deleted file mode 100644 index 2fd9df86..00000000 --- a/Sources/MpcNET/IMpcConnection.cs +++ /dev/null @@ -1,48 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- - -namespace MpcNET -{ - using System; - using System.Threading; - using System.Threading.Tasks; - using MpcNET.Message; - - /// - /// Interface for implementing an MPD connection. - /// - /// - public interface IMpcConnection : IDisposable - { - /// - /// Gets the version. - /// - string Version { get; } - - /// - /// Connects asynchronously. - /// - /// The connect task. - Task ConnectAsync(CancellationToken token); - - /// - /// Disconnects asynchronously. - /// - /// The disconnect task. - Task DisconnectAsync(); - - /// - /// Sends the command asynchronously. - /// - /// The response type. - /// The command selector. - /// - /// The send task. - /// - Task> SendAsync(IMpcCommand mpcCommand); - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Message/ErrorMpdMessage.cs b/Sources/MpcNET/Message/ErrorMpdMessage.cs deleted file mode 100644 index 7cdd4a45..00000000 --- a/Sources/MpcNET/Message/ErrorMpdMessage.cs +++ /dev/null @@ -1,25 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Message -{ - internal class ErrorMpdMessage : IMpdMessage - { - public ErrorMpdMessage(IMpcCommand command, ErrorMpdResponse errorResponse) - { - this.Request = new MpdRequest(command); - this.Response = errorResponse; - } - - public IMpdRequest Request { get; } - - public IMpdResponse Response { get; } - - public bool IsResponseValid => false; - - public override string ToString() => Response.Result.ErrorMessage; - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Message/ErrorMpdResponse.cs b/Sources/MpcNET/Message/ErrorMpdResponse.cs deleted file mode 100644 index 287885d8..00000000 --- a/Sources/MpcNET/Message/ErrorMpdResponse.cs +++ /dev/null @@ -1,44 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Message -{ - using System; - - /// - /// Implementation of in case of an error. - /// - /// The content type. - /// - public class ErrorMpdResponse : IMpdResponse - { - /// - /// Initializes a new instance of the class. - /// - /// The exception. - public ErrorMpdResponse(Exception exception) - { - this.Result = new MpdResponseResult(null, false, exception); - this.Content = default(TContent); - } - - /// - /// Gets the state. - /// - /// - /// The state. - /// - public IMpdResponseResult Result { get; } - - /// - /// Gets the content. - /// - /// - /// The content. - /// - public TContent Content { get; } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Message/IMpdMessage.cs b/Sources/MpcNET/Message/IMpdMessage.cs deleted file mode 100644 index c7b044bd..00000000 --- a/Sources/MpcNET/Message/IMpdMessage.cs +++ /dev/null @@ -1,39 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Message -{ - /// - /// Interface for implementing MPD message. - /// - /// The type of the content. - public interface IMpdMessage - { - /// - /// Gets the request. - /// - /// - /// The request. - /// - IMpdRequest Request { get; } - - /// - /// Gets the response. - /// - /// - /// The response. - /// - IMpdResponse Response { get; } - - /// - /// Gets a value indicating whether this instance is response valid. - /// - /// - /// true if this instance is response valid; otherwise, false. - /// - bool IsResponseValid { get; } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Message/IMpdRequest.cs b/Sources/MpcNET/Message/IMpdRequest.cs deleted file mode 100644 index dd5ca7e9..00000000 --- a/Sources/MpcNET/Message/IMpdRequest.cs +++ /dev/null @@ -1,23 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Message -{ - /// - /// Interface for implementing a MPD request. - /// - /// The response content. - public interface IMpdRequest - { - /// - /// Gets the command. - /// - /// - /// The command. - /// - IMpcCommand Command { get; } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Message/IMpdResponse.cs b/Sources/MpcNET/Message/IMpdResponse.cs deleted file mode 100644 index 24e6c2e1..00000000 --- a/Sources/MpcNET/Message/IMpdResponse.cs +++ /dev/null @@ -1,31 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Message -{ - /// - /// Represents response to a . - /// - /// The type of the content. - public interface IMpdResponse - { - /// - /// Gets the state. - /// - /// - /// The state. - /// - IMpdResponseResult Result { get; } - - /// - /// Gets the content. - /// - /// - /// The content. - /// - TContent Content { get; } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Message/IMpdResponseResult.cs b/Sources/MpcNET/Message/IMpdResponseResult.cs deleted file mode 100644 index 244f8e73..00000000 --- a/Sources/MpcNET/Message/IMpdResponseResult.cs +++ /dev/null @@ -1,54 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Message -{ - /// - /// Interface for implementing a MPD response result. - /// - public interface IMpdResponseResult - { - /// - /// Gets the status. - /// - /// - /// The status. - /// - string Status { get; } - - /// - /// Gets the error message. - /// - /// - /// The error message. - /// - string ErrorMessage { get; } - - /// - /// Gets the MPD error. - /// - /// - /// The MPD error. - /// - string MpdError { get; } - - /// - /// Gets a value indicating whether an error occured. - /// - /// - /// true if error; otherwise, false. - /// - bool Error { get; } - - /// - /// Gets a value indicating whether this is connected. - /// - /// - /// true if connected; otherwise, false. - /// - bool Connected { get; } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Message/MpdMessage.cs b/Sources/MpcNET/Message/MpdMessage.cs deleted file mode 100644 index 2c55537e..00000000 --- a/Sources/MpcNET/Message/MpdMessage.cs +++ /dev/null @@ -1,68 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Message -{ - using System.Collections.Generic; - using System.Linq; - using System.Text.RegularExpressions; - using Newtonsoft.Json; - - internal class MpdMessage : IMpdMessage - { - private readonly Regex linePattern = new Regex(@"^(?[\w-]*):[ ]{0,1}(?.*)$"); - private readonly IList fullResponse; - private readonly byte[] binaryData; - - public MpdMessage(IMpcCommand command, bool connected, IReadOnlyCollection response, byte[] binaryData) - { - this.Request = new MpdRequest(command); - - this.binaryData = binaryData; - var endLine = response.Skip(response.Count - 1).Single(); - this.fullResponse = response.Take(response.Count - 1).ToList(); - - var values = this.Request.Command.Deserialize(this.GetValuesFromResponse()); - this.Response = new MpdResponse(endLine, values, connected); - } - - public IMpdRequest Request { get; } - - public IMpdResponse Response { get; } - - public bool IsResponseValid => this.Response != null && this.Response.Result.Status == "OK"; - - public override string ToString() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - private SerializedResponse GetValuesFromResponse() - { - var result = new List>(); - - foreach (var line in this.fullResponse) - { - var match = this.linePattern.Match(line); - if (match.Success) - { - var mpdKey = match.Result("${key}"); - if (!string.IsNullOrEmpty(mpdKey)) - { - var mpdValue = match.Result("${value}"); - if (!string.IsNullOrEmpty(mpdValue)) - { - result.Add(new KeyValuePair(mpdKey, mpdValue)); - } - - } - } - } - - return new SerializedResponse { ResponseValues = result, BinaryData = binaryData }; - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Message/MpdRequest.cs b/Sources/MpcNET/Message/MpdRequest.cs deleted file mode 100644 index 98ec4a18..00000000 --- a/Sources/MpcNET/Message/MpdRequest.cs +++ /dev/null @@ -1,33 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Message -{ - /// - /// MPD request containing the command. - /// - /// The content of the reponse. - /// - public class MpdRequest : IMpdRequest - { - /// - /// Initializes a new instance of the class. - /// - /// The command. - public MpdRequest(IMpcCommand command) - { - this.Command = command; - } - - /// - /// Gets the command. - /// - /// - /// The command. - /// - public IMpcCommand Command { get; } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Message/MpdResponse.cs b/Sources/MpcNET/Message/MpdResponse.cs deleted file mode 100644 index 41b8e007..00000000 --- a/Sources/MpcNET/Message/MpdResponse.cs +++ /dev/null @@ -1,44 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Message -{ - /// - /// Represents a response to a . - /// - /// The content type. - /// - public class MpdResponse : IMpdResponse - { - /// - /// Initializes a new instance of the class. - /// - /// The end line. - /// The content. - /// if set to true [connected]. - public MpdResponse(string endLine, TContent content, bool connected) - { - this.Result = new MpdResponseResult(endLine, connected, null); - this.Content = content; - } - - /// - /// Gets the state. - /// - /// - /// The state. - /// - public IMpdResponseResult Result { get; } - - /// - /// Gets the content. - /// - /// - /// The content. - /// - public TContent Content { get; } - } -} diff --git a/Sources/MpcNET/Message/MpdResponseResult.cs b/Sources/MpcNET/Message/MpdResponseResult.cs deleted file mode 100644 index b9ae5fd7..00000000 --- a/Sources/MpcNET/Message/MpdResponseResult.cs +++ /dev/null @@ -1,76 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Message -{ - using System; - using System.Text.RegularExpressions; - - internal class MpdResponseResult : IMpdResponseResult - { - private static readonly Regex ErrorPattern = new Regex("^ACK \\[(?[0-9]*)@(?[0-9]*)] \\{(?[a-z]*)} (?.*)$"); - - private readonly string endLine; - - public MpdResponseResult(string endLine, bool connected, Exception exception) - { - this.endLine = endLine; - this.Connected = connected; - this.Exception = exception; - if (this.Exception != null) - { - this.Status = "EXCEPTION"; - this.ErrorMessage = Exception.ToString(); - } - - if (!string.IsNullOrEmpty(this.endLine)) - { - if (this.endLine.Equals(Constants.Ok)) - { - this.Status = this.endLine; - this.Error = false; - } - else - { - this.ParseErrorResponse(); - } - } - } - - public bool Connected { get; } = false; - - public bool Error { get; } = true; - - public string Status { get; private set; } = "UNKNOWN"; - - public string ErrorMessage { get; private set; } = string.Empty; - - public string MpdError { get; private set; } = string.Empty; - - public Exception Exception { get; } - - private void ParseErrorResponse() - { - this.Status = "ERROR"; - this.MpdError = this.endLine; - - var match = ErrorPattern.Match(this.endLine); - - if (match.Groups.Count != 5) - { - this.ErrorMessage = $"Unexpected response from server: {MpdError}"; - } - else - { - var errorCode = match.Result("${code}"); - var commandListItem = match.Result("${nr}"); - var commandFailed = match.Result("${command}"); - var errorMessage = match.Result("${message}"); - this.ErrorMessage = $"ErrorCode: {errorCode}, CommandListItem: {commandListItem}, CommandFailed: {commandFailed}, ErrorMessage: {errorMessage}"; - } - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/MpcConnection.cs b/Sources/MpcNET/MpcConnection.cs deleted file mode 100644 index aabffaa0..00000000 --- a/Sources/MpcNET/MpcConnection.cs +++ /dev/null @@ -1,315 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET -{ - using System; - using System.Collections.Generic; - using System.IO; - using System.Linq; - using System.Net; - using System.Net.Sockets; - using System.Text; - using System.Threading; - using System.Threading.Tasks; - using MpcNET.Exceptions; - using MpcNET.Message; - using Polly; - - /// - /// Keeps the connection to the MPD server and handels the most basic structure of the MPD protocol. - /// class. - /// - public class MpcConnection : IMpcConnection - { - private readonly Encoding Encoding = new UTF8Encoding(); - private readonly IPEndPoint server; - - private TcpClient tcpClient; - private NetworkStream networkStream; - - /// - /// Initializes a new instance of the class. - /// - /// The server. - public MpcConnection(IPEndPoint server) - { - ClearConnectionFields(); - this.server = server ?? throw new ArgumentNullException("Server IPEndPoint not set.", nameof(server)); - } - - /// - /// Gets the version. - /// - public string Version { get; private set; } - - /// - /// Is this connection active? - /// - public bool IsConnected => tcpClient?.Connected ?? false; - - /// - /// Event emitted when the connection is cut. - /// - public event EventHandler Disconnected; - - /// - /// Connects asynchronously. - /// - /// The connect task. - public async Task ConnectAsync(CancellationToken token = default) - { - if (tcpClient != null) - { - var pingResult = await PingAsync(); - if (pingResult) - { - return; - } - } - - await ReconnectAsync(false, token); - } - - /// - /// Disconnects asynchronously. - /// - /// The disconnect task. - public Task DisconnectAsync() - { - Disconnect(true); - return Task.CompletedTask; - } - - /// - /// Sends the command asynchronously. - /// - /// The response type. - /// The MPC command. - /// - /// The send task. - /// - public async Task> SendAsync(IMpcCommand mpcCommand) - { - if (tcpClient == null) - { - await ReconnectAsync(true).ConfigureAwait(false); - } - - if (mpcCommand == null) - { - throw new CommandNullException(); - } - - IReadOnlyList response = new List(); - byte[] rawResponse = null; - - var commandText = mpcCommand.Serialize(); - - Exception finalException = null; - - // Send the command, retrying three times in case of an exception - for (var i=0; i < 3; i++) - { - try - { - using (var writer = new StreamWriter(networkStream, Encoding, 512, true) { NewLine = "\n" }) - { - await writer.WriteLineAsync(commandText); - await writer.FlushAsync(); - } - - (rawResponse, response) = ReadResponse(commandText); - if (response.Any()) - { - finalException = null; - break; - } - - throw new EmptyResponseException(commandText); - } catch (Exception e) - { - finalException = e; - await ReconnectAsync(true).ConfigureAwait(false); - } - } - - if (finalException != null) - { - try - { - Disconnect(false); - } - catch - { - } - - return new ErrorMpdMessage(mpcCommand, new ErrorMpdResponse(finalException)); - } - - return new MpdMessage(mpcCommand, true, response, rawResponse); - } - - /// - /// Releases unmanaged and - optionally - managed resources. - /// - public void Dispose() - { - Disconnect(true); - } - - private async Task PingAsync() - { - try - { - using (var writer = new StreamWriter(networkStream, Encoding, 512, true) { NewLine = "\n" }) - { - await writer.WriteLineAsync("ping"); - await writer.FlushAsync(); - } - - using (var reader = new StreamReader(networkStream, Encoding, true, 512, true)) - { - var responseLine = await reader.ReadLineAsync(); - return responseLine == "OK"; - } - } - catch (Exception) - { - return false; - } - } - - private async Task ReconnectAsync(bool isReconnect, CancellationToken token = default) - { - var connectResult = await Policy - .Handle() - .RetryAsync(isReconnect ? 0 : 3) - .ExecuteAndCaptureAsync(async (t) => - { - var client = new TcpClient(); - using (t.Register(() => client.Close())) - { - try - { - await client.ConnectAsync(server.Address, server.Port).ConfigureAwait(false); - } - catch (ObjectDisposedException) when (t.IsCancellationRequested) - { - t.ThrowIfCancellationRequested(); - } - } - - if (client.Connected) - { - return client; - } - - return null; - }, token, true).ConfigureAwait(false); - - if (connectResult.Outcome == OutcomeType.Successful && connectResult.Result != null) - { - Disconnect(false); - tcpClient = connectResult.Result; - - networkStream = tcpClient.GetStream(); - using (var reader = new StreamReader(networkStream, Encoding, true, 512, true)) - { - var firstLine = await reader.ReadLineAsync(); - if (firstLine != null && !firstLine.StartsWith(Constants.FirstLinePrefix)) - { - await DisconnectAsync(); - throw new MpcConnectException("Response of mpd does not start with \"" + Constants.FirstLinePrefix + "\"."); - } - - Version = firstLine?.Substring(Constants.FirstLinePrefix.Length); - } - } - else - { - // We couldn't reconnect - Disconnected?.Invoke(this, new EventArgs()); - throw new MpcConnectException(connectResult.FinalException?.Message); - } - } - - private Tuple> ReadResponse(string commandText) - { - var response = new List(); - byte[] binaryResponse = null; - - var reader = new MpdResponseReader(networkStream, Encoding); - MpdResponseReader.NextData nextData; - - string responseLine; - while ((nextData = reader.ReportNextData()) != MpdResponseReader.NextData.Eof) - { - // If the incoming data is binary, read it raw - if (nextData == MpdResponseReader.NextData.BinaryData) - { - // The reader already knows the length of the binary data, so we just tell it to read. - // MPD binary responses usually don't go past 8192 bytes. - byte[] buf = new byte[8192]; - - using (MemoryStream ms = new MemoryStream()) - { - do - { - var bytesRead = reader.ReadBinaryData(buf, 0, buf.Length); - ms.Write(buf, 0, bytesRead); - } while (reader.ReportNextData() == MpdResponseReader.NextData.BinaryData); - - binaryResponse = ms.ToArray(); - } - } - else // else, read string as usual - { - responseLine = reader.ReadString(); - - if (responseLine == null) - { - break; - } - - response.Add(responseLine); - - if (responseLine.Equals(Constants.Ok) || responseLine.StartsWith(Constants.Ack)) - { - // Stop reading the stream - break; - } - - } - - } - - return new Tuple>(binaryResponse, response); - } - - private void Disconnect(bool isExplicitDisconnect) - { - if (tcpClient == null) - { - return; - } - - ClearConnectionFields(); - - if (isExplicitDisconnect) - Disconnected?.Invoke(this, new EventArgs()); - } - - private void ClearConnectionFields() - { - networkStream?.Dispose(); - tcpClient?.Dispose(); - Version = string.Empty; - tcpClient = null; - networkStream = null; - } - } -} diff --git a/Sources/MpcNET/MpcNET.csproj b/Sources/MpcNET/MpcNET.csproj deleted file mode 100644 index 1d64adf7..00000000 --- a/Sources/MpcNET/MpcNET.csproj +++ /dev/null @@ -1,52 +0,0 @@ - - - - netstandard2.0 - MpcNET - MpcNET - false - false - false - MpcNET - 1.0.0 - true - 0.0.1.0 - 0.0.1.0 - Debug;Release;Release-Stable - - - - bin\Debug\netstandard2.0\MpcNET.xml - true - - - - - bin\Release\netstandard2.0\MpcNET.xml - true - - - - - bin\Release\netstandard2.0\MpcNET.xml - true - - local-stable - - - - - - - - - - - - - - - - - - diff --git a/Sources/MpcNET/MpdDirectoryListing.cs b/Sources/MpcNET/MpdDirectoryListing.cs deleted file mode 100644 index d7b8fcd6..00000000 --- a/Sources/MpcNET/MpdDirectoryListing.cs +++ /dev/null @@ -1,46 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET -{ - using System; - using System.Collections.Generic; - using MpcNET.Types; - - /// - /// The MpdDirectoryListing class contains the response of a MPD server to a list command. - /// - public class MpdDirectoryListing - { - /// - /// Initializes a new instance of the class. - /// - /// The file. - /// The directory. - /// The playlist. - public MpdDirectoryListing(List file, List directory, List playlist) - { - this.FileListList = file ?? throw new ArgumentNullException("file"); - this.DirectoryList = directory ?? throw new ArgumentNullException("directory"); - this.PlaylistList = playlist ?? throw new ArgumentNullException("playlist"); - } - - /// - /// Gets the list of files in the directory. - /// - public IReadOnlyList FileListList { get; } - - /// - /// Gets the list of subdirectories in the directory. - /// - public IReadOnlyList DirectoryList { get; } - - /// - /// Gets the list of playlists in the directory. - /// - public IReadOnlyList PlaylistList { get; } - } -} diff --git a/Sources/MpcNET/MpdResponseReader.cs b/Sources/MpcNET/MpdResponseReader.cs deleted file mode 100644 index 8b255a4a..00000000 --- a/Sources/MpcNET/MpdResponseReader.cs +++ /dev/null @@ -1,250 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; - -namespace MpcNET -{ - /// - /// - /// - public class MpdResponseReader : IDisposable - { - /// - /// - /// - public enum NextData - { -#pragma warning disable CS1591 - Unknown, - Eof, - String, - BinaryData -#pragma warning restore CS1591 - } - - /// - /// Length of the binary part of the response. - /// - public int binaryEnd; - - private Stream source; - private Encoding encoding; - private byte[] byteBuffer; - private int bufferOffset; - private int bufferEnd; - private NextData nextData; - private int binaryOffset; - private char[] characterBuffer; - - /// - /// - /// - /// - /// - public MpdResponseReader(Stream source, Encoding encoding) - { - this.source = source; - this.encoding = encoding; - } - - /// - /// - /// - /// - public NextData ReportNextData() - { - if (nextData != NextData.Unknown) - { - return nextData; - } - - if (!PopulateBufferIfNeeded(1)) - { - return (nextData = NextData.Eof); - } - - return (nextData = NextData.String); - } - - /// - /// - /// - /// - public string ReadString() - { - ReportNextData(); - - if (nextData == NextData.Eof) - { - throw new EndOfStreamException(); - } - else if (nextData != NextData.String) - { - throw new InvalidOperationException("Attempt to read non-string data as string"); - } - - if (characterBuffer == null) - { - characterBuffer = new char[4]; - } - - StringBuilder stringBuilder = new StringBuilder(); - Decoder decoder = encoding.GetDecoder(); - - while (nextData == NextData.String) - { - byte b = byteBuffer[bufferOffset]; - - if (b == '\n') - { - // Analyze the obtained string to see if it's a binary data header - if (stringBuilder.ToString().StartsWith(Constants.Binary)) - { - nextData = NextData.BinaryData; - binaryEnd = int.Parse(stringBuilder.ToString().Replace(Constants.Binary, "")); - binaryOffset = 0; - } else - { - nextData = NextData.Unknown; - } - - bufferOffset++; - break; - } - else - { - var decodedChars = decoder.GetChars(byteBuffer, bufferOffset++, 1, characterBuffer, 0); - if (decodedChars == 1) - { - stringBuilder.Append(characterBuffer[0]); - } - else - { - stringBuilder.Append(characterBuffer, 0, decodedChars); - } - - if (bufferOffset == bufferEnd && !PopulateBufferIfNeeded(1)) - { - nextData = NextData.Eof; - break; - } - } - } - - return stringBuilder.ToString(); - } - - /// - /// - /// - /// - /// - /// - /// - public int ReadBinaryData(byte[] buffer, int offset, int count) - { - ReportNextData(); - - if (nextData == NextData.Eof) - { - throw new EndOfStreamException(); - } - else if (nextData != NextData.BinaryData) - { - throw new InvalidOperationException("Attempt to read non-binary data as binary data"); - } - - if (count > binaryEnd - binaryOffset) - { - count = binaryEnd - binaryOffset; - //throw new EndOfStreamException(); - } - - int bytesRead; - - if (bufferOffset < bufferEnd) - { - bytesRead = Math.Min(count, bufferEnd - bufferOffset); - - Array.Copy(byteBuffer, bufferOffset, buffer, offset, bytesRead); - bufferOffset += bytesRead; - } - else if (count < byteBuffer.Length) - { - if (!PopulateBufferIfNeeded(1)) - { - throw new EndOfStreamException(); - } - - bytesRead = Math.Min(count, bufferEnd - bufferOffset); - - Array.Copy(byteBuffer, bufferOffset, buffer, offset, bytesRead); - bufferOffset += bytesRead; - } - else - { - bytesRead = source.Read(buffer, offset, count); - } - - binaryOffset += bytesRead; - - if (binaryOffset == binaryEnd) - { - nextData = NextData.Unknown; - } - - return bytesRead; - } - - private bool PopulateBufferIfNeeded(int minimumBytes) - { - if (byteBuffer == null) - { - byteBuffer = new byte[32768]; - } - - if (bufferEnd - bufferOffset < minimumBytes) - { - int shiftCount = bufferEnd - bufferOffset; - - if (shiftCount > 0) - { - Array.Copy(byteBuffer, bufferOffset, byteBuffer, 0, shiftCount); - } - - bufferOffset = 0; - bufferEnd = shiftCount; - - while (bufferEnd - bufferOffset < minimumBytes) - { - int bytesRead = source.Read(byteBuffer, bufferEnd, byteBuffer.Length - bufferEnd); - - if (bytesRead == 0) - { - return false; - } - - bufferEnd += bytesRead; - } - } - - return true; - } - - /// - /// - /// - public void Dispose() - { - Stream source = this.source; - - this.source = null; - - if (source != null) - { - source.Dispose(); - } - } - } -} diff --git a/Sources/MpcNET/MpdState.cs b/Sources/MpcNET/MpdState.cs deleted file mode 100644 index 6a31a575..00000000 --- a/Sources/MpcNET/MpdState.cs +++ /dev/null @@ -1,34 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET -{ - /// - /// The possible states of the MPD. - /// - public enum MpdState - { - /// - /// The state of the MPD could not be translated into this enumeration. - /// - Unknown, - - /// - /// The MPD is playing a track. - /// - Play, - - /// - /// The MPD is not playing a track. - /// - Stop, - - /// - /// The playback of the MPD is currently paused. - /// - Pause, - } -} \ No newline at end of file diff --git a/Sources/MpcNET/MpdStatistics.cs b/Sources/MpcNET/MpdStatistics.cs deleted file mode 100644 index 2cd643e4..00000000 --- a/Sources/MpcNET/MpdStatistics.cs +++ /dev/null @@ -1,130 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET -{ - using System.Text; - - /// - /// The MpdStatistics class contains statistics of the MPD file database. - /// - public class MpdStatistics - { - private const string ArtistsText = "artists"; - private const string SongsText = "songs"; - private const string UptimeText = "uptime"; - private const string PlaytimeText = "playtime"; - private const string DbPlaytimeText = "db_playtime"; - private const string DbUpdateText = "db_update"; - - /// - /// Initializes a new instance of the class. - /// - /// The number of artists in the MPD database. - /// The number of albums in the MPD database. - /// The number of songs in the MPD database. - /// The time the MPD server is running in seconds. - /// The number of seconds the MPD played so far. - /// The total playtime of all songs in the MPD database. - /// The timestamp of the last MPD database update. - public MpdStatistics( - int artists, - int albums, - int songs, - int uptime, - int playtime, - int dbPlaytime, - long dbUpdate) - { - this.Artists = artists; - this.Albums = albums; - this.Songs = songs; - this.Uptime = uptime; - this.Playtime = playtime; - this.DbPlaytime = dbPlaytime; - this.DbUpdate = dbUpdate; - } - - /// - /// Gets the number of artists in the MPD database. - /// - public int Artists { get; } - - /// - /// Gets the number of albums in the MPD database. - /// - public int Albums { get; } - - /// - /// Gets the number of songs in the MPD database. - /// - public int Songs { get; } - - /// - /// Gets the time the MPD server is running in seconds. - /// - public int Uptime { get; } - - /// - /// Gets the number of seconds the MPD played so far. - /// - public int Playtime { get; } - - /// - /// Gets the total playtime of all songs in the MPD database. - /// - public int DbPlaytime { get; } - - /// - /// Gets the timestamp of the last MPD database update. - /// - public long DbUpdate { get; } - - /// - /// Returns a string representation of the object mainly for debugging purpuse. - /// - /// A string representation of the object. - public override string ToString() - { - var builder = new StringBuilder(); - - AppendInt(builder, ArtistsText, this.Artists); - AppendInt(builder, SongsText, this.Songs); - AppendInt(builder, UptimeText, this.Uptime); - AppendInt(builder, PlaytimeText, this.Playtime); - AppendInt(builder, DbPlaytimeText, this.DbPlaytime); - AppendLong(builder, DbUpdateText, this.DbUpdate); - - return builder.ToString(); - } - - private static void AppendInt(StringBuilder builder, string name, int value) - { - if (value < 0) - { - return; - } - - builder.Append(name); - builder.Append(": "); - builder.Append(value); - builder.AppendLine(); - } - - private static void AppendLong(StringBuilder builder, string name, long value) - { - if (value < 0) - { - return; - } - - builder.Append(name); - builder.Append(": "); - builder.Append(value); - builder.AppendLine(); - } - } -} diff --git a/Sources/MpcNET/MpdStatus.cs b/Sources/MpcNET/MpdStatus.cs deleted file mode 100644 index 31c44402..00000000 --- a/Sources/MpcNET/MpdStatus.cs +++ /dev/null @@ -1,283 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET -{ - using System; - using System.Text; - - /// - /// The MpdStatus class contains all values describing the current status of the MPD. - /// - public class MpdStatus - { - /// - /// Initializes a new instance of the class. - /// - /// The volume. - /// if set to true [repeat]. - /// if set to true [random]. - /// if set to true [consume]. - /// if set to true [single]. - /// The playlist. - /// Length of the playlist. - /// The x fade. - /// The state. - /// The song. - /// The song identifier. - /// The next song. - /// The next song identifier. - /// The elapsed. - /// The duration. - /// The bitrate. - /// The audio sample rate. - /// The audio bits. - /// The audio channels. - /// The updating database. - /// The partition name. - /// The error. - public MpdStatus( - int volume, - bool repeat, - bool random, - bool consume, - bool single, - int playlist, - int playlistLength, - int xFade, - MpdState state, - int song, - int songId, - int nextSong, - int nextSongId, - TimeSpan elapsed, - TimeSpan duration, - int bitrate, - int audioSampleRate, - int audioBits, - int audioChannels, - int updatingDb, - string partition, - string error) - { - Volume = volume; - Repeat = repeat; - Random = random; - Consume = consume; - Single = single; - Playlist = playlist; - PlaylistLength = playlistLength; - XFade = xFade; - State = state; - Song = song; - SongId = songId; - NextSong = nextSong; - NextSongId = nextSongId; - Elapsed = elapsed; - Duration = duration; - Bitrate = bitrate; - AudioSampleRate = audioSampleRate; - AudioBits = audioBits; - AudioChannels = audioChannels; - UpdatingDb = updatingDb; - Partition = partition; - Error = error; - } - - /// - /// Gets the current volume of the output. - /// - public int Volume { get; } - - /// - /// Gets a value indicating whether the playlist is repeated after finish. - /// - public bool Repeat { get; } - - /// - /// Gets a value indicating whether the playlist is played in random order. - /// - public bool Random { get; } - - /// - /// Gets a value indicating whether the playlist is consumed. - /// - public bool Consume { get; } - - /// - /// Gets a value indicating whether the playlist only plays a song once when random is enabled. - /// - public bool Single { get; } - - /// - /// Gets the version number of the playlist. - /// - public int Playlist { get; } - - /// - /// Gets the length of the playlist. - /// - public int PlaylistLength { get; } - - /// - /// Gets the number of seconds crossfaded between song changes. - /// - public int XFade { get; } - - /// - /// Gets the state of the MPD. - /// - public MpdState State { get; } - - /// - /// Gets the index of the currently played song in the playlist. - /// - public int Song { get; } - - /// - /// Gets the id of the song currently played. - /// - public int SongId { get; } - - /// - /// Gets the next song. - /// - public int NextSong { get; } - - /// - /// Gets the next song identifier. - /// - public int NextSongId { get; } - - /// - /// Gets the number of seconds already played of the current song. - /// - public TimeSpan Elapsed { get; } - - /// - /// Gets the length of the current song in seconds. - /// - public TimeSpan Duration { get; } - - /// - /// Gets the bitrate of the current song. - /// - public int Bitrate { get; } - - /// - /// Gets the audio sample rate of the current song. - /// - public int AudioSampleRate { get; } - - /// - /// Gets the audio bits of the current song. - /// - public int AudioBits { get; } - - /// - /// Gets the number of audio channels of the current song. - /// - public int AudioChannels { get; } - - /// - /// Gets the number of the update on the MPD database currently running. - /// - public int UpdatingDb { get; } - - /// - /// Gets the name of the current partition - /// - public string Partition { get; } - - - /// - /// Gets the error message, if there is an error. - /// - public string Error { get; } - - /// - /// Returns a string representation of the object maily for debugging purpuses. - /// - /// A string representation of the object. - public override string ToString() - { - var builder = new StringBuilder(); - - builder.AppendLine($"partition: {Partition}"); - AppendInt(builder, "volume", Volume); - AppendBool(builder, "repeat", Repeat); - AppendBool(builder, "random", Random); - AppendInt(builder, "playlist", Playlist); - AppendInt(builder, "playlistlength", PlaylistLength); - AppendInt(builder, "xfade", XFade); - switch (State) - { - case MpdState.Play: - builder.AppendLine("state: play"); - break; - case MpdState.Pause: - builder.AppendLine("state: pause"); - break; - case MpdState.Stop: - builder.AppendLine("state: stop"); - break; - } - - AppendInt(builder, "song", Song); - AppendInt(builder, "songid", SongId); - if (Elapsed > TimeSpan.Zero || Duration > TimeSpan.Zero) - { - builder.Append("time: "); - builder.Append(Elapsed); - builder.Append(":"); - builder.Append(Duration); - builder.AppendLine(); - } - - AppendInt(builder, "bitrate", Bitrate); - if ((AudioSampleRate >= 0) || (AudioBits >= 0) || (AudioChannels >= 0)) - { - builder.Append("audio: "); - builder.Append(AudioSampleRate); - builder.Append(":"); - builder.Append(AudioBits); - builder.Append(":"); - builder.Append(AudioChannels); - builder.AppendLine(); - } - - AppendInt(builder, "updating_db", UpdatingDb); - if (Error != null) - { - builder.Append("error: "); - builder.AppendLine(Error); - } - - return builder.ToString(); - } - - private static void AppendInt(StringBuilder builder, string name, int value) - { - if (value < 0) - { - return; - } - - builder.Append(name); - builder.Append(": "); - builder.Append(value); - builder.AppendLine(); - } - - private static void AppendBool(StringBuilder builder, string name, bool value) - { - builder.Append(name); - builder.Append(": "); - builder.Append(value ? '1' : '0'); - builder.AppendLine(); - } - } -} diff --git a/Sources/MpcNET/Properties/AssemblyInfo.cs b/Sources/MpcNET/Properties/AssemblyInfo.cs deleted file mode 100644 index 302f1249..00000000 --- a/Sources/MpcNET/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,24 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -using System.Reflection; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("MpcNET")] -[assembly: AssemblyTrademark("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("8994c820-7ba9-4bb8-b9ea-c608b07c4a11")] diff --git a/Sources/MpcNET/SerializedResponse.cs b/Sources/MpcNET/SerializedResponse.cs deleted file mode 100644 index a3792eae..00000000 --- a/Sources/MpcNET/SerializedResponse.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace MpcNET -{ - /// - /// - /// - public class SerializedResponse - { - /// - /// Response values. - /// - public IReadOnlyList> ResponseValues {get; set;} - /// - /// Binary Data that can be present in the response. - /// - public byte[] BinaryData { get; set; } - - } -} diff --git a/Sources/MpcNET/Tags/FindTags.cs b/Sources/MpcNET/Tags/FindTags.cs deleted file mode 100644 index ba11d484..00000000 --- a/Sources/MpcNET/Tags/FindTags.cs +++ /dev/null @@ -1,54 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Tags -{ - /// - /// https://www.musicpd.org/doc/protocol/database.html : find {TYPE} {WHAT} [...] [window START:END]. - /// - public class FindTags - { - /// - /// Gets the any tag. - /// - /// - /// Any. - /// - public static ITag Any { get; } = new Tag("any"); - - /// - /// Gets the file tag. - /// - /// - /// The file. - /// - public static ITag File { get; } = new Tag("file"); - - /// - /// Gets the title tag. - /// - /// - /// The base. - /// - public static ITag Title { get; } = new Tag("title"); - - /// - /// Gets the artist tag. - /// - /// - /// The modified since. - /// - public static ITag Artist { get; } = new Tag("artist"); - - /// - /// Gets the album tag. - /// - /// - /// The base. - /// - public static ITag Album { get; } = new Tag("album"); - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Tags/ITag.cs b/Sources/MpcNET/Tags/ITag.cs deleted file mode 100644 index 4b64c391..00000000 --- a/Sources/MpcNET/Tags/ITag.cs +++ /dev/null @@ -1,22 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Tags -{ - /// - /// Interface for representing a tag. - /// - public interface ITag - { - /// - /// Gets the value. - /// - /// - /// The value. - /// - string Value { get; } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Tags/MpdTags.cs b/Sources/MpcNET/Tags/MpdTags.cs deleted file mode 100644 index d23da0dc..00000000 --- a/Sources/MpcNET/Tags/MpdTags.cs +++ /dev/null @@ -1,134 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Tags -{ - /// - /// https://www.musicpd.org/doc/protocol/tags.html. - /// - public class MpdTags - { - /// - /// Gets the artist. - /// - /// - /// The artist. - /// - public static ITag Artist { get; } = new Tag("artist"); - - /// - /// Gets the artist sort. - /// - /// - /// The artist sort. - /// - public static ITag ArtistSort { get; } = new Tag("artistsort"); - - /// - /// Gets the album. - /// - /// - /// The album. - /// - public static ITag Album { get; } = new Tag("album"); - - /// - /// Gets the album sort. - /// - /// - /// The album sort. - /// - public static ITag AlbumSort { get; } = new Tag("albumsort"); - - /// - /// Gets the album artist. - /// - /// - /// The album artist. - /// - public static ITag AlbumArtist { get; } = new Tag("albumartist"); - - /// - /// Gets the album artist sort. - /// - /// - /// The album artist sort. - /// - public static ITag AlbumArtistSort { get; } = new Tag("albumartistsort"); - - /// - /// Gets the title. - /// - /// - /// The title. - /// - public static ITag Title { get; } = new Tag("title"); - - /// - /// Gets the track. - /// - /// - /// The track. - /// - public static ITag Track { get; } = new Tag("track"); - - /// - /// Gets the name. - /// - /// - /// The name. - /// - public static ITag Name { get; } = new Tag("name"); - - /// - /// Gets the genre. - /// - /// - /// The genre. - /// - public static ITag Genre { get; } = new Tag("genre"); - - /// - /// Gets the date. - /// - /// - /// The date. - /// - public static ITag Date { get; } = new Tag("date"); - - /// - /// Gets the composer. - /// - /// - /// The composer. - /// - public static ITag Composer { get; } = new Tag("composer"); - - /// - /// Gets the performer. - /// - /// - /// The performer. - /// - public static ITag Performer { get; } = new Tag("performer"); - - /// - /// Gets the comment. - /// - /// - /// The comment. - /// - public static ITag Comment { get; } = new Tag("comment"); - - /// - /// Gets the disc. - /// - /// - /// The disc. - /// - public static ITag Disc { get; } = new Tag("disc"); - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Tags/Tag.cs b/Sources/MpcNET/Tags/Tag.cs deleted file mode 100644 index f960476f..00000000 --- a/Sources/MpcNET/Tags/Tag.cs +++ /dev/null @@ -1,18 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Tags -{ - internal class Tag : ITag - { - internal Tag(string value) - { - this.Value = value; - } - - public string Value { get; } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Types/IMpdFile.cs b/Sources/MpcNET/Types/IMpdFile.cs deleted file mode 100644 index 33e0d6a1..00000000 --- a/Sources/MpcNET/Types/IMpdFile.cs +++ /dev/null @@ -1,199 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Types -{ - using System.Collections.Generic; - - /// - /// Interface for representing MPD files. - /// - /// - public interface IMpdFile : IMpdFilePath - { - /// - /// Gets the time. - /// - /// - /// The time. - /// - int Time { get; } - - /// - /// Gets the album. - /// - /// - /// The album. - /// - string Album { get; } - - /// - /// Gets the artist. - /// - /// - /// The artist. - /// - string Artist { get; } - - /// - /// Gets the title. - /// - /// - /// The title. - /// - string Title { get; } - - /// - /// Gets the track. - /// - /// - /// The track. - /// - string Track { get; } - - /// - /// Gets the genre. - /// - /// - /// The genre. - /// - string Genre { get; } - - /// - /// Gets the date. - /// - /// - /// The date. - /// - string Date { get; } - - /// - /// Gets the composer. - /// - /// - /// The composer. - /// - string Composer { get; } - - /// - /// Gets the performer. - /// - /// - /// The performer. - /// - string Performer { get; } - - /// - /// Gets the comment. - /// - /// - /// The comment. - /// - string Comment { get; } - - /// - /// Gets the disc. - /// - /// - /// The disc. - /// - int Disc { get; } - - /// - /// Gets the position. - /// - /// - /// The position. - /// - int Position { get; } - - /// - /// Gets the identifier. - /// - /// - /// The identifier. - /// - int Id { get; } - - /// - /// Gets the unknown metadata. - /// - /// - /// The unknown metadata. - /// - IReadOnlyDictionary UnknownMetadata { get; } - - /// - /// Gets a value indicating whether the MpdFile has the property set. - /// - bool HasTime { get; } - - /// - /// Gets a value indicating whether the MpdFile has the property set. - /// - bool HasAlbum { get; } - - /// - /// Gets a value indicating whether the MpdFile has the property set. - /// - bool HasArtist { get; } - - /// - /// Gets a value indicating whether the MpdFile has the property set. - /// - bool HasTitle { get; } - - /// - /// Gets a value indicating whether the MpdFile has the property set. - /// - bool HasTrack { get; } - - /// - /// Gets a value indicating whether the MpdFile has the property set. - /// - bool HasName { get; } - - /// - /// Gets a value indicating whether the MpdFile has the property set. - /// - bool HasGenre { get; } - - /// - /// Gets a value indicating whether the MpdFile has the property set. - /// - bool HasDate { get; } - - /// - /// Gets a value indicating whether the MpdFile has the property set. - /// - bool HasComposer { get; } - - /// - /// Gets a value indicating whether the MpdFile has the property set. - /// - bool HasPerformer { get; } - - /// - /// Gets a value indicating whether the MpdFile has the property set. - /// - bool HasComment { get; } - - /// - /// Gets a value indicating whether the MpdFile has the property set. - /// - bool HasDisc { get; } - - /// - /// Gets a value indicating whether the MpdFile has the property set. - /// - bool HasPos { get; } - - /// - /// Gets a value indicating whether the MpdFile has the property set. - /// - bool HasId { get; } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Types/IMpdFilePath.cs b/Sources/MpcNET/Types/IMpdFilePath.cs deleted file mode 100644 index 3c5fc713..00000000 --- a/Sources/MpcNET/Types/IMpdFilePath.cs +++ /dev/null @@ -1,30 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Types -{ - /// - /// Interface for representing a MPD file path. - /// - public interface IMpdFilePath - { - /// - /// Gets the path. - /// - /// - /// The path. - /// - string Path { get; } - - /// - /// Gets the name. - /// - /// - /// The name. - /// - string Name { get; } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Types/MpdBinaryData.cs b/Sources/MpcNET/Types/MpdBinaryData.cs deleted file mode 100644 index dfd95457..00000000 --- a/Sources/MpcNET/Types/MpdBinaryData.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace MpcNET.Types -{ - /// - /// - /// - public class MpdBinaryData - { - /// - /// Initializes a new instance of the class. - /// - /// The total size of the binary data requested - /// The size of the data contained in this response - /// The data itself. - public MpdBinaryData(long size, long binary, byte[] data) - { - this.Size = size; - this.Binary = binary; - this.Data = data; - } - - /// - /// Gets the total size of the binary data requeste - /// - public long Size { get; } - /// - /// Gets the size of the data contained in this response - /// - public long Binary { get; } - /// - /// Gets the data contained in this response - /// - public byte[] Data { get; } - } -} diff --git a/Sources/MpcNET/Types/MpdDecoderPlugin.cs b/Sources/MpcNET/Types/MpdDecoderPlugin.cs deleted file mode 100644 index ef783f0c..00000000 --- a/Sources/MpcNET/Types/MpdDecoderPlugin.cs +++ /dev/null @@ -1,70 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Types -{ - using System.Collections.Generic; - - /// - /// Represents a MPD decoder plugin. - /// - public class MpdDecoderPlugin - { - /// - /// The empty plugiun. - /// - public static readonly MpdDecoderPlugin Empty = new MpdDecoderPlugin(string.Empty); - - private readonly List suffixes = new List(); - private readonly List mediaTypes = new List(); - - /// - /// Initializes a new instance of the class. - /// - /// The name. - public MpdDecoderPlugin(string name) - { - this.Name = name; - this.IsInitialized = !string.IsNullOrEmpty(name); - } - - /// - /// Gets the name. - /// - /// - /// The name. - /// - public string Name { get; } - - /// - /// Gets the suffixes. - /// - /// - /// The suffixes. - /// - public IReadOnlyList Suffixes => this.suffixes; - - /// - /// Gets the media types. - /// - /// - /// The media types. - /// - public IReadOnlyList MediaTypes => this.mediaTypes; - - internal bool IsInitialized { get; } - - internal void AddSuffix(string suffix) - { - this.suffixes.Add(suffix); - } - - internal void AddMediaType(string type) - { - this.mediaTypes.Add(type); - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Types/MpdDirectory.cs b/Sources/MpcNET/Types/MpdDirectory.cs deleted file mode 100644 index 8b91c29f..00000000 --- a/Sources/MpcNET/Types/MpdDirectory.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Types -{ - using System.Collections.Generic; - using System.Linq; - - /// - /// Represents a MPD directory. - /// - public class MpdDirectory: IMpdFilePath - { - private readonly List files = new List(); - - /// - /// Initializes a new instance of the class. - /// - /// The path. - public MpdDirectory(string path) - { - this.Path = path; - - var name = path.Split('/').Last(); - this.Name = string.IsNullOrEmpty(name) ? "root" : name; - } - - /// - /// Gets the path. - /// - /// - /// The path. - /// - public string Path { get; } - - /// - /// Gets the name. - /// - /// - /// The name. - /// - public string Name { get; } - - /// - /// Gets the files. - /// - /// - /// The files. - /// - public IReadOnlyList Files => this.files; - - internal void AddFile(string file) - { - this.files.Add(new MpdFile(file)); - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Types/MpdFile.cs b/Sources/MpcNET/Types/MpdFile.cs deleted file mode 100644 index 3396445c..00000000 --- a/Sources/MpcNET/Types/MpdFile.cs +++ /dev/null @@ -1,366 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Types -{ - using System.Collections.Generic; - using System.Linq; - - /// - /// The MpdFile class contains all meta data for a file of the MPD. - /// - internal class MpdFile : IMpdFile - { - internal const string TagFile = "file"; - internal const string TagTime = "Time"; - internal const string TagArtist = "Artist"; - internal const string TagAlbum = "Album"; - internal const string TagTitle = "Title"; - internal const string TagTrack = "Track"; - internal const string TagName = "Name"; - internal const string TagGenre = "Genre"; - internal const string TagDate = "Date"; - internal const string TagComposer = "Composer"; - internal const string TagPerformer = "Performer"; - internal const string TagComment = "Comment"; - internal const string TagDisc = "Disc"; - internal const string TagPos = "Pos"; - internal const string TagId = "Id"; - - internal const int NoTime = -1; - internal const string NoAlbum = null; - internal const string NoArtist = null; - internal const string NoTitle = null; - internal const string NoTrack = null; - internal const string NoName = null; - internal const string NoGenre = null; - internal const string NoDate = null; - internal const string NoComposer = null; - internal const string NoPerformer = null; - internal const string NoComment = null; - internal const int NoDisc = -1; - internal const int NoPos = -1; - internal const int NoId = -1; - - internal MpdFile( - string path, - int time = NoTime, - string album = NoAlbum, - string artist = NoArtist, - string title = NoTitle, - string track = NoTrack, - string name = NoName, - string genre = NoGenre, - string date = NoDate, - string composer = NoComposer, - string performer = NoPerformer, - string comment = NoComment, - int disc = NoDisc, - int pos = NoPos, - int id = NoId, - IReadOnlyDictionary unknownMetadata = null) - { - this.Path = path; - this.Time = time; - this.Album = album; - this.Artist = artist; - this.Title = title; - this.Track = track; - this.Name = name; - this.Genre = genre; - this.Date = date; - this.Composer = composer; - this.Performer = performer; - this.Comment = comment; - this.Disc = disc; - this.Position = pos; - this.Id = id; - this.UnknownMetadata = unknownMetadata ?? new Dictionary(); - } - - public string Path { get; } - - public int Time { get; } - - public string Album { get; } - - public string Artist { get; } - - public string Title { get; } - - public string Track { get; } - - public string Name { get; } - - public string Genre { get; } - - public string Date { get; } - - public string Composer { get; } - - public string Performer { get; } - - public string Comment { get; } - - public int Disc { get; } - - public int Position { get; set; } - - public int Id { get; } - - public IReadOnlyDictionary UnknownMetadata { get; } - - /// - /// Gets a value indicating whether the MpdFile has the property set. - /// - public bool HasTime => this.Time != NoTime; - - /// - /// Gets a value indicating whether the MpdFile has the property set. - /// - public bool HasAlbum => this.Album != NoAlbum; - - /// - /// Gets a value indicating whether the MpdFile has the property set. - /// - public bool HasArtist => this.Artist != NoArtist; - - /// - /// Gets a value indicating whether the MpdFile has the property set. - /// - public bool HasTitle => this.Title != NoTitle; - - /// - /// Gets a value indicating whether the MpdFile has the property set. - /// - public bool HasTrack => this.Track != NoTrack; - - /// - /// Gets a value indicating whether the MpdFile has the property set. - /// - public bool HasName => this.Name != NoName; - - /// - /// Gets a value indicating whether the MpdFile has the property set. - /// - public bool HasGenre => this.Genre != NoGenre; - - /// - /// Gets a value indicating whether the MpdFile has the property set. - /// - public bool HasDate => this.Date != NoDate; - - /// - /// Gets a value indicating whether the MpdFile has the property set. - /// - public bool HasComposer => this.Composer != NoComposer; - - /// - /// Gets a value indicating whether the MpdFile has the property set. - /// - public bool HasPerformer => this.Performer != NoPerformer; - - /// - /// Gets a value indicating whether the MpdFile has the property set. - /// - public bool HasComment => this.Comment != NoComment; - - /// - /// Gets a value indicating whether the MpdFile has the property set. - /// - public bool HasDisc => this.Disc != NoDisc; - - /// - /// Gets a value indicating whether the MpdFile has the property set. - /// - public bool HasPos => this.Position != NoPos; - - /// - /// Gets a value indicating whether the MpdFile has the property set. - /// - public bool HasId => this.Id != NoId; - - public override string ToString() - { - return Title ?? Name ?? Path.Split('/').Last(); - } - - internal static MpdFile Create(string path, int pos) - { - return new MpdFile(path, pos: pos); - } - - internal static (IMpdFile mpdFile, int index) Create( - IReadOnlyList> response, - int startIndex) - { - string file; - if (response.Count <= startIndex) - { - return (null, -1); - } - - var fileKeyValuePair = response[startIndex]; - if (fileKeyValuePair.Key == "file") - { - file = fileKeyValuePair.Value; - } - else - { - return (null, -1); - } - - int time = NoTime; - string album = NoAlbum; - string artist = NoArtist; - string title = NoTitle; - string track = NoTrack; - string name = NoName; - string genre = NoGenre; - string date = NoDate; - string composer = NoComposer; - string performer = NoPerformer; - string comment = NoComment; - int disc = NoDisc; - int pos = NoPos; - int id = NoId; - var unknownMetadata = new Dictionary(); - for (var index = startIndex + 1; index < response.Count; index++) - { - var line = response[index]; - if (line.Key != null) - { - switch (line.Key) - { - case TagFile: - return (new MpdFile( - file, - time, - album, - artist, - title, - track, - name, - genre, - date, - composer, - performer, - comment, - disc, - pos, - id), index - 1); - case TagTime: - if (int.TryParse(line.Value, out int tryTime)) - { - time = tryTime; - } - - break; - case TagAlbum: - album = line.Value; - break; - case TagArtist: - artist = line.Value; - break; - case TagTitle: - title = line.Value; - break; - case TagTrack: - track = line.Value; - break; - case TagName: - name = line.Value; - break; - case TagGenre: - genre = line.Value; - break; - case TagDate: - date = line.Value; - break; - case TagComposer: - composer = line.Value; - break; - case TagPerformer: - performer = line.Value; - break; - case TagComment: - comment = line.Value; - break; - case TagDisc: - if (int.TryParse(line.Value, out var tryDisc)) - { - disc = tryDisc; - } - - break; - case TagPos: - if (int.TryParse(line.Value, out var tryPos)) - { - pos = tryPos; - } - - break; - case TagId: - if (int.TryParse(line.Value, out var tryId)) - { - id = tryId; - } - - break; - default: - // If a similar key has already been added to unknown metadata, add a ' to this second one so it can still be passed through. - // (It certainly won't be used though) - var key = line.Key; - while (unknownMetadata.ContainsKey(key)) - { - key = key + "'"; - } - unknownMetadata.Add(key, line.Value); - - break; - } - } - } - - return (new MpdFile( - file, - time, - album, - artist, - title, - track, - name, - genre, - date, - composer, - performer, - comment, - disc, - pos, - id), response.Count - 1); - } - - internal static IEnumerable CreateList(IReadOnlyList> response) - { - var mpdFiles = new List(); - for (var index = 0; index < response.Count; index++) - { - var (mpdFile, lastIndex) = Create(response, index); - if (mpdFile != null) - { - mpdFiles.Add(mpdFile); - index = lastIndex; - } - else - { - break; - } - } - - return mpdFiles; - } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Types/MpdOutput.cs b/Sources/MpcNET/Types/MpdOutput.cs deleted file mode 100644 index d3b1d717..00000000 --- a/Sources/MpcNET/Types/MpdOutput.cs +++ /dev/null @@ -1,61 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Types -{ - /// - /// Represents a MPD output. - /// - public class MpdOutput - { - /// - /// Initializes a new instance of the class. - /// - /// The identifier. - /// The name. - /// The plugin name. - /// if set to true [enabled]. - public MpdOutput(int id, string name, string plugin, bool enabled) - { - this.Id = id; - this.Name = name; - this.Plugin = plugin; - this.IsEnabled = enabled; - } - - /// - /// Gets the identifier. - /// - /// - /// The identifier. - /// - public int Id { get; } - - /// - /// Gets the name. - /// - /// - /// The name. - /// - public string Name { get; } - - /// - /// Gets the plugin name. - /// - /// - /// The plugin name. - /// - public string Plugin { get; } - - /// - /// Gets a value indicating whether this instance is enabled. - /// - /// - /// true if this instance is enabled; otherwise, false. - /// - public bool IsEnabled { get; } - } -} \ No newline at end of file diff --git a/Sources/MpcNET/Types/MpdPlaylist.cs b/Sources/MpcNET/Types/MpdPlaylist.cs deleted file mode 100644 index 0c600dad..00000000 --- a/Sources/MpcNET/Types/MpdPlaylist.cs +++ /dev/null @@ -1,71 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) MpcNET. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// -------------------------------------------------------------------------------------------------------------------- -namespace MpcNET.Types -{ - using System; - using System.Collections.Generic; - using System.Globalization; - - /// - /// Represents a MPD playlist. - /// - public class MpdPlaylist - { - /// - /// Initializes a new instance of the class. - /// - /// The name. - public MpdPlaylist(string name) - { - this.Name = name; - } - - /// - /// Gets the name. - /// - /// - /// The name. - /// - public string Name { get; } - - /// - /// Gets the last modified. - /// - /// - /// The last modified. - /// - public DateTime LastModified { get; private set; } - - /// - /// Equals implementation. - /// - /// - /// - public override bool Equals(object obj) - { - return obj is MpdPlaylist playlist && - Name == playlist.Name && - LastModified == playlist.LastModified; - } - /// - /// HashCode implementation. - /// - /// - public override int GetHashCode() - { - int hashCode = 1509980188; - hashCode = hashCode * -1521134295 + EqualityComparer.Default.GetHashCode(Name); - hashCode = hashCode * -1521134295 + LastModified.GetHashCode(); - return hashCode; - } - - internal void AddLastModified(string lastModified) - { - this.LastModified = DateTime.Parse(lastModified, CultureInfo.InvariantCulture); - } - } -} diff --git a/Sources/MpcNET/stylecop.json b/Sources/MpcNET/stylecop.json deleted file mode 100644 index 683552e5..00000000 --- a/Sources/MpcNET/stylecop.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - // ACTION REQUIRED: This file was automatically added to your project, but it - // will not take effect until additional steps are taken to enable it. See the - // following page for additional information: - // - // https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/EnableConfiguration.md - - "$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json", - "settings": { - "documentationRules": { - "companyName": "MpcNET", - "xmlHeader": true, - "copyrightText": "Copyright (c) {companyName}. All rights reserved.\nLicensed under the {licenseName} license. See {licenseFile} file in the project root for full license information.", - "headerDecoration": "--------------------------------------------------------------------------------------------------------------------", - "variables": { - "licenseName": "MIT", - "licenseFile": "LICENSE" - }, - "documentExposedElements": false, - "documentInternalElements": false - } - } -} diff --git a/Sources/Stylophone.Common/Helpers/Miscellaneous.cs b/Sources/Stylophone.Common/Helpers/Miscellaneous.cs index 3829432a..d1f021fb 100644 --- a/Sources/Stylophone.Common/Helpers/Miscellaneous.cs +++ b/Sources/Stylophone.Common/Helpers/Miscellaneous.cs @@ -1,4 +1,5 @@ -using SkiaSharp; +using MpcNET.Types; +using SkiaSharp; using System; using System.IO; @@ -46,6 +47,20 @@ public static string ToReadableString(this TimeSpan span) return formatted; } + /// + /// Get a unique identifier for a given MPD file. + /// + /// The MPDFile + /// + public static string GetFileIdentifier(IMpdFile f) + { + // This allows to cache per album, avoiding saving the same album art a ton of times. + // Doesn't work if files in an album have different albumarts, but that happens so rarely it's fine to ignore it. + var uniqueIdentifier = f.HasAlbum ? f.Album : f.HasTitle ? f.Title : f.Path; + + return EscapeFilename(uniqueIdentifier); + } + /// /// Escapes an object name so that it is a valid filename. /// diff --git a/Sources/Stylophone.Common/Services/AlbumArtService.cs b/Sources/Stylophone.Common/Services/AlbumArtService.cs index 707848e9..c065c756 100644 --- a/Sources/Stylophone.Common/Services/AlbumArtService.cs +++ b/Sources/Stylophone.Common/Services/AlbumArtService.cs @@ -83,7 +83,7 @@ public void Initialize() /// /// MpdFile to check for art /// True if the art is cached, false otherwise. - public async Task IsAlbumArtCachedAsync(IMpdFile f) => await _applicationStorageService.DoesFileExistAsync(GetFileIdentifier(f), "AlbumArt"); + public async Task IsAlbumArtCachedAsync(IMpdFile f) => await _applicationStorageService.DoesFileExistAsync(Miscellaneous.GetFileIdentifier(f), "AlbumArt"); /// /// Queue up an AlbumViewModel for the service to grab its album art. @@ -117,20 +117,11 @@ public async Task GetAlbumArtAsync(IMpdFile f, bool calculateDominantC return null; } - private string GetFileIdentifier(IMpdFile f) - { - // This allows to cache per album, avoiding saving the same album art a ton of times. - // Doesn't work if files in an album have different albumarts, but that happens so rarely it's fine to ignore it. - var uniqueIdentifier = f.HasAlbum ? f.Album : f.HasTitle ? f.Title : f.Path; - - return Miscellaneous.EscapeFilename(uniqueIdentifier); - } - private async Task GetAlbumBitmap(IMpdFile f, CancellationToken token = default) { SKBitmap result; var foundUsableArt = false; - var fileName = GetFileIdentifier(f); + var fileName = Miscellaneous.GetFileIdentifier(f); // Try loading from art cache first if (await IsAlbumArtCachedAsync(f)) diff --git a/Sources/Stylophone.Common/Services/MPDConnectionService.cs b/Sources/Stylophone.Common/Services/MPDConnectionService.cs index 8846000b..924bf96b 100644 --- a/Sources/Stylophone.Common/Services/MPDConnectionService.cs +++ b/Sources/Stylophone.Common/Services/MPDConnectionService.cs @@ -238,7 +238,7 @@ private void InitializeStatusUpdater(CancellationToken token = default) if (token.IsCancellationRequested || _idleConnection == null) break; - var idleChanges = await _idleConnection.SendAsync(new IdleCommand("stored_playlist playlist player mixer output options")); + var idleChanges = await _idleConnection.SendAsync(new IdleCommand("stored_playlist playlist player mixer output options update")); if (idleChanges.IsResponseValid) await HandleIdleResponseAsync(idleChanges.Response.Content); @@ -269,7 +269,7 @@ private async Task HandleIdleResponseAsync(string subsystems) await UpdatePlaylistsAsync(); } - if (subsystems.Contains("player") || subsystems.Contains("mixer") || subsystems.Contains("output") || subsystems.Contains("options")) + if (subsystems.Contains("player") || subsystems.Contains("mixer") || subsystems.Contains("output") || subsystems.Contains("options") || subsystems.Contains("update")) { // Status have changed in a significant way await UpdateStatusAsync(_idleConnection, true); diff --git a/Sources/Stylophone.Common/Stylophone.Common.csproj b/Sources/Stylophone.Common/Stylophone.Common.csproj index 4502f5b7..c2fcc6d1 100644 --- a/Sources/Stylophone.Common/Stylophone.Common.csproj +++ b/Sources/Stylophone.Common/Stylophone.Common.csproj @@ -7,15 +7,15 @@ - - + + + - diff --git a/Sources/Stylophone.Common/ViewModels/Bases/PlaybackViewModelBase.cs b/Sources/Stylophone.Common/ViewModels/Bases/PlaybackViewModelBase.cs index fc64f249..be602a79 100644 --- a/Sources/Stylophone.Common/ViewModels/Bases/PlaybackViewModelBase.cs +++ b/Sources/Stylophone.Common/ViewModels/Bases/PlaybackViewModelBase.cs @@ -25,7 +25,7 @@ public abstract class PlaybackViewModelBase : ViewModelBase private CancellationTokenSource _albumArtCancellationSource = new CancellationTokenSource(); private CancellationTokenSource cts = new CancellationTokenSource(); private List volumeTasks = new List(); - private List shuffleTasks = new List(); + private List stateTasks = new List(); protected INavigationService _navigationService; protected INotificationService _notificationService; @@ -278,6 +278,16 @@ public bool IsShuffleEnabled set => Set(ref _isShuffledEnabled, value); } + private bool _isConsumeEnabled; + /// + /// Are tracks removed upon playback + /// + public bool IsConsumeEnabled + { + get => _isConsumeEnabled; + set => Set(ref _isConsumeEnabled, value); + } + private bool _isRepeatEnabled; /// /// Is the song going to repeat when finished @@ -405,7 +415,7 @@ public void ToggleRepeat() } // Set the volume - shuffleTasks.Add(Task.Run(async () => + stateTasks.Add(Task.Run(async () => { await _mpdService.SafelySendCommandAsync(new RepeatCommand(IsRepeatEnabled)); await _mpdService.SafelySendCommandAsync(new SingleCommand(IsSingleEnabled)); @@ -425,8 +435,8 @@ public void ToggleShuffle() IsShuffleEnabled = !IsShuffleEnabled; - // Set the volume - shuffleTasks.Add(Task.Run(async () => + // Set shuffle + stateTasks.Add(Task.Run(async () => { await _mpdService.SafelySendCommandAsync(new RandomCommand(IsShuffleEnabled)); Thread.Sleep(1000); // Wait for MPD to acknowledge the new status... @@ -434,6 +444,25 @@ public void ToggleShuffle() }, cts.Token)); } + /// + /// Toggle if the current playlist has consume=1 + /// + public void ToggleConsume() + { + // Cancel older shuffleTasks + cts.Cancel(); + cts = new CancellationTokenSource(); + + IsConsumeEnabled = !IsConsumeEnabled; + + // Set consume + stateTasks.Add(Task.Run(async () => + { + await _mpdService.SafelySendCommandAsync(new ConsumeCommand(IsConsumeEnabled)); + Thread.Sleep(1000); // Wait for MPD to acknowledge the new status... + }, cts.Token)); + } + private double _previousVolume = -1; /// /// Toggle if we should mute @@ -593,7 +622,7 @@ await _dispatcherService.ExecuteOnUIThreadAsync(() => { // Remove completed requests volumeTasks.RemoveAll(t => t.IsCompleted); - shuffleTasks.RemoveAll(t => t.IsCompleted); + stateTasks.RemoveAll(t => t.IsCompleted); // Update volume to match the server value -- If we're not setting it ourselves if (volumeTasks.Count == 0) @@ -603,11 +632,12 @@ await _dispatcherService.ExecuteOnUIThreadAsync(() => } // Ditto for shuffle/repeat/single - if (shuffleTasks.Count == 0) + if (stateTasks.Count == 0) { _isShuffledEnabled = status.Random; _isRepeatEnabled = status.Repeat; _isSingleEnabled = status.Single; + _isConsumeEnabled = status.Consume; if (_isSingleEnabled) RepeatIcon = _interop.GetIcon(PlaybackIcon.RepeatSingle); @@ -618,6 +648,7 @@ await _dispatcherService.ExecuteOnUIThreadAsync(() => OnPropertyChanged(nameof(IsRepeatEnabled)); OnPropertyChanged(nameof(IsShuffleEnabled)); + OnPropertyChanged(nameof(IsConsumeEnabled)); } switch (status.State) diff --git a/Sources/Stylophone.Common/ViewModels/Bases/ShellViewModelBase.cs b/Sources/Stylophone.Common/ViewModels/Bases/ShellViewModelBase.cs index a72b93a5..e36fea38 100644 --- a/Sources/Stylophone.Common/ViewModels/Bases/ShellViewModelBase.cs +++ b/Sources/Stylophone.Common/ViewModels/Bases/ShellViewModelBase.cs @@ -41,6 +41,10 @@ public ShellViewModelBase(INavigationService navigationService, INotificationSer TryUpdatePlaylists(); _mpdService.PlaylistsChanged += (s, e) => TryUpdatePlaylists(); + _mpdService.StatusChanged += async (s, e) => + { + await _dispatcherService.ExecuteOnUIThreadAsync(() => OnPropertyChanged(nameof(IsServerUpdating))); + }; } private bool _isBackEnabled; @@ -50,6 +54,8 @@ public bool IsBackEnabled set { Set(ref _isBackEnabled, value); } } + public bool IsServerUpdating => _mpdService.CurrentStatus.UpdatingDb != -1; + private string _shellHeader; public string HeaderText { diff --git a/Sources/Stylophone.Common/ViewModels/PlaylistViewModel.cs b/Sources/Stylophone.Common/ViewModels/PlaylistViewModel.cs index 42eeb1fc..41ec0b17 100644 --- a/Sources/Stylophone.Common/ViewModels/PlaylistViewModel.cs +++ b/Sources/Stylophone.Common/ViewModels/PlaylistViewModel.cs @@ -259,8 +259,8 @@ public async Task LoadDataAsync(string playlistName) Source.CollectionChanged += Source_CollectionChanged; - Artists = findReq.Count() > 0 ? findReq. - Select(f => f.Artist).Distinct().Where(f => f != null && f!= "").Aggregate((f1, f2) => $"{f1}, {f2}") : ""; + var artistList = findReq.Select(f => f.Artist).Distinct().Where(f => f != null && f != "").ToList(); + Artists = artistList.Count > 0 ? artistList.Aggregate((f1, f2) => $"{f1}, {f2}") : ""; var totalTime = Source.Count > 0 ? Source.Select(tr => tr.File.Time).Aggregate((t1, t2) => t1 + t2) : 0; TimeSpan t = TimeSpan.FromSeconds(totalTime); diff --git a/Sources/Stylophone.Localization/Strings/Resources.Designer.cs b/Sources/Stylophone.Localization/Strings/Resources.Designer.cs index 3f01b99a..e38a596d 100644 --- a/Sources/Stylophone.Localization/Strings/Resources.Designer.cs +++ b/Sources/Stylophone.Localization/Strings/Resources.Designer.cs @@ -114,6 +114,15 @@ public static string ActionSkipPrevious { } } + /// + /// Recherche une chaîne localisée semblable à Toggle Consume. + /// + public static string ActionToggleConsume { + get { + return ResourceManager.GetString("ActionToggleConsume", resourceCulture); + } + } + /// /// Recherche une chaîne localisée semblable à Toggle Repeat. /// @@ -285,6 +294,15 @@ public static string ContextMenuViewAlbum { } } + /// + /// Recherche une chaîne localisée semblable à Server Database is Updating. + /// + public static string DatabaseUpdateHeader { + get { + return ResourceManager.GetString("DatabaseUpdateHeader", resourceCulture); + } + } + /// /// Recherche une chaîne localisée semblable à Delete Playlist?. /// @@ -1093,7 +1111,7 @@ public static string SettingsUIDensityNormal { } /// - /// Recherche une chaîne localisée semblable à Update Server Database. + /// Recherche une chaîne localisée semblable à Update. /// public static string SettingsUpdateDatabase { get { diff --git a/Sources/Stylophone.Localization/Strings/Resources.en-US.resx b/Sources/Stylophone.Localization/Strings/Resources.en-US.resx index 3acf4197..a11ca6b3 100644 --- a/Sources/Stylophone.Localization/Strings/Resources.en-US.resx +++ b/Sources/Stylophone.Localization/Strings/Resources.en-US.resx @@ -294,7 +294,7 @@ Normal - Update Server Database + Update Search Tracks... @@ -490,4 +490,10 @@ Enabling this option will show a second volume slider to control local volume. Stylophone stores album art locally to avoid overloading your MPD Server. + + Toggle Consume + + + Server Database is Updating + \ No newline at end of file diff --git a/Sources/Stylophone.Localization/Strings/Resources.fr-FR.resx b/Sources/Stylophone.Localization/Strings/Resources.fr-FR.resx index c37d0136..65b51ab6 100644 --- a/Sources/Stylophone.Localization/Strings/Resources.fr-FR.resx +++ b/Sources/Stylophone.Localization/Strings/Resources.fr-FR.resx @@ -293,7 +293,7 @@ Normal - Mettre à jour la base de données du serveur + Mettre à jour Rechercher un morceau... @@ -489,4 +489,10 @@ L'activation de cette option affichera un second slider pour contrôler le volum Stylophone stocke les pochettes d'album sur votre ordinateur pour éviter de surcharger votre serveur MPD. + + Activer/Désactiver le Consume + + + Base de données en cours de MàJ + \ No newline at end of file diff --git a/Sources/Stylophone.Localization/Strings/Resources.pt-PT.resx b/Sources/Stylophone.Localization/Strings/Resources.pt-PT.resx new file mode 100644 index 00000000..817206e1 --- /dev/null +++ b/Sources/Stylophone.Localization/Strings/Resources.pt-PT.resx @@ -0,0 +1,498 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Stylophone + Application display name + + + Fila + Navigation view item name for NowPlaying + + + Biblioteca + Navigation view item name for Library + + + Pastas + Navigation view item name for Folders + + + Listas de reprodução + Navigation view item name for Playlists + + + Definições + Navigation view item name for Settings + + + Esta faixa não tem um Álbum correspondente. + + + A Lista de reprodução foi eliminada. + + + A reproduzir agora {0} + + + Ainda não há faixas carregadas. + + + Atualmente não está a tocar nenhuma faixa. + + + Eliminar Lista de reprodução? + + + Não foi possível limpar a fila! + + + Atualização da base de dados iniciada. + + + A base de dados já está a ser atualizada. + + + Cancelar + + + Não foi possível encontrar um servidor MPD neste endereço! + + + Procurar por "{0}" no servidor... + + + Resultados da Pesquisa por "{0}" + + + OK + + + File name is null or empty. Specify a valid file name + File name is null or empty to save file in settings storage extensions + + + value must be an Enum! + Value must be an Enum in enum to boolean converter + + + parameter must be an Enum name! + Parameter must be an Enum name in enum to boolean converter + + + This view is being disposed. + View disposed + + + All pages opened in a new window must subscribe to the Released Event. + The page is not subscribed to the Released event. + + + Adicionado na Lista de reprodução {0}! + + + Adicionado à Fila! + + + A cache de arte do álbum foi eliminada. + + + Não foi possível adicionar o Álbum: {0} + + + Não foi possível reproduzir o conteúdo: {0} + + + Erro: {0} + + + Resposta MPD inválida. + + + Esta operação pode levar algum tempo ao servidor completar. + + + Atualizar a base de dados do servidor MPD + + + Acerca desta aplicação + + + Cliente MPD para a Plataforma Universal Windows, baseado em MpcNET. + + + Analíticos + + + Permitir que o Stylophone envie relatórios de crash e analíticos + + + Esta definição aplicar-se-á depois de reiniciar a aplicação. + + + Limpar Cache + + + Limpar a cache local de arte do álbum + + + Personalização + + + Base de dados e Arte do Álbum + + + Código Fonte, Licença e Declaração de Privacidade + + + https://github.com/Difegue/Stylophone + + + Servidor MPD + + + Nome do anfitrião + + + Porta + + + Tema + + + Escuro + + + Pré-definição do Sistema + + + Claro + + + Densidade IU + + + Compacto + + + Normal + + + Actualização + + + Procurar Faixas... + + + Álbuns + + + Artistas + + + Faixas + + + Não foram encontrados resultados... + + + Para começar, por favor visite a página Definições para introduzir o URL e a porta do seu servidor MPD. +Tenha em mente que o Stylophone pode enviar dados de utilização para ajudar a diagnosticar bugs. +Se não estiver de acordo com isto, pode desativar a telemetria nas Definições. +Espero que goste de utilizar a aplicação! + + First use prompt message body + + + Bem-vindo ao Stylophone! + First use prompt message title + + + Reproduzir + + + Ver Álbum + + + Remover da Lista de reprodução + + + Remover da Fila + + + Adicionar a Lista de reprodução + + + Guardar Fila como Lista de reprodução + + + Limpar Fila + + + Adicionar a Fila + + + Eliminar Lista de reprodução + + + O seu servidor MPD está ligado? + + + Não se encontram pastas no servidor. + + + Não há nada como uma biblioteca vazia. + + + Arranje algumas faixas lá! + + + Não posso interferir com isto. + + + Porque não adiciona música? + + + Tudo está calmo agora. + + + Pesquisa Funky Fresca! + + + Nenhuma faixa encontrada no Servidor. + + + Pesquisar + + + Sistema de Ficheiros MPD + + + A carregar... + + + Fechar todas as pastas abertas + + + A seguir: + + + Ativar/Desativar Aleatório + + + Reproduzir/Pausa + + + Faixa Anterior + + + Ativar/Desativar Repetição + + + Próxima Faixa + + + Mudar Volume + + + Mostrar Mini Leitor + + + Mais Ações + + + Adicionar à Lista de reprodução + + + Adicionar faixa(s) para a seguinte Lista de reprodução: + + + Selecione uma Lista de reprodução + + + Adicionar + + + Criar Nova Lista de reprodução + + + Nome da Lista de reprodução + + + Palavra-passe + + + Palavra-passe inválida + + + Reprodução Local disponível + + + Desligado + + + Ligado + + + Reprodução Local + + + Stylophone pode tocar o fluxo de música do seu Servidor MPD. +Ativando esta opção mostrará um segundo deslizador de volume para controlar o volume local. + + + Erro ao tentar reproduzir o fluxo httpd do servidor MPD: {0} + + + Volume Local + + + Avalie esta Aplicação + + + Obrigado por utilizar Stylophone! Gostaria de avaliar a aplicação na Loja? +(Não voltaremos a perguntar. 🙏) + + + Sim + + + Não + + + Escolha algumas Canções + + + Baralhando através da sua biblioteca... + + + David Bowie é creditado por ter tocado o Stylophone na sua canção de sucesso de 1969 "Space Oddity" e também pelo seu álbum de 2002 "Heathen track" intitulado "Slip Away", bem como na canção "Heathen (The Rays)". + + + Transferir Arte do Álbum a partir do Servidor MPD + + + Stylophone armazena a arte do álbum localmente para evitar sobrecarregar o seu MPD Server. + + + Ativar/Desativar Consume + + + Base de dados do servidor actualizando + + \ No newline at end of file diff --git a/Sources/Stylophone.Localization/Strings/Resources.resx b/Sources/Stylophone.Localization/Strings/Resources.resx index d6b710b2..cd8d6f23 100644 --- a/Sources/Stylophone.Localization/Strings/Resources.resx +++ b/Sources/Stylophone.Localization/Strings/Resources.resx @@ -294,7 +294,7 @@ Normal - Update Server Database + Update Search Tracks... @@ -490,4 +490,10 @@ Enabling this option will show a second volume slider to control local volume. Stylophone stores album art locally to avoid overloading your MPD Server. + + Toggle Consume + + + Server Database is Updating + \ No newline at end of file diff --git a/Sources/Stylophone.Localization/Stylophone.Localization.csproj b/Sources/Stylophone.Localization/Stylophone.Localization.csproj index 27391782..5e1dc5d9 100644 --- a/Sources/Stylophone.Localization/Stylophone.Localization.csproj +++ b/Sources/Stylophone.Localization/Stylophone.Localization.csproj @@ -19,6 +19,9 @@ Designer + + Designer + PublicResXFileCodeGenerator @@ -28,4 +31,4 @@ - \ No newline at end of file + diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/Contents.json b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/Contents.json new file mode 100644 index 00000000..dfcf4661 --- /dev/null +++ b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/Contents.json @@ -0,0 +1,176 @@ +{ + "images" : [ + { + "filename" : "notification40.png", + "idiom" : "iphone", + "scale" : "2x", + "size" : "20x20" + }, + { + "filename" : "notification60.png", + "idiom" : "iphone", + "scale" : "3x", + "size" : "20x20" + }, + { + "filename" : "settings58.png", + "idiom" : "iphone", + "scale" : "2x", + "size" : "29x29" + }, + { + "filename" : "settings87.png", + "idiom" : "iphone", + "scale" : "3x", + "size" : "29x29" + }, + { + "filename" : "spotlight80.png", + "idiom" : "iphone", + "scale" : "2x", + "size" : "40x40" + }, + { + "filename" : "spotlight120.png", + "idiom" : "iphone", + "scale" : "3x", + "size" : "40x40" + }, + { + "filename" : "iphone120.png", + "idiom" : "iphone", + "scale" : "2x", + "size" : "60x60" + }, + { + "filename" : "iphone180.png", + "idiom" : "iphone", + "scale" : "3x", + "size" : "60x60" + }, + { + "filename" : "ipadNotification20.png", + "idiom" : "ipad", + "scale" : "1x", + "size" : "20x20" + }, + { + "filename" : "ipadNotification40.png", + "idiom" : "ipad", + "scale" : "2x", + "size" : "20x20" + }, + { + "filename" : "ipadSettings29.png", + "idiom" : "ipad", + "scale" : "1x", + "size" : "29x29" + }, + { + "filename" : "ipadSettings58.png", + "idiom" : "ipad", + "scale" : "2x", + "size" : "29x29" + }, + { + "filename" : "ipadSpotlight40.png", + "idiom" : "ipad", + "scale" : "1x", + "size" : "40x40" + }, + { + "filename" : "ipadSpotlight80.png", + "idiom" : "ipad", + "scale" : "2x", + "size" : "40x40" + }, + { + "filename" : "ipad76.png", + "idiom" : "ipad", + "scale" : "1x", + "size" : "76x76" + }, + { + "filename" : "ipad152.png", + "idiom" : "ipad", + "scale" : "2x", + "size" : "76x76" + }, + { + "filename" : "ipadPro167.png", + "idiom" : "ipad", + "scale" : "2x", + "size" : "83.5x83.5" + }, + { + "filename" : "appstore1024.png", + "idiom" : "ios-marketing", + "scale" : "1x", + "size" : "1024x1024" + }, + { + "filename" : "mac16.png", + "idiom" : "mac", + "scale" : "1x", + "size" : "16x16" + }, + { + "filename" : "mac32.png", + "idiom" : "mac", + "scale" : "2x", + "size" : "16x16" + }, + { + "filename" : "mac32.png", + "idiom" : "mac", + "scale" : "1x", + "size" : "32x32" + }, + { + "filename" : "mac64.png", + "idiom" : "mac", + "scale" : "2x", + "size" : "32x32" + }, + { + "filename" : "mac128.png", + "idiom" : "mac", + "scale" : "1x", + "size" : "128x128" + }, + { + "filename" : "mac256.png", + "idiom" : "mac", + "scale" : "2x", + "size" : "128x128" + }, + { + "filename" : "mac256.png", + "idiom" : "mac", + "scale" : "1x", + "size" : "256x256" + }, + { + "filename" : "mac512.png", + "idiom" : "mac", + "scale" : "2x", + "size" : "256x256" + }, + { + "filename" : "mac512.png", + "idiom" : "mac", + "scale" : "1x", + "size" : "512x512" + }, + { + "filename" : "mac1024.png", + "idiom" : "mac", + "scale" : "2x", + "size" : "512x512" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/appstore1024.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/appstore1024.png new file mode 100644 index 00000000..87c8ff51 Binary files /dev/null and b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/appstore1024.png differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/ipad152.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/ipad152.png new file mode 100644 index 00000000..f971f59f Binary files /dev/null and b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/ipad152.png differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/ipad76.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/ipad76.png new file mode 100644 index 00000000..d3d7e3cd Binary files /dev/null and b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/ipad76.png differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/ipadNotification20.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/ipadNotification20.png new file mode 100644 index 00000000..0a8a4337 Binary files /dev/null and b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/ipadNotification20.png differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/ipadNotification40.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/ipadNotification40.png new file mode 100644 index 00000000..ac07f19c Binary files /dev/null and b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/ipadNotification40.png differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/ipadPro167.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/ipadPro167.png new file mode 100644 index 00000000..837150a7 Binary files /dev/null and b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/ipadPro167.png differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/ipadSettings29.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/ipadSettings29.png new file mode 100644 index 00000000..f134480c Binary files /dev/null and b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/ipadSettings29.png differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/ipadSettings58.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/ipadSettings58.png new file mode 100644 index 00000000..9acbf60a Binary files /dev/null and b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/ipadSettings58.png differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/ipadSpotlight40.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/ipadSpotlight40.png new file mode 100644 index 00000000..ac07f19c Binary files /dev/null and b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/ipadSpotlight40.png differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/ipadSpotlight80.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/ipadSpotlight80.png new file mode 100644 index 00000000..69921711 Binary files /dev/null and b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/ipadSpotlight80.png differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/iphone120.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/iphone120.png new file mode 100644 index 00000000..9bf1acd3 Binary files /dev/null and b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/iphone120.png differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/iphone180.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/iphone180.png new file mode 100644 index 00000000..0c264d28 Binary files /dev/null and b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/iphone180.png differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/mac1024.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/mac1024.png new file mode 100644 index 00000000..3bb5cee8 Binary files /dev/null and b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/mac1024.png differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/mac128.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/mac128.png new file mode 100644 index 00000000..0bac707f Binary files /dev/null and b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/mac128.png differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/mac16.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/mac16.png new file mode 100644 index 00000000..b361056c Binary files /dev/null and b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/mac16.png differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/mac256.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/mac256.png new file mode 100644 index 00000000..f4dee53d Binary files /dev/null and b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/mac256.png differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/mac32.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/mac32.png new file mode 100644 index 00000000..2d44269f Binary files /dev/null and b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/mac32.png differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/mac512.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/mac512.png new file mode 100644 index 00000000..9077cb5c Binary files /dev/null and b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/mac512.png differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/mac64.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/mac64.png new file mode 100644 index 00000000..891fb523 Binary files /dev/null and b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/mac64.png differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/notification40.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/notification40.png new file mode 100644 index 00000000..ac07f19c Binary files /dev/null and b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/notification40.png differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/notification60.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/notification60.png new file mode 100644 index 00000000..d493f2bc Binary files /dev/null and b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/notification60.png differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/settings58.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/settings58.png new file mode 100644 index 00000000..9acbf60a Binary files /dev/null and b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/settings58.png differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/settings87.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/settings87.png new file mode 100644 index 00000000..04f36ce6 Binary files /dev/null and b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/settings87.png differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/spotlight120.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/spotlight120.png new file mode 100644 index 00000000..9bf1acd3 Binary files /dev/null and b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/spotlight120.png differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/spotlight80.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/spotlight80.png new file mode 100644 index 00000000..69921711 Binary files /dev/null and b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon-1.appiconset/spotlight80.png differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/1024-1.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/1024-1.png deleted file mode 100644 index 75845816..00000000 Binary files a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/1024-1.png and /dev/null differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/1024.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/1024.png deleted file mode 100644 index 75845816..00000000 Binary files a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/1024.png and /dev/null differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/120-1.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/120-1.png deleted file mode 100644 index 07a512d4..00000000 Binary files a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/120-1.png and /dev/null differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/120.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/120.png deleted file mode 100644 index 07a512d4..00000000 Binary files a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/120.png and /dev/null differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/128.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/128.png deleted file mode 100644 index d8801298..00000000 Binary files a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/128.png and /dev/null differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/152.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/152.png deleted file mode 100644 index 0a66693b..00000000 Binary files a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/152.png and /dev/null differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/16.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/16.png deleted file mode 100644 index a04ef3a3..00000000 Binary files a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/16.png and /dev/null differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/167.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/167.png deleted file mode 100644 index d4425ec8..00000000 Binary files a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/167.png and /dev/null differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/180.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/180.png deleted file mode 100644 index b820cdb3..00000000 Binary files a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/180.png and /dev/null differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/20.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/20.png deleted file mode 100644 index e9576f63..00000000 Binary files a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/20.png and /dev/null differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/256-1.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/256-1.png deleted file mode 100644 index 1a8e7c1b..00000000 Binary files a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/256-1.png and /dev/null differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/256.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/256.png deleted file mode 100644 index 1a8e7c1b..00000000 Binary files a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/256.png and /dev/null differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/29.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/29.png deleted file mode 100644 index cf45f6c6..00000000 Binary files a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/29.png and /dev/null differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/32-1.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/32-1.png deleted file mode 100644 index 9f3d235f..00000000 Binary files a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/32-1.png and /dev/null differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/32.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/32.png deleted file mode 100644 index 9f3d235f..00000000 Binary files a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/32.png and /dev/null differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/40-1.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/40-1.png deleted file mode 100644 index f87f77eb..00000000 Binary files a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/40-1.png and /dev/null differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/40-2.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/40-2.png deleted file mode 100644 index f87f77eb..00000000 Binary files a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/40-2.png and /dev/null differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/40.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/40.png deleted file mode 100644 index f87f77eb..00000000 Binary files a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/40.png and /dev/null differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/512-1.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/512-1.png deleted file mode 100644 index 8304110e..00000000 Binary files a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/512-1.png and /dev/null differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/512.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/512.png deleted file mode 100644 index 8304110e..00000000 Binary files a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/512.png and /dev/null differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/58-1.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/58-1.png deleted file mode 100644 index 6732c9c5..00000000 Binary files a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/58-1.png and /dev/null differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/58.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/58.png deleted file mode 100644 index 6732c9c5..00000000 Binary files a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/58.png and /dev/null differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/60.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/60.png deleted file mode 100644 index e0592321..00000000 Binary files a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/60.png and /dev/null differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/64.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/64.png deleted file mode 100644 index e393d446..00000000 Binary files a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/64.png and /dev/null differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/76.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/76.png deleted file mode 100644 index 0cdeea31..00000000 Binary files a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/76.png and /dev/null differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/80-1.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/80-1.png deleted file mode 100644 index a8a1e70a..00000000 Binary files a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/80-1.png and /dev/null differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/80.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/80.png deleted file mode 100644 index a8a1e70a..00000000 Binary files a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/80.png and /dev/null differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/87.png b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/87.png deleted file mode 100644 index 29d32e61..00000000 Binary files a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/87.png and /dev/null differ diff --git a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/Contents.json b/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index fdfbd50a..00000000 --- a/Sources/Stylophone.iOS/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,259 +0,0 @@ -{ - "images": [ - { - "filename": "40.png", - "size": "20x20", - "scale": "2x", - "idiom": "iphone" - }, - { - "filename": "60.png", - "size": "20x20", - "scale": "3x", - "idiom": "iphone" - }, - { - "filename": "58.png", - "size": "29x29", - "scale": "2x", - "idiom": "iphone" - }, - { - "filename": "87.png", - "size": "29x29", - "scale": "3x", - "idiom": "iphone" - }, - { - "filename": "80.png", - "size": "40x40", - "scale": "2x", - "idiom": "iphone" - }, - { - "filename": "120.png", - "size": "40x40", - "scale": "3x", - "idiom": "iphone" - }, - { - "filename": "120-1.png", - "size": "60x60", - "scale": "2x", - "idiom": "iphone" - }, - { - "filename": "180.png", - "size": "60x60", - "scale": "3x", - "idiom": "iphone" - }, - { - "filename": "20.png", - "size": "20x20", - "scale": "1x", - "idiom": "ipad" - }, - { - "filename": "40-1.png", - "size": "20x20", - "scale": "2x", - "idiom": "ipad" - }, - { - "filename": "29.png", - "size": "29x29", - "scale": "1x", - "idiom": "ipad" - }, - { - "filename": "58-1.png", - "size": "29x29", - "scale": "2x", - "idiom": "ipad" - }, - { - "filename": "40-2.png", - "size": "40x40", - "scale": "1x", - "idiom": "ipad" - }, - { - "filename": "80-1.png", - "size": "40x40", - "scale": "2x", - "idiom": "ipad" - }, - { - "filename": "167.png", - "size": "83.5x83.5", - "scale": "2x", - "idiom": "ipad" - }, - { - "filename": "76.png", - "size": "76x76", - "scale": "1x", - "idiom": "ipad" - }, - { - "filename": "152.png", - "size": "76x76", - "scale": "2x", - "idiom": "ipad" - }, - { - "filename": "1024.png", - "size": "1024x1024", - "scale": "1x", - "idiom": "ios-marketing" - }, - { - "size": "60x60", - "scale": "2x", - "idiom": "car" - }, - { - "size": "60x60", - "scale": "3x", - "idiom": "car" - }, - { - "role": "notificationCenter", - "size": "24x24", - "subtype": "38mm", - "scale": "2x", - "idiom": "watch" - }, - { - "role": "notificationCenter", - "size": "27.5x27.5", - "subtype": "42mm", - "scale": "2x", - "idiom": "watch" - }, - { - "role": "companionSettings", - "size": "29x29", - "scale": "2x", - "idiom": "watch" - }, - { - "role": "companionSettings", - "size": "29x29", - "scale": "3x", - "idiom": "watch" - }, - { - "role": "appLauncher", - "size": "40x40", - "subtype": "38mm", - "scale": "2x", - "idiom": "watch" - }, - { - "role": "appLauncher", - "size": "44x44", - "subtype": "40mm", - "scale": "2x", - "idiom": "watch" - }, - { - "role": "appLauncher", - "size": "50x50", - "subtype": "44mm", - "scale": "2x", - "idiom": "watch" - }, - { - "role": "quickLook", - "size": "86x86", - "subtype": "38mm", - "scale": "2x", - "idiom": "watch" - }, - { - "role": "quickLook", - "size": "98x98", - "subtype": "42mm", - "scale": "2x", - "idiom": "watch" - }, - { - "role": "quickLook", - "size": "108x108", - "subtype": "44mm", - "scale": "2x", - "idiom": "watch" - }, - { - "size": "1024x1024", - "scale": "1x", - "idiom": "watch-marketing" - }, - { - "filename": "16.png", - "size": "16x16", - "scale": "1x", - "idiom": "mac" - }, - { - "filename": "32.png", - "size": "16x16", - "scale": "2x", - "idiom": "mac" - }, - { - "filename": "32-1.png", - "size": "32x32", - "scale": "1x", - "idiom": "mac" - }, - { - "filename": "64.png", - "size": "32x32", - "scale": "2x", - "idiom": "mac" - }, - { - "filename": "128.png", - "size": "128x128", - "scale": "1x", - "idiom": "mac" - }, - { - "filename": "256.png", - "size": "128x128", - "scale": "2x", - "idiom": "mac" - }, - { - "filename": "256-1.png", - "size": "256x256", - "scale": "1x", - "idiom": "mac" - }, - { - "filename": "512.png", - "size": "256x256", - "scale": "2x", - "idiom": "mac" - }, - { - "filename": "512-1.png", - "size": "512x512", - "scale": "1x", - "idiom": "mac" - }, - { - "filename": "1024-1.png", - "size": "512x512", - "scale": "2x", - "idiom": "mac" - } - ], - "info": { - "version": 1, - "author": "xcode" - } -} \ No newline at end of file diff --git a/Sources/Stylophone.iOS/Info.plist b/Sources/Stylophone.iOS/Info.plist index 6e2ff493..a5297755 100644 --- a/Sources/Stylophone.iOS/Info.plist +++ b/Sources/Stylophone.iOS/Info.plist @@ -32,7 +32,7 @@ MinimumOSVersion - 14.5 + 15.0 UIDeviceFamily 1 @@ -62,6 +62,6 @@ UIInterfaceOrientationLandscapeRight XSAppIconAssets - Assets.xcassets/AppIcon.appiconset + Assets.xcassets/AppIcon-1.appiconset diff --git a/Sources/Stylophone.iOS/Services/DialogService.cs b/Sources/Stylophone.iOS/Services/DialogService.cs index 738ea3d6..78a276e8 100644 --- a/Sources/Stylophone.iOS/Services/DialogService.cs +++ b/Sources/Stylophone.iOS/Services/DialogService.cs @@ -32,9 +32,14 @@ public DialogService(IDispatcherService dispatcherService, IApplicationStorageSe /// public async Task ShowAddToPlaylistDialog(bool allowExistingPlaylists = true) { + // Wrap VC in a NavigationController for top controls var dialog = new AddToPlaylistViewController(_mpdService, allowExistingPlaylists); - var navigationController = new UINavigationController(dialog); + + // Specify medium detent for the NavigationController's presentation + UISheetPresentationController uspc = (UISheetPresentationController)navigationController.PresentationController; + uspc.Detents = new [] { UISheetPresentationControllerDetent.CreateMediumDetent() }; + UIApplication.SharedApplication.KeyWindow.RootViewController.PresentViewController(navigationController, true, null); var result = await dialog.CompletionTask; diff --git a/Sources/Stylophone.iOS/Stylophone.iOS.csproj b/Sources/Stylophone.iOS/Stylophone.iOS.csproj index b48956d5..1831517c 100644 --- a/Sources/Stylophone.iOS/Stylophone.iOS.csproj +++ b/Sources/Stylophone.iOS/Stylophone.iOS.csproj @@ -150,7 +150,7 @@ - + false @@ -173,34 +173,33 @@ false - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -233,6 +232,7 @@ 3.3.10 + @@ -247,10 +247,6 @@ - - {8994C820-7BA9-4BB8-B9EA-C608B07C4A11} - MpcNET - {83B15D0E-C82F-4438-8290-0DFC23A6498F} Stylophone.Common diff --git a/Sources/Stylophone.iOS/ViewControllers/PlaybackViewController.cs b/Sources/Stylophone.iOS/ViewControllers/PlaybackViewController.cs index 347fe959..f10b86d7 100644 --- a/Sources/Stylophone.iOS/ViewControllers/PlaybackViewController.cs +++ b/Sources/Stylophone.iOS/ViewControllers/PlaybackViewController.cs @@ -65,8 +65,8 @@ public override void AwakeFromNib() LocalPlaybackBinder.Bind(LocalPlaybackView, "hidden", nameof(ViewModel.LocalPlayback.IsEnabled), valueTransformer: negateBoolTransformer); LocalMuteButton.PrimaryActionTriggered += (s, e) => ViewModel.LocalPlayback.ToggleMute(); - LocalPlaybackBinder.Bind(LocalVolumeSlider, "value", nameof(ViewModel.LocalPlayback.Volume), true); - LocalPlaybackBinder.Bind(LocalVolume, "text", nameof(ViewModel.LocalPlayback.Volume), valueTransformer: intToStringTransformer); + LocalPlaybackBinder.Bind(LocalVolumeSlider, "value", nameof(ViewModel.LocalPlayback.Volume), true); + LocalPlaybackBinder.Bind(LocalVolume, "text", nameof(ViewModel.LocalPlayback.Volume), valueTransformer: intToStringTransformer); ServerMuteButton.PrimaryActionTriggered += (s, e) => ViewModel.ToggleMute(); Binder.Bind(ServerVolumeSlider, "value", nameof(ViewModel.MediaVolume), true); diff --git a/Sources/Stylophone.sln b/Sources/Stylophone.sln index d58f9d6d..14a645d8 100644 --- a/Sources/Stylophone.sln +++ b/Sources/Stylophone.sln @@ -1,12 +1,8 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.29324.140 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31710.8 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MpcNET", "MpcNET\MpcNET.csproj", "{8994C820-7BA9-4BB8-B9EA-C608B07C4A11}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MpcNET.Test", "MpcNET.Test\MpcNET.Test.csproj", "{69F1D68F-9CD5-4EA6-9B47-2A7A9BF8CED9}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Stylophone", "Stylophone\Stylophone.csproj", "{5A5CE693-A67D-4B28-8DCE-4B0EA3A47533}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stylophone.Common", "Stylophone.Common\Stylophone.Common.csproj", "{83B15D0E-C82F-4438-8290-0DFC23A6498F}" @@ -40,90 +36,6 @@ Global Release-Stable|x86 = Release-Stable|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8994C820-7BA9-4BB8-B9EA-C608B07C4A11}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8994C820-7BA9-4BB8-B9EA-C608B07C4A11}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8994C820-7BA9-4BB8-B9EA-C608B07C4A11}.Debug|ARM.ActiveCfg = Debug|Any CPU - {8994C820-7BA9-4BB8-B9EA-C608B07C4A11}.Debug|ARM.Build.0 = Debug|Any CPU - {8994C820-7BA9-4BB8-B9EA-C608B07C4A11}.Debug|ARM64.ActiveCfg = Debug|Any CPU - {8994C820-7BA9-4BB8-B9EA-C608B07C4A11}.Debug|ARM64.Build.0 = Debug|Any CPU - {8994C820-7BA9-4BB8-B9EA-C608B07C4A11}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {8994C820-7BA9-4BB8-B9EA-C608B07C4A11}.Debug|iPhone.Build.0 = Debug|Any CPU - {8994C820-7BA9-4BB8-B9EA-C608B07C4A11}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {8994C820-7BA9-4BB8-B9EA-C608B07C4A11}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {8994C820-7BA9-4BB8-B9EA-C608B07C4A11}.Debug|x64.ActiveCfg = Debug|Any CPU - {8994C820-7BA9-4BB8-B9EA-C608B07C4A11}.Debug|x64.Build.0 = Debug|Any CPU - {8994C820-7BA9-4BB8-B9EA-C608B07C4A11}.Debug|x86.ActiveCfg = Debug|Any CPU - {8994C820-7BA9-4BB8-B9EA-C608B07C4A11}.Debug|x86.Build.0 = Debug|Any CPU - {8994C820-7BA9-4BB8-B9EA-C608B07C4A11}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8994C820-7BA9-4BB8-B9EA-C608B07C4A11}.Release|Any CPU.Build.0 = Release|Any CPU - {8994C820-7BA9-4BB8-B9EA-C608B07C4A11}.Release|ARM.ActiveCfg = Release|Any CPU - {8994C820-7BA9-4BB8-B9EA-C608B07C4A11}.Release|ARM.Build.0 = Release|Any CPU - {8994C820-7BA9-4BB8-B9EA-C608B07C4A11}.Release|ARM64.ActiveCfg = Release|Any CPU - {8994C820-7BA9-4BB8-B9EA-C608B07C4A11}.Release|ARM64.Build.0 = Release|Any CPU - {8994C820-7BA9-4BB8-B9EA-C608B07C4A11}.Release|iPhone.ActiveCfg = Release|Any CPU - {8994C820-7BA9-4BB8-B9EA-C608B07C4A11}.Release|iPhone.Build.0 = Release|Any CPU - {8994C820-7BA9-4BB8-B9EA-C608B07C4A11}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {8994C820-7BA9-4BB8-B9EA-C608B07C4A11}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {8994C820-7BA9-4BB8-B9EA-C608B07C4A11}.Release|x64.ActiveCfg = Release|Any CPU - {8994C820-7BA9-4BB8-B9EA-C608B07C4A11}.Release|x64.Build.0 = Release|Any CPU - {8994C820-7BA9-4BB8-B9EA-C608B07C4A11}.Release|x86.ActiveCfg = Release|Any CPU - {8994C820-7BA9-4BB8-B9EA-C608B07C4A11}.Release|x86.Build.0 = Release|Any CPU - {8994C820-7BA9-4BB8-B9EA-C608B07C4A11}.Release-Stable|Any CPU.ActiveCfg = Release-Stable|Any CPU - {8994C820-7BA9-4BB8-B9EA-C608B07C4A11}.Release-Stable|Any CPU.Build.0 = Release-Stable|Any CPU - {8994C820-7BA9-4BB8-B9EA-C608B07C4A11}.Release-Stable|ARM.ActiveCfg = Release-Stable|Any CPU - {8994C820-7BA9-4BB8-B9EA-C608B07C4A11}.Release-Stable|ARM.Build.0 = Release-Stable|Any CPU - {8994C820-7BA9-4BB8-B9EA-C608B07C4A11}.Release-Stable|ARM64.ActiveCfg = Release-Stable|Any CPU - {8994C820-7BA9-4BB8-B9EA-C608B07C4A11}.Release-Stable|ARM64.Build.0 = Release-Stable|Any CPU - {8994C820-7BA9-4BB8-B9EA-C608B07C4A11}.Release-Stable|iPhone.ActiveCfg = Release-Stable|Any CPU - {8994C820-7BA9-4BB8-B9EA-C608B07C4A11}.Release-Stable|iPhone.Build.0 = Release-Stable|Any CPU - {8994C820-7BA9-4BB8-B9EA-C608B07C4A11}.Release-Stable|iPhoneSimulator.ActiveCfg = Release-Stable|Any CPU - {8994C820-7BA9-4BB8-B9EA-C608B07C4A11}.Release-Stable|iPhoneSimulator.Build.0 = Release-Stable|Any CPU - {8994C820-7BA9-4BB8-B9EA-C608B07C4A11}.Release-Stable|x64.ActiveCfg = Release-Stable|Any CPU - {8994C820-7BA9-4BB8-B9EA-C608B07C4A11}.Release-Stable|x64.Build.0 = Release-Stable|Any CPU - {8994C820-7BA9-4BB8-B9EA-C608B07C4A11}.Release-Stable|x86.ActiveCfg = Release-Stable|Any CPU - {8994C820-7BA9-4BB8-B9EA-C608B07C4A11}.Release-Stable|x86.Build.0 = Release-Stable|Any CPU - {69F1D68F-9CD5-4EA6-9B47-2A7A9BF8CED9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {69F1D68F-9CD5-4EA6-9B47-2A7A9BF8CED9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {69F1D68F-9CD5-4EA6-9B47-2A7A9BF8CED9}.Debug|ARM.ActiveCfg = Debug|Any CPU - {69F1D68F-9CD5-4EA6-9B47-2A7A9BF8CED9}.Debug|ARM.Build.0 = Debug|Any CPU - {69F1D68F-9CD5-4EA6-9B47-2A7A9BF8CED9}.Debug|ARM64.ActiveCfg = Debug|Any CPU - {69F1D68F-9CD5-4EA6-9B47-2A7A9BF8CED9}.Debug|ARM64.Build.0 = Debug|Any CPU - {69F1D68F-9CD5-4EA6-9B47-2A7A9BF8CED9}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {69F1D68F-9CD5-4EA6-9B47-2A7A9BF8CED9}.Debug|iPhone.Build.0 = Debug|Any CPU - {69F1D68F-9CD5-4EA6-9B47-2A7A9BF8CED9}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {69F1D68F-9CD5-4EA6-9B47-2A7A9BF8CED9}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {69F1D68F-9CD5-4EA6-9B47-2A7A9BF8CED9}.Debug|x64.ActiveCfg = Debug|Any CPU - {69F1D68F-9CD5-4EA6-9B47-2A7A9BF8CED9}.Debug|x64.Build.0 = Debug|Any CPU - {69F1D68F-9CD5-4EA6-9B47-2A7A9BF8CED9}.Debug|x86.ActiveCfg = Debug|Any CPU - {69F1D68F-9CD5-4EA6-9B47-2A7A9BF8CED9}.Debug|x86.Build.0 = Debug|Any CPU - {69F1D68F-9CD5-4EA6-9B47-2A7A9BF8CED9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {69F1D68F-9CD5-4EA6-9B47-2A7A9BF8CED9}.Release|Any CPU.Build.0 = Release|Any CPU - {69F1D68F-9CD5-4EA6-9B47-2A7A9BF8CED9}.Release|ARM.ActiveCfg = Release|Any CPU - {69F1D68F-9CD5-4EA6-9B47-2A7A9BF8CED9}.Release|ARM.Build.0 = Release|Any CPU - {69F1D68F-9CD5-4EA6-9B47-2A7A9BF8CED9}.Release|ARM64.ActiveCfg = Release|Any CPU - {69F1D68F-9CD5-4EA6-9B47-2A7A9BF8CED9}.Release|ARM64.Build.0 = Release|Any CPU - {69F1D68F-9CD5-4EA6-9B47-2A7A9BF8CED9}.Release|iPhone.ActiveCfg = Release|Any CPU - {69F1D68F-9CD5-4EA6-9B47-2A7A9BF8CED9}.Release|iPhone.Build.0 = Release|Any CPU - {69F1D68F-9CD5-4EA6-9B47-2A7A9BF8CED9}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {69F1D68F-9CD5-4EA6-9B47-2A7A9BF8CED9}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {69F1D68F-9CD5-4EA6-9B47-2A7A9BF8CED9}.Release|x64.ActiveCfg = Release|Any CPU - {69F1D68F-9CD5-4EA6-9B47-2A7A9BF8CED9}.Release|x64.Build.0 = Release|Any CPU - {69F1D68F-9CD5-4EA6-9B47-2A7A9BF8CED9}.Release|x86.ActiveCfg = Release|Any CPU - {69F1D68F-9CD5-4EA6-9B47-2A7A9BF8CED9}.Release|x86.Build.0 = Release|Any CPU - {69F1D68F-9CD5-4EA6-9B47-2A7A9BF8CED9}.Release-Stable|Any CPU.ActiveCfg = Release|Any CPU - {69F1D68F-9CD5-4EA6-9B47-2A7A9BF8CED9}.Release-Stable|Any CPU.Build.0 = Release|Any CPU - {69F1D68F-9CD5-4EA6-9B47-2A7A9BF8CED9}.Release-Stable|ARM.ActiveCfg = Release|Any CPU - {69F1D68F-9CD5-4EA6-9B47-2A7A9BF8CED9}.Release-Stable|ARM.Build.0 = Release|Any CPU - {69F1D68F-9CD5-4EA6-9B47-2A7A9BF8CED9}.Release-Stable|ARM64.ActiveCfg = Release|Any CPU - {69F1D68F-9CD5-4EA6-9B47-2A7A9BF8CED9}.Release-Stable|ARM64.Build.0 = Release|Any CPU - {69F1D68F-9CD5-4EA6-9B47-2A7A9BF8CED9}.Release-Stable|iPhone.ActiveCfg = Release|Any CPU - {69F1D68F-9CD5-4EA6-9B47-2A7A9BF8CED9}.Release-Stable|iPhone.Build.0 = Release|Any CPU - {69F1D68F-9CD5-4EA6-9B47-2A7A9BF8CED9}.Release-Stable|iPhoneSimulator.ActiveCfg = Release|Any CPU - {69F1D68F-9CD5-4EA6-9B47-2A7A9BF8CED9}.Release-Stable|iPhoneSimulator.Build.0 = Release|Any CPU - {69F1D68F-9CD5-4EA6-9B47-2A7A9BF8CED9}.Release-Stable|x64.ActiveCfg = Release|Any CPU - {69F1D68F-9CD5-4EA6-9B47-2A7A9BF8CED9}.Release-Stable|x64.Build.0 = Release|Any CPU - {69F1D68F-9CD5-4EA6-9B47-2A7A9BF8CED9}.Release-Stable|x86.ActiveCfg = Release|Any CPU - {69F1D68F-9CD5-4EA6-9B47-2A7A9BF8CED9}.Release-Stable|x86.Build.0 = Release|Any CPU {5A5CE693-A67D-4B28-8DCE-4B0EA3A47533}.Debug|Any CPU.ActiveCfg = Debug|x86 {5A5CE693-A67D-4B28-8DCE-4B0EA3A47533}.Debug|Any CPU.Build.0 = Debug|x86 {5A5CE693-A67D-4B28-8DCE-4B0EA3A47533}.Debug|Any CPU.Deploy.0 = Debug|x86 diff --git a/Sources/Stylophone/Helpers/LiveTileHelper.cs b/Sources/Stylophone/Helpers/LiveTileHelper.cs index dd01c36a..e892990e 100644 --- a/Sources/Stylophone/Helpers/LiveTileHelper.cs +++ b/Sources/Stylophone/Helpers/LiveTileHelper.cs @@ -18,8 +18,7 @@ public async static Task UpdatePlayingSongAsync(TrackViewModel track) var album = track.File.Album; var f = track.File; - var uniqueIdentifier = f.HasAlbum ? f.Album : f.HasTitle ? f.Title : f.Path; - uniqueIdentifier = Miscellaneous.EscapeFilename(uniqueIdentifier); + var uniqueIdentifier = Miscellaneous.GetFileIdentifier(f); // Use the cached albumart if it exists var artUri = $"ms-appdata:///local/AlbumArt/{uniqueIdentifier}"; diff --git a/Sources/Stylophone/Package.appxmanifest b/Sources/Stylophone/Package.appxmanifest index ca4bc761..f43639de 100644 --- a/Sources/Stylophone/Package.appxmanifest +++ b/Sources/Stylophone/Package.appxmanifest @@ -12,7 +12,7 @@ + Version="2.2.0.0" /> diff --git a/Sources/Stylophone/Package.tt b/Sources/Stylophone/Package.tt index 3b305f48..32499621 100644 --- a/Sources/Stylophone/Package.tt +++ b/Sources/Stylophone/Package.tt @@ -2,7 +2,7 @@ <#@ output extension=".appxmanifest" #> <#@ parameter type="System.String" name="BuildConfiguration" #> <# - string version = "2.1.2.0"; + string version = "2.2.0.0"; // Get configuration name at Build time string configName = Host.ResolveParameterValue("-", "-", "BuildConfiguration"); diff --git a/Sources/Stylophone/Services/SystemMediaControlsService.cs b/Sources/Stylophone/Services/SystemMediaControlsService.cs index 7d295ef3..2d501e16 100644 --- a/Sources/Stylophone/Services/SystemMediaControlsService.cs +++ b/Sources/Stylophone/Services/SystemMediaControlsService.cs @@ -111,8 +111,7 @@ public async Task UpdateMetadataAsync(TrackViewModel track) updater.MusicProperties.AlbumTitle = track.File.Album ?? ""; // Set the album art thumbnail. - var uniqueIdentifier = track.File.HasAlbum ? track.File.Album : track.File.HasTitle ? track.File.Title : track.File.Path; - uniqueIdentifier = Miscellaneous.EscapeFilename(uniqueIdentifier); + var uniqueIdentifier = Miscellaneous.GetFileIdentifier(track.File); // Use the cached albumart if it exists var artUri = $"ms-appdata:///local/AlbumArt/{uniqueIdentifier}"; diff --git a/Sources/Stylophone/Strings/fr-fr/Resources.resw b/Sources/Stylophone/Strings/fr-fr/Resources.resw deleted file mode 100644 index 94a74767..00000000 --- a/Sources/Stylophone/Strings/fr-fr/Resources.resw +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Stylophone - Application display name - - - Stylophone - Application description - - \ No newline at end of file diff --git a/Sources/Stylophone/Stylophone.csproj b/Sources/Stylophone/Stylophone.csproj index 05165829..890005a1 100644 --- a/Sources/Stylophone/Stylophone.csproj +++ b/Sources/Stylophone/Stylophone.csproj @@ -32,7 +32,7 @@ True DXFeatureLevel - Language=en;fr + Language=en;fr;pt @@ -140,31 +140,31 @@ - 4.3.0 + 4.5.0 - 4.3.0 + 4.5.0 - 5.0.2 + 6.0.0 - 6.2.12 + 6.2.13 - 7.0.2 + 7.1.2 - 7.0.2 + 7.1.2 - 7.0.2 + 7.1.2 - 7.0.2 + 7.1.2 - 7.0.2 + 7.1.2 2.7.0 @@ -172,6 +172,9 @@ 2.0.1 + + 1.3.0 + 2.80.2 @@ -401,7 +404,6 @@ - @@ -413,10 +415,6 @@ - - {8994c820-7ba9-4bb8-b9ea-c608b07c4a11} - MpcNET - {83b15d0e-c82f-4438-8290-0dfc23a6498f} Stylophone.Common diff --git a/Sources/Stylophone/Views/Playback/NowPlayingBar.xaml b/Sources/Stylophone/Views/Playback/NowPlayingBar.xaml index ba0f6f25..14713f3e 100644 --- a/Sources/Stylophone/Views/Playback/NowPlayingBar.xaml +++ b/Sources/Stylophone/Views/Playback/NowPlayingBar.xaml @@ -524,6 +524,16 @@ + + + + + + - - diff --git a/Sources/Stylophone/Views/ShellPage.xaml b/Sources/Stylophone/Views/ShellPage.xaml index 0592a71d..646f2256 100644 --- a/Sources/Stylophone/Views/ShellPage.xaml +++ b/Sources/Stylophone/Views/ShellPage.xaml @@ -27,6 +27,7 @@ +