home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Quality Assurance
Ares Skin Feedback
Bug Reports
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Sebastiii" data-source="post: 1208481" data-attributes="member: 60104"><p>About this, i think movpic and Tvs / OV need to subscribe to MP event for updating properties, right now movpic and Tvs use a timer and does the refresh.</p><p>Even plugins dev add a comment in code about the strange bug, so this timer should be enough in most case but it can happen that the delay is not enough for sure i can trigger it with madVR for ex.</p><p></p><p>So i have add event on MP code (i need to look if i really add them in current master or not) and plugin dev need to adapt the code for it, like this when all is ok on MP side, the event is fired up and then movpic and Tvs can do proper filling <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite7" alt=":p" title="Stick Out Tongue :p" loading="lazy" data-shortname=":p" /></p><p></p><p>The code for TVS :</p><p></p><p>[CODE=WinBatch]diff --git a/MP-TVSeries/VideoHandler.cs b/MP-TVSeries/VideoHandler.cs</p><p>index 763938f..5a144d7 100644</p><p>--- a/MP-TVSeries/VideoHandler.cs</p><p>+++ b/MP-TVSeries/VideoHandler.cs</p><p>@@ -99,6 +99,7 @@ namespace WindowPlugins.GUITVSeries</p><p> g_Player.PlayBackEnded += new MediaPortal.Player.g_Player.EndedHandler(OnPlayBackEnded);</p><p> g_Player.PlayBackStarted += new MediaPortal.Player.g_Player.StartedHandler(OnPlayBackStarted);</p><p> g_Player.PlayBackChanged += new g_Player.ChangedHandler(OnPlaybackChanged);</p><p>+ MediaPortal.GUI.Video.GUIVideoOverlay.SetGuiPropertiesUpdate += new MediaPortal.GUI.Video.GUIVideoOverlay.SetGuiProperties(SetGuiPropertiesUpdate);</p><p> PlayPropertyUpdater.WorkerSupportsCancellation = true;</p><p> PlayPropertyUpdater.DoWork += new DoWorkEventHandler(SetPlayProperties_DoWork);</p><p> }</p><p>@@ -304,6 +305,14 @@ namespace WindowPlugins.GUITVSeries</p><p> SetGUIProperties((bool)e.Argument);</p><p> }</p><p>+ private void SetGuiPropertiesUpdate(g_Player.MediaType type, string filename)</p><p>+ {</p><p>+ if (PlayBackOpIsOfConcern(type, filename))</p><p>+ {</p><p>+ SetGUIProperties(false);</p><p>+ }</p><p>+ }</p><p>+</p><p> /// <summary></p><p> /// Sets the following Properties:</p><p> /// "#Play.Current.Title"</p><p>@@ -377,7 +386,7 @@ namespace WindowPlugins.GUITVSeries</p><p> GUIPropertyManager.SetProperty(kvp.Key, " ");</p><p> }</p><p> }</p><p>- </p><p>+</p><p> GUIPropertyManager.SetProperty("#Play.Current.Title", clear ? " " : m_currentEpisode.onlineEpisode.CompleteTitle);</p><p> GUIPropertyManager.SetProperty("#Play.Current.Year", clear ? " " : FieldGetter.resolveDynString("<" + DBEpisode.cOutName + "." + DBOnlineEpisode.cFirstAired + ">", m_currentEpisode, false));</p><p> GUIPropertyManager.SetProperty("#Play.Current.Genre", clear ? " " : FieldGetter.resolveDynString(TVSeriesPlugin.m_sFormatEpisodeSubtitle, m_currentEpisode));</p><p>@@ -587,6 +596,7 @@ namespace WindowPlugins.GUITVSeries</p><p> if (PlayBackOpIsOfConcern(type, filename))</p><p> {</p><p> LogPlayBackOp("started", filename);</p><p>+ // TODO surely can be removed now.</p><p> // really stupid, you have to wait until the player itself sets the properties (a few seconds) and after that set them</p><p> PlayPropertyUpdater.RunWorkerAsync(false);</p><p> }</p><p>--</p><p>2.10.0.windows.1</p><p>[/CODE]</p><p></p><p>So added this :</p><p>MediaPortal.GUI.Video.GUIVideoOverlay.SetGuiPropertiesUpdate += new MediaPortal.GUI.Video.GUIVideoOverlay.SetGuiProperties(SetGuiPropertiesUpdate);</p><p></p><p>and</p><p></p><p>private void SetGuiPropertiesUpdate(g_Player.MediaType type, string filename)</p><p> {</p><p> if (PlayBackOpIsOfConcern(type, filename))</p><p> {</p><p> SetGUIProperties(false);</p><p> }</p><p> }</p><p></p><p>[USER=52219]@ltfearme[/USER] what do you think ?</p><p></p><p>Attached is the example for movpic <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite7" alt=":p" title="Stick Out Tongue :p" loading="lazy" data-shortname=":p" /></p></blockquote><p></p>
[QUOTE="Sebastiii, post: 1208481, member: 60104"] About this, i think movpic and Tvs / OV need to subscribe to MP event for updating properties, right now movpic and Tvs use a timer and does the refresh. Even plugins dev add a comment in code about the strange bug, so this timer should be enough in most case but it can happen that the delay is not enough for sure i can trigger it with madVR for ex. So i have add event on MP code (i need to look if i really add them in current master or not) and plugin dev need to adapt the code for it, like this when all is ok on MP side, the event is fired up and then movpic and Tvs can do proper filling :p The code for TVS : [CODE=WinBatch]diff --git a/MP-TVSeries/VideoHandler.cs b/MP-TVSeries/VideoHandler.cs index 763938f..5a144d7 100644 --- a/MP-TVSeries/VideoHandler.cs +++ b/MP-TVSeries/VideoHandler.cs @@ -99,6 +99,7 @@ namespace WindowPlugins.GUITVSeries g_Player.PlayBackEnded += new MediaPortal.Player.g_Player.EndedHandler(OnPlayBackEnded); g_Player.PlayBackStarted += new MediaPortal.Player.g_Player.StartedHandler(OnPlayBackStarted); g_Player.PlayBackChanged += new g_Player.ChangedHandler(OnPlaybackChanged); + MediaPortal.GUI.Video.GUIVideoOverlay.SetGuiPropertiesUpdate += new MediaPortal.GUI.Video.GUIVideoOverlay.SetGuiProperties(SetGuiPropertiesUpdate); PlayPropertyUpdater.WorkerSupportsCancellation = true; PlayPropertyUpdater.DoWork += new DoWorkEventHandler(SetPlayProperties_DoWork); } @@ -304,6 +305,14 @@ namespace WindowPlugins.GUITVSeries SetGUIProperties((bool)e.Argument); } + private void SetGuiPropertiesUpdate(g_Player.MediaType type, string filename) + { + if (PlayBackOpIsOfConcern(type, filename)) + { + SetGUIProperties(false); + } + } + /// <summary> /// Sets the following Properties: /// "#Play.Current.Title" @@ -377,7 +386,7 @@ namespace WindowPlugins.GUITVSeries GUIPropertyManager.SetProperty(kvp.Key, " "); } } - + GUIPropertyManager.SetProperty("#Play.Current.Title", clear ? " " : m_currentEpisode.onlineEpisode.CompleteTitle); GUIPropertyManager.SetProperty("#Play.Current.Year", clear ? " " : FieldGetter.resolveDynString("<" + DBEpisode.cOutName + "." + DBOnlineEpisode.cFirstAired + ">", m_currentEpisode, false)); GUIPropertyManager.SetProperty("#Play.Current.Genre", clear ? " " : FieldGetter.resolveDynString(TVSeriesPlugin.m_sFormatEpisodeSubtitle, m_currentEpisode)); @@ -587,6 +596,7 @@ namespace WindowPlugins.GUITVSeries if (PlayBackOpIsOfConcern(type, filename)) { LogPlayBackOp("started", filename); + // TODO surely can be removed now. // really stupid, you have to wait until the player itself sets the properties (a few seconds) and after that set them PlayPropertyUpdater.RunWorkerAsync(false); } -- 2.10.0.windows.1 [/CODE] So added this : MediaPortal.GUI.Video.GUIVideoOverlay.SetGuiPropertiesUpdate += new MediaPortal.GUI.Video.GUIVideoOverlay.SetGuiProperties(SetGuiPropertiesUpdate); and private void SetGuiPropertiesUpdate(g_Player.MediaType type, string filename) { if (PlayBackOpIsOfConcern(type, filename)) { SetGUIProperties(false); } } [USER=52219]@ltfearme[/USER] what do you think ? Attached is the example for movpic :P [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Quality Assurance
Ares Skin Feedback
Bug Reports
Contact us
RSS
Top
Bottom