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
MP TVSeries & MP 2.3 RC2
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="safran64" data-source="post: 179650" data-attributes="member: 52869"><p>Ups, thanks for the reminder. I wanted to post this, too, some time ago, but forgot... <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite10" alt=":oops:" title="Oops! :oops:" loading="lazy" data-shortname=":oops:" /> </p><p>I've already fixed this for myself.</p><p></p><p>In</p><p></p><p>helper.cs </p><p></p><p>I replaced </p><p></p><p>[CODE]/// <summary></p><p> /// Convertes a given amount of Milliseconds into humanly readable MM:SS format</p><p> /// </summary></p><p> /// <param name="milliseconds"></param></p><p> /// <returns></returns></p><p> public static System.String MSToMMSS(double milliseconds)</p><p> {</p><p> TimeSpan t = new TimeSpan(0, 0, 0, 0, (int)milliseconds);</p><p> return t.Minutes.ToString("00") + ":" + t.Seconds.ToString("00");</p><p> }[/CODE]</p><p></p><p>by</p><p></p><p>[CODE]/// <summary></p><p> /// Convertes a given amount of Milliseconds into humanly readable MM : SS format</p><p> /// </summary></p><p> /// <param name="milliseconds"></param></p><p> /// <returns></returns></p><p> public static System.String MSToMMSS(double milliseconds)</p><p> {</p><p> TimeSpan t = new TimeSpan(0, 0, 0, 0, (int)milliseconds);</p><p> if (milliseconds <= 0) //cs1 anomalies or no disc/data available -> -:-</p><p> {</p><p> return ("-- : --");</p><p> }</p><p> if (milliseconds >= 3600000) //cs1 playtimes >= 1 hour -> 1:MM:SS</p><p> {</p><p> return t.Hours.ToString("0") + ":" + t.Minutes.ToString("00") + ":" + t.Seconds.ToString("00");</p><p> }</p><p> else //cs1 playtimes < 1 hour -> MM:SS</p><p> {</p><p> return t.Minutes.ToString("00") + ":" + t.Seconds.ToString("00");</p><p> }</p><p> }[/CODE]</p><p></p><p></p><p>I changed the code in such a way that if playtime is longer than a hour it will be shown in H : MM : SS format.</p><p>But if the episode is less than one hour the shorter MM : SS format will be shown.</p><p></p><p>Maybe, a 'real' programmer can check this and implement it -or something similar- in the code.</p><p></p><p>Oh... In the case episodes weren't found I didn't like the time display 00:00. So I changed it to --:-- . But that's only my individual preference.</p></blockquote><p></p>
[QUOTE="safran64, post: 179650, member: 52869"] Ups, thanks for the reminder. I wanted to post this, too, some time ago, but forgot... :ooops: I've already fixed this for myself. In helper.cs I replaced [CODE]/// <summary> /// Convertes a given amount of Milliseconds into humanly readable MM:SS format /// </summary> /// <param name="milliseconds"></param> /// <returns></returns> public static System.String MSToMMSS(double milliseconds) { TimeSpan t = new TimeSpan(0, 0, 0, 0, (int)milliseconds); return t.Minutes.ToString("00") + ":" + t.Seconds.ToString("00"); }[/CODE] by [CODE]/// <summary> /// Convertes a given amount of Milliseconds into humanly readable MM : SS format /// </summary> /// <param name="milliseconds"></param> /// <returns></returns> public static System.String MSToMMSS(double milliseconds) { TimeSpan t = new TimeSpan(0, 0, 0, 0, (int)milliseconds); if (milliseconds <= 0) //cs1 anomalies or no disc/data available -> -:- { return ("-- : --"); } if (milliseconds >= 3600000) //cs1 playtimes >= 1 hour -> 1:MM:SS { return t.Hours.ToString("0") + ":" + t.Minutes.ToString("00") + ":" + t.Seconds.ToString("00"); } else //cs1 playtimes < 1 hour -> MM:SS { return t.Minutes.ToString("00") + ":" + t.Seconds.ToString("00"); } }[/CODE] I changed the code in such a way that if playtime is longer than a hour it will be shown in H : MM : SS format. But if the episode is less than one hour the shorter MM : SS format will be shown. Maybe, a 'real' programmer can check this and implement it -or something similar- in the code. Oh... In the case episodes weren't found I didn't like the time display 00:00. So I changed it to --:-- . But that's only my individual preference. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
Popular Plugins
My TVSeries
MP TVSeries & MP 2.3 RC2
Contact us
RSS
Top
Bottom