Skip to main content
Topic: Update to playlist generator syntax in 0.9 beta 7 (Read 8703 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Update to playlist generator syntax in 0.9 beta 7

Starting with 0.9 beta 7, the LESS, GREATER and EQUAL predicates can be used with integers and times. The accepted formats are
  • [sign] digits
  • [sign] digits ":" digit digit
  • [sign] digits ":" digit digit ":" digit digit
where [sign] is optional and either "+" or "-", digit is a single decimal digit (0-9), and digits is one or more decimal digits. All three forms are converted to an integer before doing the comparison. The value is determined as follows (neglecting sign):
  • xxx -> xxx
  • xxx:yy -> (xxx * 60) + yy
  • xxx:yy:zz -> (xxx * 3600) + (yy * 60) + zz
If sign is "-" the value is negated.

If %_length% is less than one day, the following queries are equivalent:
Code: [Select]
%_length_seconds% LESS 300
%_length_seconds% LESS 5:00
%_length% LESS 300
%_length% LESS 5:00

Update to playlist generator syntax in 0.9 beta 7

Reply #1
Think the 3rd one should be 'xxx:yy:zz -> xxx * 3600 + yy * 60 + zz'.
f to c to f to c

Update to playlist generator syntax in 0.9 beta 7

Reply #2
Quote
Think the 3rd one should be 'xxx:yy:zz -> xxx * 3600 + yy * 60 + zz'.[a href="index.php?act=findpost&pid=323424"][{POST_SNAPBACK}][/a]

Indeed. I fixed that in the original post.

 
SimplePortal 1.0.0 RC1 © 2008-2018