diff --git a/AirPortal.suo b/AirPortal.suo
index dd63a10..3fb6765 100644
Binary files a/AirPortal.suo and b/AirPortal.suo differ
diff --git a/Source/AirPortal/AirPortal.cs b/Source/AirPortal/AirPortal.cs
index 05c97f5..2a20ed9 100644
--- a/Source/AirPortal/AirPortal.cs
+++ b/Source/AirPortal/AirPortal.cs
@@ -18,8 +18,11 @@
using MediaPortal.Player;
using System.IO;
using System.Drawing.Imaging;
+
using MediaPortal.Dialogs;
+
+
namespace AirPortal
{
public class AirPortal : ISetupForm, IPlugin
@@ -37,6 +40,8 @@ public class AirPortal : ISetupForm, IPlugin
NetService publishService = null;
Server theServer = null;
+
+
///
/// Mediaportal log type
///
@@ -319,11 +324,28 @@ void theServer_playURL(object sender, string url, double position)
position = 0;
}
+ if (GUIWindowManager.ActiveWindow != DISPLAY_WINDOW_ID)
+ {
+
+
+ GUIGraphicsContext.ResetLastActivity();
+ GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_GOTO_WINDOW, 0, 0, 0, DISPLAY_WINDOW_ID, 0, null);
+ GUIWindowManager.SendThreadMessage(msg);
+ }
+ GUIMessage msg1 = new GUIMessage();
+ msg1.Label = "video";
+ msg1.Label2 = url;
+ msg1.Label3 = position.ToString();
+ msg1.SendToTargetWindow = true;
+ msg1.TargetWindowId = DISPLAY_WINDOW_ID;
+ msg1.Message = GUIMessage.MessageType.GUI_MSG_LABEL_ADD;
+
+ GUIWindowManager.SendThreadMessage(msg1);
//g_Player.Play(url, g_Player.MediaType.Video);
-
+ AirPortal.LogMessage("AirPortal wants to display an video ...", LogType.Debug);
//sendPlaybackEvent("playUrl", url, position.ToString());
+ theServer.sendStatusMessage("loading");
}
-
///
/// Conforms to the delegate that the Server uses to sent the playImage event.
/// Calls the setPictureBoxPicture() method to set the image in a thread-safe way. setPictureBoxPicture() also hides the video players and shows the picturebox
@@ -334,6 +356,8 @@ void theServer_playImage(object sender, Image theImage)
{
AirPortal.LogMessage("AirPortal wants to display an image ...", LogType.Debug);
+
+
// Create temp folder if it doesn't exist
if (!Directory.Exists(Path.GetTempPath() + PLUGIN_NAME))
{
@@ -380,6 +404,17 @@ void theServer_playImage(object sender, Image theImage)
GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_GOTO_WINDOW, 0, 0, 0, DISPLAY_WINDOW_ID, 0, null);
GUIWindowManager.SendThreadMessage(msg);
}
+ /*else{
+ GUIMessage msg = new GUIMessage();
+ msg.Label = tempFileName;
+ msg.SendToTargetWindow = true;
+ msg.TargetWindowId = DISPLAY_WINDOW_ID;
+ msg.Message = GUIMessage.MessageType.GUI_MSG_LABEL_ADD;
+
+ GUIWindowManager.SendThreadMessage(msg);
+ }
+ */
+
}
///
@@ -392,7 +427,17 @@ void theServer_playImage(object sender, Image theImage)
/// Any extra data that might go with that action (eg the seek position)
void theServer_playbackEvent(object sender, string action, string param)
{
+ AirPortal.LogMessage("Action: " + action + " Param: " + param, LogType.Debug);
//sendPlaybackEvent(action, param); //pass it on to the thread-safe method.
+ GUIMessage msg1 = new GUIMessage();
+ msg1.Label = "action";
+ msg1.Label2 = action;
+ msg1.Label3 = param;
+ msg1.SendToTargetWindow = true;
+ msg1.TargetWindowId = DISPLAY_WINDOW_ID;
+ msg1.Message = GUIMessage.MessageType.GUI_MSG_LABEL_ADD;
+
+ GUIWindowManager.SendThreadMessage(msg1);
}
///
diff --git a/Source/AirPortal/AirPortal.csproj b/Source/AirPortal/AirPortal.csproj
index c51fb7a..651469e 100644
--- a/Source/AirPortal/AirPortal.csproj
+++ b/Source/AirPortal/AirPortal.csproj
@@ -80,7 +80,7 @@
call "$(TargetDir)merge.bat"
-copy "$(TargetPath)" "C:\Program Files (x86)\Team MediaPortal\MediaPortal\plugins\process\$(TargetFileName)"
+copy "$(TargetPath)" "C:\Archivos de programa\Team MediaPortal\MediaPortal\plugins\process\$(TargetFileName)"