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
Bugreports
Archive
date.extract - function does not work correctly?
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="123vak123" data-source="post: 1232439" data-attributes="member: 109112"><p>Small report. </p><p>For "videoOSD.xml" everything works almost perfectly:</p><p>[code]<define property="true" evaluateNow="true">#lenght:#(string.length(#currentremaining))</define></p><p><define property="true" evaluateNow="true">#end1:#(date.add('n',date.extract('n',cdate(#currentremaining)), date.add('h',date.extract('h',cdate(#currentremaining)),cdate(#time))))</define></p><p><define property="true" evaluateNow="true">#end2:#(date.add('n',date.extract('n',cdate(#currentremaining,'mm:ss')), date.add('h',date.extract('h',cdate(#currentremaining,'mm:ss')),cdate(#time))))</define></p><p><define property="true" evaluateNow="true">#end3:#(date.add('s',date.extract('s',cdate(#currentremaining,'m:ss')), date.add('n',date.extract('n',cdate(#currentremaining,'m:ss')), date.add('h',date.extract('h',cdate(#currentremaining,'m:ss')),cdate(#time)))))</define>[/code]</p><p></p><p>[code] <control></p><p> <description>End1</description></p><p> <type>label</type></p><p> <id>0</id></p><p> <posX>1635</posX></p><p> <posY>1005</posY></p><p> <label>Закончится в #(string.ltrim(#end1,'1,2,3,4,5,6,7,8,9,0,.'))</label></p><p> <textcolor>e6e6e6</textcolor></p><p> <font>fontB10</font></p><p> <align>right</align></p><p> <visible>string.equals(#lenght,7)</visible></p><p> </control></p><p></p><p> <control></p><p> <description>End2</description></p><p> <type>label</type></p><p> <id>0</id></p><p> <posX>1635</posX></p><p> <posY>1005</posY></p><p> <label>Закончится в #(string.ltrim(#end2,'1,2,3,4,5,6,7,8,9,0,.'))</label></p><p> <textcolor>e6e6e6</textcolor></p><p> <font>fontB10</font></p><p> <align>right</align></p><p> <visible>string.equals(#lenght,5)</visible></p><p> </control></p><p></p><p> <control></p><p> <description>End3</description></p><p> <type>label</type></p><p> <id>0</id></p><p> <posX>1635</posX></p><p> <posY>1005</posY></p><p> <label>Закончится в #(string.ltrim(#end3,'1,2,3,4,5,6,7,8,9,0,.'))</label></p><p> <textcolor>e6e6e6</textcolor></p><p> <font>fontB10</font></p><p> <align>right</align> </p><p> <visible>string.equals(#lenght,4)</visible></p><p> </control>[/code]</p><p></p><p>End1 - #currentremaining more than one hour, End2 - #currentremaining less than one hour, more than 10 minutes, End3 - #currentremaining less than 10 minutes.</p><p> </p><p>The "ctimespan" function could not be used - I got either an error or the current time (maybe I did not use it correctly or violated the syntax).</p><p>The above codes work only in "videoOSD.xml". In "videoFullScreen.xml" they do not work. For "videoFullScreen.xml" work:</p><p>[code]<define property="true" evaluateNow="true">#lenght:#(string.length(#currentremaining))</define></p><p>...</p><p> <control></p><p> <description>End1</description></p><p> <type>label</type></p><p> <id>0</id></p><p> <posX>1635</posX></p><p> <posY>1005</posY></p><p> <label>Закончится: #(date.add('n',date.extract('n',cdate(#currentremaining)), date.add('h',date.extract('h',cdate(#currentremaining)),cdate(#time))))</label></p><p> <textcolor>e6e6e6</textcolor></p><p> <font>fontB10</font></p><p> <align>right</align></p><p> <visible>[control.isVisible(111)|control.isVisible(10)|control.isVisible(11)|control.isVisible(12)] + string.equals(#lenght,7)</visible></p><p> </control></p><p></p><p> <control></p><p> <description>End2</description></p><p> <type>label</type></p><p> <id>0</id></p><p> <posX>1635</posX></p><p> <posY>1005</posY></p><p> <label>Закончится: #(date.add('n',date.extract('n',cdate(#currentremaining,'mm:ss')), date.add('h',date.extract('h',cdate(#currentremaining,'mm:ss')),cdate(#time))))</label></p><p> <textcolor>e6e6e6</textcolor></p><p> <font>fontB10</font></p><p> <align>right</align></p><p> <visible>[control.isVisible(111)|control.isVisible(10)|control.isVisible(11)|control.isVisible(12)] + string.equals(#lenght,5)</visible></p><p> </control></p><p></p><p> <control></p><p> <description>End3</description></p><p> <type>label</type></p><p> <id>0</id></p><p> <posX>1635</posX></p><p> <posY>1005</posY></p><p> <label>Закончится: #(date.add('s',date.extract('s',cdate(#currentremaining,'m:ss')), date.add('n',date.extract('n',cdate(#currentremaining,'m:ss')), date.add('h',date.extract('h',cdate(#currentremaining,'m:ss')),cdate(#time)))))</label></p><p> <textcolor>e6e6e6</textcolor></p><p> <font>fontB10</font></p><p> <align>right</align> </p><p> <visible>[control.isVisible(111)|control.isVisible(10)|control.isVisible(11)|control.isVisible(12)] + string.equals(#lenght,4)</visible></p><p> </control>[/code]</p><p></p><p>But in this case I can not use the function string.ltrim - getting error (0).</p><p>Well, something like this</p></blockquote><p></p>
[QUOTE="123vak123, post: 1232439, member: 109112"] Small report. For "videoOSD.xml" everything works almost perfectly: [code]<define property="true" evaluateNow="true">#lenght:#(string.length(#currentremaining))</define> <define property="true" evaluateNow="true">#end1:#(date.add('n',date.extract('n',cdate(#currentremaining)), date.add('h',date.extract('h',cdate(#currentremaining)),cdate(#time))))</define> <define property="true" evaluateNow="true">#end2:#(date.add('n',date.extract('n',cdate(#currentremaining,'mm:ss')), date.add('h',date.extract('h',cdate(#currentremaining,'mm:ss')),cdate(#time))))</define> <define property="true" evaluateNow="true">#end3:#(date.add('s',date.extract('s',cdate(#currentremaining,'m:ss')), date.add('n',date.extract('n',cdate(#currentremaining,'m:ss')), date.add('h',date.extract('h',cdate(#currentremaining,'m:ss')),cdate(#time)))))</define>[/code] [code] <control> <description>End1</description> <type>label</type> <id>0</id> <posX>1635</posX> <posY>1005</posY> <label>Закончится в #(string.ltrim(#end1,'1,2,3,4,5,6,7,8,9,0,.'))</label> <textcolor>e6e6e6</textcolor> <font>fontB10</font> <align>right</align> <visible>string.equals(#lenght,7)</visible> </control> <control> <description>End2</description> <type>label</type> <id>0</id> <posX>1635</posX> <posY>1005</posY> <label>Закончится в #(string.ltrim(#end2,'1,2,3,4,5,6,7,8,9,0,.'))</label> <textcolor>e6e6e6</textcolor> <font>fontB10</font> <align>right</align> <visible>string.equals(#lenght,5)</visible> </control> <control> <description>End3</description> <type>label</type> <id>0</id> <posX>1635</posX> <posY>1005</posY> <label>Закончится в #(string.ltrim(#end3,'1,2,3,4,5,6,7,8,9,0,.'))</label> <textcolor>e6e6e6</textcolor> <font>fontB10</font> <align>right</align> <visible>string.equals(#lenght,4)</visible> </control>[/code] End1 - #currentremaining more than one hour, End2 - #currentremaining less than one hour, more than 10 minutes, End3 - #currentremaining less than 10 minutes. The "ctimespan" function could not be used - I got either an error or the current time (maybe I did not use it correctly or violated the syntax). The above codes work only in "videoOSD.xml". In "videoFullScreen.xml" they do not work. For "videoFullScreen.xml" work: [code]<define property="true" evaluateNow="true">#lenght:#(string.length(#currentremaining))</define> ... <control> <description>End1</description> <type>label</type> <id>0</id> <posX>1635</posX> <posY>1005</posY> <label>Закончится: #(date.add('n',date.extract('n',cdate(#currentremaining)), date.add('h',date.extract('h',cdate(#currentremaining)),cdate(#time))))</label> <textcolor>e6e6e6</textcolor> <font>fontB10</font> <align>right</align> <visible>[control.isVisible(111)|control.isVisible(10)|control.isVisible(11)|control.isVisible(12)] + string.equals(#lenght,7)</visible> </control> <control> <description>End2</description> <type>label</type> <id>0</id> <posX>1635</posX> <posY>1005</posY> <label>Закончится: #(date.add('n',date.extract('n',cdate(#currentremaining,'mm:ss')), date.add('h',date.extract('h',cdate(#currentremaining,'mm:ss')),cdate(#time))))</label> <textcolor>e6e6e6</textcolor> <font>fontB10</font> <align>right</align> <visible>[control.isVisible(111)|control.isVisible(10)|control.isVisible(11)|control.isVisible(12)] + string.equals(#lenght,5)</visible> </control> <control> <description>End3</description> <type>label</type> <id>0</id> <posX>1635</posX> <posY>1005</posY> <label>Закончится: #(date.add('s',date.extract('s',cdate(#currentremaining,'m:ss')), date.add('n',date.extract('n',cdate(#currentremaining,'m:ss')), date.add('h',date.extract('h',cdate(#currentremaining,'m:ss')),cdate(#time)))))</label> <textcolor>e6e6e6</textcolor> <font>fontB10</font> <align>right</align> <visible>[control.isVisible(111)|control.isVisible(10)|control.isVisible(11)|control.isVisible(12)] + string.equals(#lenght,4)</visible> </control>[/code] But in this case I can not use the function string.ltrim - getting error (0). Well, something like this [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Quality Assurance
Bugreports
Archive
date.extract - function does not work correctly?
Contact us
RSS
Top
Bottom