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
Development
Improvement Suggestions
Sub full minute Skip amounts
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="ralphmason" data-source="post: 330883" data-attributes="member: 84654"><p>Moved to the Sourceforge Patches section.</p><p></p><p>Hi,</p><p></p><p>I want to be able to skip amounts that are not full minutes, (in my case I want entries for 3:30 and 3:45 being the length of commercials).</p><p></p><p>It looks like the reason you can't do this is b/c the formatting for display isn't there.</p><p></p><p>Here is a possible update that allows this.</p><p></p><p>In g_player.cs replace GetSingleStep with</p><p></p><p> /// <summary></p><p> /// This function returns the localized time units for "Step" (seconds) in human readable format.</p><p> /// </summary></p><p> /// <param name="Step"></param></p><p> /// <returns></returns></p><p> public static string GetSingleStep(int Step) {</p><p></p><p> //Work with the abs value</p><p> char sign = Step >= 0 ? '+' : '-';</p><p> int abs = Math.Abs(Step);</p><p> int hours = abs / 3600;</p><p> int mins = abs % 3600 / 60;</p><p> int seconds = abs % 60;</p><p></p><p> if (hours > 0) {</p><p> string fmt = mins > 0 ? "{0}{2}{3}{4:00} {1}" : "{0}{2} {1}";</p><p> return string.Format(fmt, sign, GUILocalizeStrings.Get(2997)/* "hrs" */, hours, ':', mins);</p><p> }</p><p></p><p> if (mins > 0) {</p><p> string fmt = seconds > 0 ? "{0}{2}{3}{4:00} {1}" : "{0}{2} {1}";</p><p> return string.Format(fmt, sign, GUILocalizeStrings.Get(2998)/* "min"*/, mins, ':', seconds);</p><p> }</p><p></p><p> return string.Format("{0}{2} {1}", sign, GUILocalizeStrings.Get(2999)/*"sec"*/, seconds);</p><p></p><p>}</p><p></p><p></p><p>and in GuiSettingSkipSteps.cs needs lines 342-349 would need to be removed </p><p></p><p>//Remove.</p><p></p><p>else</p><p> {</p><p> // Check that whole minutes are entered</p><p> if (step > 60 && (step % 60) != 0)</p><p> {</p><p> return "Enter whole minutes only!";</p><p> }</p><p> }</p><p></p><p></p><p>Thanks</p><p>Ralph</p></blockquote><p></p>
[QUOTE="ralphmason, post: 330883, member: 84654"] Moved to the Sourceforge Patches section. Hi, I want to be able to skip amounts that are not full minutes, (in my case I want entries for 3:30 and 3:45 being the length of commercials). It looks like the reason you can't do this is b/c the formatting for display isn't there. Here is a possible update that allows this. In g_player.cs replace GetSingleStep with /// <summary> /// This function returns the localized time units for "Step" (seconds) in human readable format. /// </summary> /// <param name="Step"></param> /// <returns></returns> public static string GetSingleStep(int Step) { //Work with the abs value char sign = Step >= 0 ? '+' : '-'; int abs = Math.Abs(Step); int hours = abs / 3600; int mins = abs % 3600 / 60; int seconds = abs % 60; if (hours > 0) { string fmt = mins > 0 ? "{0}{2}{3}{4:00} {1}" : "{0}{2} {1}"; return string.Format(fmt, sign, GUILocalizeStrings.Get(2997)/* "hrs" */, hours, ':', mins); } if (mins > 0) { string fmt = seconds > 0 ? "{0}{2}{3}{4:00} {1}" : "{0}{2} {1}"; return string.Format(fmt, sign, GUILocalizeStrings.Get(2998)/* "min"*/, mins, ':', seconds); } return string.Format("{0}{2} {1}", sign, GUILocalizeStrings.Get(2999)/*"sec"*/, seconds); } and in GuiSettingSkipSteps.cs needs lines 342-349 would need to be removed //Remove. else { // Check that whole minutes are entered if (step > 60 && (step % 60) != 0) { return "Enter whole minutes only!"; } } Thanks Ralph [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
Improvement Suggestions
Sub full minute Skip amounts
Contact us
RSS
Top
Bottom