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
MediaPortal 1 Plugins
Popular Plugins
My TVSeries
Suggested Fix - Count viewed if using external viewer
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="BakerQ" data-source="post: 192376" data-attributes="member: 57372"><p>I haven't been able to get a compilable setup of MP and TVSeries, so hacking around at the code, I think something like this will work in the VideoHandler.cs file:</p><p></p><p>[CODE]using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml")))</p><p>{</p><p> if (bool bExternalMoviePlayer = xmlreader.GetValueAsBool("movieplayer", "internal", true)) </p><p> {</p><p> m_currentEpisode[DBOnlineEpisode.cWatched] = 1;</p><p> }</p><p></p><p>}[/CODE]</p><p></p><p>That would need to be placed in both the OnPlayBackStopped() and OnPlayBackEnded() functions. Again, I have no idea if this would compile, I grabbed the "using" statement from the MP source to determine if the "movieplayer"->"internal" variable is set. It's quite likely that MP already has a method available to all plugins to determine the settings for MP itself.</p><p></p><p>This code (rudimentary as it is) really only flags an episode as watched if it is viewed in an external player. Like I said, in a perfect world it would check to see what the cWatched user setting is and use that as a baseline. "If the cWatched is greater than 0%, autoflag the episode as watched". This way if someone didn't want it flagging it as watched autmagically (if they only opened it for a couple seconds, for example) they could set the value to 0 and disable this.</p><p></p><p>Does your function actually measure the amount of time watched, or does it pull the result from MP? I was thinking that if a timer was set up to start counting the time that a movie is started compared to the time it ended, it could deduce for itself if the video had been played for five or twenty minutes. Of course, that doesn't take into account the possibility that someone started watching a video, paused it and came back three hours later. (The result of watching 180 minutes of a 24 minute episode is funny.)</p></blockquote><p></p>
[QUOTE="BakerQ, post: 192376, member: 57372"] I haven't been able to get a compilable setup of MP and TVSeries, so hacking around at the code, I think something like this will work in the VideoHandler.cs file: [CODE]using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"))) { if (bool bExternalMoviePlayer = xmlreader.GetValueAsBool("movieplayer", "internal", true)) { m_currentEpisode[DBOnlineEpisode.cWatched] = 1; } }[/CODE] That would need to be placed in both the OnPlayBackStopped() and OnPlayBackEnded() functions. Again, I have no idea if this would compile, I grabbed the "using" statement from the MP source to determine if the "movieplayer"->"internal" variable is set. It's quite likely that MP already has a method available to all plugins to determine the settings for MP itself. This code (rudimentary as it is) really only flags an episode as watched if it is viewed in an external player. Like I said, in a perfect world it would check to see what the cWatched user setting is and use that as a baseline. "If the cWatched is greater than 0%, autoflag the episode as watched". This way if someone didn't want it flagging it as watched autmagically (if they only opened it for a couple seconds, for example) they could set the value to 0 and disable this. Does your function actually measure the amount of time watched, or does it pull the result from MP? I was thinking that if a timer was set up to start counting the time that a movie is started compared to the time it ended, it could deduce for itself if the video had been played for five or twenty minutes. Of course, that doesn't take into account the possibility that someone started watching a video, paused it and came back three hours later. (The result of watching 180 minutes of a 24 minute episode is funny.) [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
Popular Plugins
My TVSeries
Suggested Fix - Count viewed if using external viewer
Contact us
RSS
Top
Bottom