From 3e6a15b04949b6fe58025f76a3b59071f9e55c73 Mon Sep 17 00:00:00 2001 From: Shukuyen Date: Sun, 5 Jan 2014 20:00:15 +0100 Subject: [PATCH 1/9] Fix screen blanking bug (thanks johan) Closes #13 Closes #14 --- Sources/WifiRemote/Core/SocketServer.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Sources/WifiRemote/Core/SocketServer.cs b/Sources/WifiRemote/Core/SocketServer.cs index b6acbbd..c6e405c 100644 --- a/Sources/WifiRemote/Core/SocketServer.cs +++ b/Sources/WifiRemote/Core/SocketServer.cs @@ -573,6 +573,12 @@ void newSocket_DidRead(AsyncSocket sender, byte[] data, long tag) { // Turn on display keybd_event(VK_LSHIFT, 0x45, KEYEVENTF_KEYUP, 0); + if (GUIGraphicsContext.BlankScreen) + { + WifiRemote.LogMessage("Blank screen active, turn on screen", WifiRemote.LogType.Debug); + GUIGraphicsContext.BlankScreen = false; + GUIGraphicsContext.ResetLastActivity(); + } // Send a command if (type == "command") @@ -914,6 +920,13 @@ void newSocket_DidRead(AsyncSocket sender, byte[] data, long tag) // Turn on display keybd_event(VK_LSHIFT, 0x45, KEYEVENTF_KEYUP, 0); + if (GUIGraphicsContext.BlankScreen) + { + WifiRemote.LogMessage("Blank screen active, turn on screen", WifiRemote.LogType.Debug); + GUIGraphicsContext.BlankScreen = false; + GUIGraphicsContext.ResetLastActivity(); + } + if (WifiRemote.IsAvailableNotificationBar && ShowNotifications) { From e0591a6b0d6fb027a74358610d5cfc0bb91db379 Mon Sep 17 00:00:00 2001 From: Shukuyen Date: Sat, 11 Jan 2014 00:02:02 +0100 Subject: [PATCH 2/9] Fixed crash with Argus TV in now playing message Commiting for johanj to keep git happy :) Thanks! --- Sources/WifiRemote/Core/WifiRemote.cs | 9 ++++++- .../WifiRemote/Messages/MessageNowPlaying.cs | 25 +++++++------------ 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Sources/WifiRemote/Core/WifiRemote.cs b/Sources/WifiRemote/Core/WifiRemote.cs index 973e0f2..c9ba1b8 100644 --- a/Sources/WifiRemote/Core/WifiRemote.cs +++ b/Sources/WifiRemote/Core/WifiRemote.cs @@ -333,7 +333,14 @@ public void Start() g_Player.PlayBackEnded += new g_Player.EndedHandler(g_Player_PlayBackEnded); g_Player.PlayBackStopped += new g_Player.StoppedHandler(g_Player_PlayBackStopped); g_Player.PlayBackChanged += new g_Player.ChangedHandler(g_Player_PlayBackChanged); - g_Player.TVChannelChanged += new g_Player.TVChannelChangeHandler(g_Player_TVPlayBackChanged); + + // Only subscribe to the tv channel changed callback if the tv plugin is installed. + // Argus users will experience crashes otherwise. + if (WifiRemote.IsAvailableTVPlugin) + { + g_Player.TVChannelChanged += new g_Player.TVChannelChangeHandler(g_Player_TVPlayBackChanged); + } + GUIWindowManager.Receivers += new SendMessageHandler(GUIWindowManager_Receivers); diff --git a/Sources/WifiRemote/Messages/MessageNowPlaying.cs b/Sources/WifiRemote/Messages/MessageNowPlaying.cs index e57e2b0..7d893f3 100644 --- a/Sources/WifiRemote/Messages/MessageNowPlaying.cs +++ b/Sources/WifiRemote/Messages/MessageNowPlaying.cs @@ -187,27 +187,20 @@ public IAdditionalNowPlayingInfo MediaInfo } } } - else if (g_Player.IsTV) + else if (g_Player.IsTV && WifiRemote.IsAvailableTVPlugin) { - if (!WifiRemote.IsAvailableTVPlugin) + if (g_Player.IsTVRecording) { - WifiRemote.LogMessage("No TVPlugin installed: can't add now playing", WifiRemote.LogType.Error); + NowPlayingRecording recording = MpTvServerHelper.GetNowPlayingRecording(); + + if (recording.IsRecording()) + { + return recording; + } } else { - if (g_Player.IsTVRecording) - { - NowPlayingRecording recording = MpTvServerHelper.GetNowPlayingRecording(); - - if (recording.IsRecording()) - { - return recording; - } - } - else - { - return MpTvServerHelper.GetNowPlayingTv(); - } + return MpTvServerHelper.GetNowPlayingTv(); } } } From 6a8c02a2871e4a34305d7a8751b47988c1e6e075 Mon Sep 17 00:00:00 2001 From: johanj Date: Sun, 12 Jan 2014 22:32:57 +0100 Subject: [PATCH 3/9] -Fix for previous channel issue. Now retrieves current time-shifting tv channel from tv card instead of the navigator. -Added TvControl.dll as dependecy. --- Libs/TvControl.dll | Bin 0 -> 40448 bytes Sources/WifiRemote/Core/WifiRemote.cs | 6 +-- .../Messages/Now Playing/NowPlayingTv.cs | 43 ++++++++++-------- .../PluginConnection/MpTvServerHelper.cs | 17 ++++++- Sources/WifiRemote/WifiRemote.csproj | 4 ++ 5 files changed, 46 insertions(+), 24 deletions(-) create mode 100644 Libs/TvControl.dll diff --git a/Libs/TvControl.dll b/Libs/TvControl.dll new file mode 100644 index 0000000000000000000000000000000000000000..d26dcbc88eb33d2385f15932d16b29a5611651ec GIT binary patch literal 40448 zcmeHw3w+eomH+uY=8?&R%p@cr2}}rL2uXM=2r3~75G4;t0BylINrq%3nTazKBqA8L z)<@MUt+irxtF+Zx+iIS^f8=Yq!-^Q>k@Vx7x*R-PPLF|M#5x`~BuONqE@* z_VfSz9|Lpdo^#JV_uO;OJ@@sSNy`UrA%loayx)6|=uv#~Yqh`=gHdD`%=%UVJ(Ba& zibu5#KdtEOkEOyx$wXf=G8pcO#N&x{xH}q74#&f>c(}2xBRrVsjn?Jo2j*C!+nb0s zXa>Eo=Np^s+Fm5RB3H{Lx(yVsqSifv&oJJP;Z0O1X-)XjA)b%G5+-;Q66Y_KTK3MKJP?$n8@$S_XA(=!t2t}-D%)UZv{Y} zwAIoZn7qP7m((Rw$sS;$+ha&@LvP31^;(VYs!K)(5@2Lq=|#L*)}45}UaN`LxKK$J zvR(0F-E{KM=Ua&0>Sf#gWv`-z2AzST=!M`ubg~)n=KA!i5K$oQLlt>fG12d<0>k`( z*SF-wYC2At;!`PuW(N12o?Q>@j(V7gdcZKgo^fTQp5v6cw{&za6^64unS-WRm4Gja1`d^0l_I&X3T*nj-f2jurUN7{)W}3kh zT{_pBC&1uQAwQO$oro=LE zSDz-fsyolSvkI6AM7`6?;<)@hL7W)t6Mk41uxJ=8l!l9V^cBCl&*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3hBj2LBGx4`d782nX<#bkw6TAWTXpqY1b@r(rZ#4KEn_qLJR3~zIrsefK&7!%JM1AAa?Uy$4F-HkNlJE z%2|h1_&o*9(VovM`5J+B$y`k^-y|o}&;g4dr|cHl2d7YykBRxU2&YkJ;?2JX!}_km zuQO<}6;mfaap*kY(s*JWb+W%k^oM=UK-mqbqfbh4tB25D*0c|28foxMq=oSd0%2UC zu-%s7(3(?=@Q=?OPJChkaj-Az%V(in2lo!^YxfUha>_D^Z8CZ<$9MKMoQ3d76Q3#a zS&VZ&gE}TZFCqMP4%;@n+;|I*w=e(Bj)oIpJZp#64a%9|2- void g_Player_TVPlayBackChanged() { - TvPlugin.TVHome.Navigator.UpdateCurrentChannel(); - TvDatabase.Channel current = TvPlugin.TVHome.Navigator.Channel; + TvDatabase.Channel current = MpTvServerHelper.GetCurrentTimeShiftingTVChannel(); - if (socketServer != null && (LatestChannelId == -1 || LatestChannelId != current.IdChannel)) + if (socketServer != null && current != null && (LatestChannelId == -1 || LatestChannelId != current.IdChannel)) { LatestChannelId = current.IdChannel; LogMessage("TV Playback changed!", LogType.Debug); diff --git a/Sources/WifiRemote/Messages/Now Playing/NowPlayingTv.cs b/Sources/WifiRemote/Messages/Now Playing/NowPlayingTv.cs index 5288e2c..7c996b2 100644 --- a/Sources/WifiRemote/Messages/Now Playing/NowPlayingTv.cs +++ b/Sources/WifiRemote/Messages/Now Playing/NowPlayingTv.cs @@ -6,6 +6,7 @@ using System.IO; using System.Drawing; using WifiRemote.MpExtended; +using WifiRemote.PluginConnection; namespace WifiRemote { @@ -145,29 +146,31 @@ public DateTime NextProgramEnd /// public NowPlayingTv() { - TvPlugin.TVHome.Navigator.UpdateCurrentChannel(); - TvDatabase.Channel current = TvPlugin.TVHome.Navigator.Channel; - ChannelId = current.IdChannel; - ChannelName = current.DisplayName; - - if (current.CurrentProgram != null) + TvDatabase.Channel current = MpTvServerHelper.GetCurrentTimeShiftingTVChannel(); + if (current != null) { - CurrentProgramId = current.CurrentProgram.IdProgram; - CurrentProgramName = current.CurrentProgram.Title; - CurrentProgramDescription = current.CurrentProgram.Description; - CurrentProgramBegin = current.CurrentProgram.StartTime; - CurrentProgramEnd = current.CurrentProgram.EndTime; - } - if (current.NextProgram != null) - { - NextProgramId = current.NextProgram.IdProgram; - NextProgramName = current.NextProgram.Title; - NextProgramDescription = current.NextProgram.Description; - NextProgramBegin = current.NextProgram.StartTime; - NextProgramEnd = current.NextProgram.EndTime; + ChannelId = current.IdChannel; + ChannelName = current.DisplayName; + + if (current.CurrentProgram != null) + { + CurrentProgramId = current.CurrentProgram.IdProgram; + CurrentProgramName = current.CurrentProgram.Title; + CurrentProgramDescription = current.CurrentProgram.Description; + CurrentProgramBegin = current.CurrentProgram.StartTime; + CurrentProgramEnd = current.CurrentProgram.EndTime; + } + + if (current.NextProgram != null) + { + NextProgramId = current.NextProgram.IdProgram; + NextProgramName = current.NextProgram.Title; + NextProgramDescription = current.NextProgram.Description; + NextProgramBegin = current.NextProgram.StartTime; + NextProgramEnd = current.NextProgram.EndTime; + } } - } } } diff --git a/Sources/WifiRemote/PluginConnection/MpTvServerHelper.cs b/Sources/WifiRemote/PluginConnection/MpTvServerHelper.cs index eaffbfc..81e8c39 100644 --- a/Sources/WifiRemote/PluginConnection/MpTvServerHelper.cs +++ b/Sources/WifiRemote/PluginConnection/MpTvServerHelper.cs @@ -6,6 +6,7 @@ using MediaPortal.Player; using TvDatabase; using MediaPortal.Util; +using TvPlugin; namespace WifiRemote.PluginConnection { @@ -224,6 +225,20 @@ internal static NowPlayingRadio GetNowPlayingRadio() NowPlayingRadio radio = new NowPlayingRadio(); return radio; } - + + internal static TvDatabase.Channel GetCurrentTimeShiftingTVChannel() + { + if (TVHome.Connected && TVHome.Card.IsTimeShifting) + { + int id = TVHome.Card.IdChannel; + if (id >= 0) + { + TvDatabase.Channel current = TvDatabase.Channel.Retrieve(id); + return current; + } + } + return null; + } + } } diff --git a/Sources/WifiRemote/WifiRemote.csproj b/Sources/WifiRemote/WifiRemote.csproj index 5c0e6c0..04978b3 100644 --- a/Sources/WifiRemote/WifiRemote.csproj +++ b/Sources/WifiRemote/WifiRemote.csproj @@ -110,6 +110,10 @@ ..\..\Libs\TraktPlugin.dll + + False + bin\Release\TvControl.dll + False ..\..\Libs\TVDatabase.dll From 170284e9d4d8a32983b18c1d03b1bd9c780f2308 Mon Sep 17 00:00:00 2001 From: johanj Date: Mon, 13 Jan 2014 16:59:06 +0100 Subject: [PATCH 4/9] Changed faulty path of dependency 'TvControl.dll' --- Sources/WifiRemote/WifiRemote.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/WifiRemote/WifiRemote.csproj b/Sources/WifiRemote/WifiRemote.csproj index 04978b3..e29a6b7 100644 --- a/Sources/WifiRemote/WifiRemote.csproj +++ b/Sources/WifiRemote/WifiRemote.csproj @@ -112,7 +112,7 @@ False - bin\Release\TvControl.dll + ..\..\Libs\TvControl.dll False From 5cb66e0913af414664bc9266f1dbc44567514fe9 Mon Sep 17 00:00:00 2001 From: Shukuyen Date: Sat, 25 Jan 2014 21:51:31 +0100 Subject: [PATCH 5/9] Added MediaPortal plugin dependency info --- Sources/WifiRemote/Properties/AssemblyInfo.cs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Sources/WifiRemote/Properties/AssemblyInfo.cs b/Sources/WifiRemote/Properties/AssemblyInfo.cs index db485b5..c4a42f0 100644 --- a/Sources/WifiRemote/Properties/AssemblyInfo.cs +++ b/Sources/WifiRemote/Properties/AssemblyInfo.cs @@ -7,11 +7,14 @@ // Version Compatibility // http://wiki.team-mediaportal.com/1_MEDIAPORTAL_1/18_Contribute/6_Plugins/Plugin_Related_Changes/1.1.0_to_1.2.0/Version_Compatibility [assembly: CompatibleVersion("1.5.100.0", "1.1.6.27644")] -//[assembly: UsesSubsystem("MP.DB.Music")] -//[assembly: UsesSubsystem("MP.DB.Videos")] -//[assembly: UsesSubsystem("MP.Config")] -//[assembly: UsesSubsystem("MP.Input.Mapping")] -//[assembly: UsesSubsystem("MP.Players")] +[assembly: UsesSubsystem("MP.SkinEngine")] +[assembly: UsesSubsystem("MP.Input")] +[assembly: UsesSubsystem("MP.Players")] +[assembly: UsesSubsystem("MP.Config")] +[assembly: UsesSubsystem("MP.Plugins.Music")] +[assembly: UsesSubsystem("MP.Plugins.Videos")] +[assembly: UsesSubsystem("MP.Plugins.TV")] +[assembly: UsesSubsystem("MP.TVE")] // Allgemeine Informationen über eine Assembly werden über die folgenden // Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, @@ -43,5 +46,5 @@ // Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern // übernehmen, indem Sie "*" eingeben: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.8.0.0")] -[assembly: AssemblyFileVersion("0.8.0.0")] +[assembly: AssemblyVersion("0.8.1.0")] +[assembly: AssemblyFileVersion("0.8.1.0")] From fd652adb1243cad40275362b38959ac6f5c12171 Mon Sep 17 00:00:00 2001 From: Shukuyen Date: Thu, 6 Feb 2014 22:18:06 +0100 Subject: [PATCH 6/9] Removed TVE from dependencies to avoid marking the plugin as incompatible when no tv server is installed Close #12 --- Sources/WifiRemote/Properties/AssemblyInfo.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Sources/WifiRemote/Properties/AssemblyInfo.cs b/Sources/WifiRemote/Properties/AssemblyInfo.cs index c4a42f0..a97b70b 100644 --- a/Sources/WifiRemote/Properties/AssemblyInfo.cs +++ b/Sources/WifiRemote/Properties/AssemblyInfo.cs @@ -14,7 +14,10 @@ [assembly: UsesSubsystem("MP.Plugins.Music")] [assembly: UsesSubsystem("MP.Plugins.Videos")] [assembly: UsesSubsystem("MP.Plugins.TV")] -[assembly: UsesSubsystem("MP.TVE")] + +// Makes the plugin incompatible when no tv server installed +// Need to find a solution for that. +// [assembly: UsesSubsystem("MP.TVE")] // Allgemeine Informationen über eine Assembly werden über die folgenden // Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, From cee930d4b4ce0d6b8e7ba8575a90692db7129fa7 Mon Sep 17 00:00:00 2001 From: Shukuyen Date: Thu, 6 Feb 2014 23:54:15 +0100 Subject: [PATCH 7/9] Added possibility to show ok dialog in MediaPortal Added demo for show dialog to demo client Fix #18 --- Sources/DemoClient/DemoClient.csproj | 1 + .../DemoClient/Messages/MessageShowDialog.cs | 37 +++++++++++++++++++ Sources/DemoClient/Remote.Designer.cs | 12 +++++- Sources/DemoClient/Remote.cs | 7 ++++ .../WifiRemote/MPDialogs/ShowDialogHelper.cs | 18 +++++++++ .../MPDialogs/ShowDialogMessageHandler.cs | 12 +++++- 6 files changed, 85 insertions(+), 2 deletions(-) create mode 100644 Sources/DemoClient/Messages/MessageShowDialog.cs diff --git a/Sources/DemoClient/DemoClient.csproj b/Sources/DemoClient/DemoClient.csproj index 11afcbc..311c882 100644 --- a/Sources/DemoClient/DemoClient.csproj +++ b/Sources/DemoClient/DemoClient.csproj @@ -51,6 +51,7 @@ + Form diff --git a/Sources/DemoClient/Messages/MessageShowDialog.cs b/Sources/DemoClient/Messages/MessageShowDialog.cs new file mode 100644 index 0000000..39e6e84 --- /dev/null +++ b/Sources/DemoClient/Messages/MessageShowDialog.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace DemoClient +{ + class MessageShowDialog : IMessage + { + String type = "showdialog"; + public String Type + { + get { return type; } + } + + public String AutologinKey + { + get; + set; + } + + public String DialogType + { + get { return "ok"; } + } + + public String Title + { + get { return "Message from DemoClient"; } + } + + public String Text + { + get { return "This is an OK dialog. Oh myy!"; } + } + } +} diff --git a/Sources/DemoClient/Remote.Designer.cs b/Sources/DemoClient/Remote.Designer.cs index 6b80206..b25c808 100644 --- a/Sources/DemoClient/Remote.Designer.cs +++ b/Sources/DemoClient/Remote.Designer.cs @@ -60,6 +60,7 @@ private void InitializeComponent() this.sQLMusicTestToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.loadPlaylistToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel(); + this.showOKDialogToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); this.splitContainer1.SuspendLayout(); @@ -393,7 +394,8 @@ private void InitializeComponent() this.requestNowPlayingInfoToolStripMenuItem, this.tVChannelSwitchToolStripMenuItem, this.sQLMusicTestToolStripMenuItem, - this.loadPlaylistToolStripMenuItem}); + this.loadPlaylistToolStripMenuItem, + this.showOKDialogToolStripMenuItem}); this.toolStripDropDownButton1.Image = global::DemoClient.Properties.Resources.options; this.toolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolStripDropDownButton1.Name = "toolStripDropDownButton1"; @@ -447,6 +449,13 @@ private void InitializeComponent() this.toolStripStatusLabel1.Text = "Select server to connect"; this.toolStripStatusLabel1.Click += new System.EventHandler(this.toolStripStatusLabel1_Click); // + // showOKDialogToolStripMenuItem + // + this.showOKDialogToolStripMenuItem.Name = "showOKDialogToolStripMenuItem"; + this.showOKDialogToolStripMenuItem.Size = new System.Drawing.Size(208, 22); + this.showOKDialogToolStripMenuItem.Text = "Show OK Dialog"; + this.showOKDialogToolStripMenuItem.Click += new System.EventHandler(this.showOKDialogToolStripMenuItem_Click); + // // Remote // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -509,6 +518,7 @@ private void InitializeComponent() private System.Windows.Forms.ToolStripMenuItem tVChannelSwitchToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem sQLMusicTestToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem loadPlaylistToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem showOKDialogToolStripMenuItem; } } diff --git a/Sources/DemoClient/Remote.cs b/Sources/DemoClient/Remote.cs index 3de6235..80817eb 100644 --- a/Sources/DemoClient/Remote.cs +++ b/Sources/DemoClient/Remote.cs @@ -430,6 +430,11 @@ private void requestNowPlayingInfoToolStripMenuItem_Click(object sender, EventAr SendCommand(new MessageRequestNowPlaying(), socket); } + private void showOKDialogToolStripMenuItem_Click(object sender, EventArgs e) + { + SendCommand(new MessageShowDialog(), socket); + } + private void showConsoleWindowToolStripMenuItem_Click(object sender, EventArgs e) { if (logWindow.Visible) @@ -659,5 +664,7 @@ public void Log(string statusLabelText, string logWindowText, string toolStripTe } #endregion + + } } diff --git a/Sources/WifiRemote/MPDialogs/ShowDialogHelper.cs b/Sources/WifiRemote/MPDialogs/ShowDialogHelper.cs index 047f32f..5b8d3eb 100644 --- a/Sources/WifiRemote/MPDialogs/ShowDialogHelper.cs +++ b/Sources/WifiRemote/MPDialogs/ShowDialogHelper.cs @@ -38,6 +38,24 @@ internal static void ShowYesNoDialog(string dialogId, string title, string text, socketServer.SendMessageToClient(result, sender); } } + + /// + /// Show an ok dialog in MediaPortal + /// + /// Dialog title + /// Dialog text + internal static void ShowOkDialog(string title, string text) + { + GUIDialogOK dlg = (GUIDialogOK)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_OK); + if (dlg != null) + { + dlg.Reset(); + dlg.SetHeading(title); + dlg.SetLine(1, text); + dlg.DoModal(GUIWindowManager.ActiveWindow); + } + } + /// /// Show a select dialog in MediaPortal. After that, send the result to the sender. /// diff --git a/Sources/WifiRemote/MPDialogs/ShowDialogMessageHandler.cs b/Sources/WifiRemote/MPDialogs/ShowDialogMessageHandler.cs index 1c8dbe2..c6b01c5 100644 --- a/Sources/WifiRemote/MPDialogs/ShowDialogMessageHandler.cs +++ b/Sources/WifiRemote/MPDialogs/ShowDialogMessageHandler.cs @@ -33,6 +33,10 @@ internal static void HandleShowDialogMessage(Newtonsoft.Json.Linq.JObject messag //show dialog in new thread so we don't block the tcp thread new Thread(new ParameterizedThreadStart(ShowYesNoThreaded)).Start(new object[] { dialogId, title, text, socketServer, sender }); } + else if (dialogType.Equals("ok")) + { + new Thread(new ParameterizedThreadStart(ShowOkDialogThreaded)).Start(new object[] { title, text }); + } else if (dialogType.Equals("yesnoselect")) { List options = new List(); @@ -46,7 +50,7 @@ internal static void HandleShowDialogMessage(Newtonsoft.Json.Linq.JObject messag } //show dialog in new thread so we don't block the tcp thread - new Thread(new ParameterizedThreadStart(ShowYesNoThenSelectThreaded)).Start(new object[] { dialogId, title, text, options, socketServer, sender }); + new Thread(new ParameterizedThreadStart(ShowYesNoThenSelectThreaded)).Start(new object[] { dialogId, title, text, options, socketServer, sender }); } else if (dialogType.Equals("select")) { @@ -84,6 +88,12 @@ private static void ShowYesNoThreaded(object pars) ShowDialogHelper.ShowYesNoDialog((string)parameters[0], (string)parameters[1], (string)parameters[2], (SocketServer)parameters[3], (Deusty.Net.AsyncSocket)parameters[4]); } + private static void ShowOkDialogThreaded(object pars) + { + object[] parameters = (object[])pars; + ShowDialogHelper.ShowOkDialog((string)parameters[0], (string)parameters[1]); + } + /// /// Show yes/no-then-select dialog from a new thread /// From a26fc14a0447424e5707b27cc969ab772a922c5d Mon Sep 17 00:00:00 2001 From: Shukuyen Date: Sat, 15 Feb 2014 20:15:16 +0100 Subject: [PATCH 8/9] Bumped api version to 15 because of new dialogs --- Sources/WifiRemote/Messages/MessageWelcome.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/WifiRemote/Messages/MessageWelcome.cs b/Sources/WifiRemote/Messages/MessageWelcome.cs index 66ceaaf..0121cb1 100644 --- a/Sources/WifiRemote/Messages/MessageWelcome.cs +++ b/Sources/WifiRemote/Messages/MessageWelcome.cs @@ -10,7 +10,7 @@ namespace WifiRemote class MessageWelcome : IMessage { string type = "welcome"; - int server_version = 14; + int server_version = 15; AuthMethod authMethod = AuthMethod.UserPassword; /// From d8d2cb51c4a3f266e36f80c1b5e5772a0fe0cbeb Mon Sep 17 00:00:00 2001 From: Shukuyen Date: Sat, 15 Feb 2014 20:26:46 +0100 Subject: [PATCH 9/9] Installer for 0.8.1 --- Installer/WifiRemote_1_2_Installer.xmp2 | 31 ++++++++----------------- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/Installer/WifiRemote_1_2_Installer.xmp2 b/Installer/WifiRemote_1_2_Installer.xmp2 index d10c1ef..715289e 100644 --- a/Installer/WifiRemote_1_2_Installer.xmp2 +++ b/Installer/WifiRemote_1_2_Installer.xmp2 @@ -187,7 +187,7 @@ Click Next to continue or Cancel to exit Setup. 0 8 - 0 + 1 0 WifiRemote is a process plugin for the popular opensource mediacenter software "MediaPortal". @@ -197,28 +197,17 @@ Click Next to continue or Cancel to exit Setup. It publishes a Bonjour Service on your local network which allows clients (for example an iPhone or Android app) to list all found MediaPortal installations and connect to it. Developers: The WifiRemote source code moved to github! Please go to https://github.com/MPExtended/WifiRemote to check it out and feel free to fork and submit pull requests! -New in 0.8: -- api level increased to 14 -- MediaPortal 1.6 only, switched to .NET 4 -- Request a screenshot with the screenshot command -- Fixed missing text in dialogs -- Fixed crash related to music db changes in MediaPortal 1.6 (thanks, sebastiii!) -- Fixed crash when encountering music with special chars in it (thanks, Martin K.!) -- Added Artist to now playing radio message (thanks, johanj!) -- Added methods for setting playlist repeat and shuffle (thanks, johanj!) -- Improved starting radio channel (thanks, johanj!) -- Send open dialogs to connecting clients -- Send facade info to connecting clients -- Added ViewType property to FacadeInfo message -- Added support for the trakt plugin rating dialog - - - +New in 0.8.1: +- api level increased to 15 +- added "ok" dialog to ShowDialogs +- fixed tv now playing message braking zero button for switching to previous channels (thanks johanj!) +- fixed crash when using MediaPortal screen blanking (thanks johanj!) +- added MediaPortal compatibility checks Stable - https://github.com/MPExtended/WifiRemote/releases/download/0.8/WifiRemote_0.8.mpe1 - 2014-01-03T20:16:04 + https://github.com/MPExtended/WifiRemote/releases/download/0.8.1/WifiRemote_0.8.1.mpe1 + 2014-02-15T20:16:04 remote, wifi, json, client control - WifiRemote_0.8.mpe1 + WifiRemote_0.8.1.mpe1