diff --git a/BetaChangeLog.txt b/BetaChangeLog.txt index c7ed3a2..09d6ebf 100644 --- a/BetaChangeLog.txt +++ b/BetaChangeLog.txt @@ -1,3 +1,6 @@ +v1.4.11 +Added http api command "toggleplaypause". + v1.4.10 Added support for switching audio output devices. (Thanks to joecoolio) diff --git a/Elpis/MainWindow.xaml.cs b/Elpis/MainWindow.xaml.cs index b04f68c..7cc0736 100644 --- a/Elpis/MainWindow.xaml.cs +++ b/Elpis/MainWindow.xaml.cs @@ -827,6 +827,21 @@ public static void Play() _player.Play(); })); } + public static void PlayPauseToggle() + { + System.Windows.Application.Current.Dispatcher.Invoke((Action)(() => + { + if (_player.Paused) + { + _mainWindow.showBalloon(PLAY); + } + if (_player.Playing) + { + _mainWindow.showBalloon(PAUSE); + } + _player.PlayPause(); + })); + } public static void Like() { System.Windows.Application.Current.Dispatcher.Invoke((Action)(() => diff --git a/Elpis/Properties/AssemblyInfo.cs b/Elpis/Properties/AssemblyInfo.cs index 3a7079f..8ddfa6f 100644 --- a/Elpis/Properties/AssemblyInfo.cs +++ b/Elpis/Properties/AssemblyInfo.cs @@ -52,5 +52,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.4.10")] +[assembly: AssemblyVersion("1.4.11")] //[assembly: AssemblyFileVersion("0.0.0.0")] \ No newline at end of file diff --git a/Elpis/WebInterface.cs b/Elpis/WebInterface.cs index 652ad1d..514ad6d 100644 --- a/Elpis/WebInterface.cs +++ b/Elpis/WebInterface.cs @@ -129,6 +129,30 @@ public void OnRequest(HttpRequestHead request, IDataProducer requestBody, }; response.OnResponse(headers, new BufferedProducer(body)); } + else if (request.Method.ToUpperInvariant() == "GET" && request.Uri.StartsWith("/toggleplaypause")) + { + var body = ""; + if (MainWindow._player.Playing) + { + body = "Paused."; + } + else + { + body = "Playing."; + } + MainWindow.PlayPauseToggle(); + + var headers = new HttpResponseHead() + { + Status = "200 OK", + Headers = new Dictionary() + { + { "Content-Type", "text/plain" }, + { "Content-Length", body.Length.ToString() }, + } + }; + response.OnResponse(headers, new BufferedProducer(body)); + } else if (request.Method.ToUpperInvariant() == "GET" && request.Uri.StartsWith("/like")) { MainWindow.Like(); diff --git a/ElpisSetup/ElpisSetup.vdproj b/ElpisSetup/ElpisSetup.vdproj index 286b6bb..6382296 100644 --- a/ElpisSetup/ElpisSetup.vdproj +++ b/ElpisSetup/ElpisSetup.vdproj @@ -34,13 +34,13 @@ "Entry" { "MsmKey" = "8:_28035C075265B0593085A2866E700674" - "OwnerKey" = "8:_C0D607861CBA44EB990DD3A2C241B2C6" + "OwnerKey" = "8:_ABD5A4E57FD842C5AFA8FFBF5B55064E" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_28035C075265B0593085A2866E700674" - "OwnerKey" = "8:_ABD5A4E57FD842C5AFA8FFBF5B55064E" + "OwnerKey" = "8:_C0D607861CBA44EB990DD3A2C241B2C6" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -136,13 +136,13 @@ "Entry" { "MsmKey" = "8:_C3FC75DE0D4394CCCC02FDC3089DF8C0" - "OwnerKey" = "8:_C0D607861CBA44EB990DD3A2C241B2C6" + "OwnerKey" = "8:_E91B36C8829F1D3F85101A8682DD0A4E" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_C3FC75DE0D4394CCCC02FDC3089DF8C0" - "OwnerKey" = "8:_ABD5A4E57FD842C5AFA8FFBF5B55064E" + "OwnerKey" = "8:_28035C075265B0593085A2866E700674" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -154,13 +154,13 @@ "Entry" { "MsmKey" = "8:_C3FC75DE0D4394CCCC02FDC3089DF8C0" - "OwnerKey" = "8:_28035C075265B0593085A2866E700674" + "OwnerKey" = "8:_ABD5A4E57FD842C5AFA8FFBF5B55064E" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_C3FC75DE0D4394CCCC02FDC3089DF8C0" - "OwnerKey" = "8:_E91B36C8829F1D3F85101A8682DD0A4E" + "OwnerKey" = "8:_C0D607861CBA44EB990DD3A2C241B2C6" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -172,13 +172,13 @@ "Entry" { "MsmKey" = "8:_D3A5D7EE5E1B649F19FA950B9F4A1BD2" - "OwnerKey" = "8:_7AB720A5D8D651D9FB48BF4B06BEE4AD" + "OwnerKey" = "8:_400B827A0F0AD2219A9A7D5665DAECB3" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_D3A5D7EE5E1B649F19FA950B9F4A1BD2" - "OwnerKey" = "8:_400B827A0F0AD2219A9A7D5665DAECB3" + "OwnerKey" = "8:_7AB720A5D8D651D9FB48BF4B06BEE4AD" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -202,7 +202,7 @@ "Entry" { "MsmKey" = "8:_E91B36C8829F1D3F85101A8682DD0A4E" - "OwnerKey" = "8:_C0D607861CBA44EB990DD3A2C241B2C6" + "OwnerKey" = "8:_28035C075265B0593085A2866E700674" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -214,7 +214,7 @@ "Entry" { "MsmKey" = "8:_E91B36C8829F1D3F85101A8682DD0A4E" - "OwnerKey" = "8:_28035C075265B0593085A2866E700674" + "OwnerKey" = "8:_C0D607861CBA44EB990DD3A2C241B2C6" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -226,31 +226,31 @@ "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_ABD5A4E57FD842C5AFA8FFBF5B55064E" + "OwnerKey" = "8:_D3A5D7EE5E1B649F19FA950B9F4A1BD2" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_010E6E01E6F5B6AADC295523D4ECA4D6" + "OwnerKey" = "8:_C3FC75DE0D4394CCCC02FDC3089DF8C0" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_7AB720A5D8D651D9FB48BF4B06BEE4AD" + "OwnerKey" = "8:_400B827A0F0AD2219A9A7D5665DAECB3" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_28035C075265B0593085A2866E700674" + "OwnerKey" = "8:_B90B87FCA3141C9B270F792D475E5A0F" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_E91B36C8829F1D3F85101A8682DD0A4E" + "OwnerKey" = "8:_6B9D0DC250535A53CC073223A6735BFF" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -262,31 +262,31 @@ "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_6B9D0DC250535A53CC073223A6735BFF" + "OwnerKey" = "8:_E91B36C8829F1D3F85101A8682DD0A4E" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_B90B87FCA3141C9B270F792D475E5A0F" + "OwnerKey" = "8:_28035C075265B0593085A2866E700674" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_400B827A0F0AD2219A9A7D5665DAECB3" + "OwnerKey" = "8:_7AB720A5D8D651D9FB48BF4B06BEE4AD" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_C3FC75DE0D4394CCCC02FDC3089DF8C0" + "OwnerKey" = "8:_010E6E01E6F5B6AADC295523D4ECA4D6" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_D3A5D7EE5E1B649F19FA950B9F4A1BD2" + "OwnerKey" = "8:_ABD5A4E57FD842C5AFA8FFBF5B55064E" "MsmSig" = "8:_UNDEFINED" } } @@ -904,15 +904,15 @@ { "Name" = "8:Microsoft Visual Studio" "ProductName" = "8:Elpis" - "ProductCode" = "8:{550F6F71-E6FB-49B1-83ED-11BFCF3A31B4}" - "PackageCode" = "8:{F773E32B-310D-4FF3-B238-887F0EC9BC11}" + "ProductCode" = "8:{EBDFB764-182D-401E-80F7-495340C0F943}" + "PackageCode" = "8:{A60F8AE8-5148-45E0-B42B-8B5018BB6FF2}" "UpgradeCode" = "8:{F0962B86-5C6F-4A2C-98F4-2FF9D0AC46AD}" "AspNetVersion" = "8:4.0.30319.0" "RestartWWWService" = "11:FALSE" "RemovePreviousVersions" = "11:TRUE" "DetectNewerInstalledVersion" = "11:TRUE" "InstallAllUsers" = "11:FALSE" - "ProductVersion" = "8:1.4.10" + "ProductVersion" = "8:1.4.11" "Manufacturer" = "8:Adam Haile, Alexey Seliverstov" "ARPHELPTELEPHONE" = "8:" "ARPHELPLINK" = "8:https://github.com/adammhaile/Elpis/" diff --git a/version.config b/version.config index f53bd6b..1d4d344 100644 --- a/version.config +++ b/version.config @@ -1,6 +1,6 @@ CurrentVersion|1.4.7.0 DownloadUrl|https://github.com/adammhaile/Elpis/releases/download/1.4.7/ElpisInstall_1.4.7.exe ReleaseNotes|https://raw.githubusercontent.com/adammhaile/Elpis/master/ChangeLog.txt -BetaVersion|1.4.10.0 -BetaDownloadUrl|https://github.com/adammhaile/Elpis/releases/download/1.4.10/ElpisInstall_1.4.10.exe +BetaVersion|1.4.11.0 +BetaDownloadUrl|https://github.com/adammhaile/Elpis/releases/download/1.4.11/ElpisInstall_1.4.11.exe BetaReleaseNotes|https://raw.githubusercontent.com/adammhaile/Elpis/master/BetaChangeLog.txt