Update of /cvsroot/freevo/freevo/src/util
In directory sc8-pr-cvs1:/tmp/cvs-serv6558

Modified Files:
        misc.py 
Log Message:
How overcomplicated could I have made something so simple? This is a little
embarassing. I think this "algorithm" is less dumb.


Index: misc.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/util/misc.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** misc.py     11 Jan 2004 05:46:31 -0000      1.15
--- misc.py     11 Jan 2004 05:59:41 -0000      1.16
***************
*** 11,21 ****
  # -----------------------------------------------------------------------
  # $Log$
! # Revision 1.15  2004/01/11 05:46:31  outlyer
! # Remove debug
! #
! # Revision 1.14  2004/01/11 05:45:38  outlyer
! # Ouch! We definitely need a cache sooner than later. Without the cache
! # the  CPU usage on my Athlon 2000 was going to 40% (sorting, most likely
! # being a chunk of that)
  #
  # Revision 1.12  2004/01/01 16:18:11  dischi
--- 11,17 ----
  # -----------------------------------------------------------------------
  # $Log$
! # Revision 1.16  2004/01/11 05:59:41  outlyer
! # How overcomplicated could I have made something so simple? This is a little
! # embarassing. I think this "algorithm" is less dumb.
  #
  # Revision 1.12  2004/01/01 16:18:11  dischi
***************
*** 382,387 ****
  
  def comingup(items):
-     # XXX We should cache this information and update it hourly/daily
-     # 
      import tv.record_client as ri
      import time
--- 378,381 ----
***************
*** 410,418 ****
  
      for what in progl:
!         if what.start <= time.time() + 86400:
              today.append(what)
!         if what.start <= time.time() + 172800 and what.start >= time.time() + 86400:
              tomorrow.append(what)
!         if what.start >= time.time() + 172800:
              later.append(what)
  
--- 404,412 ----
  
      for what in progl:
!         if time.localtime(what.start)[2] == time.localtime()[2]:
              today.append(what)
!         if time.localtime(what.start)[2] == (time.localtime()[2] + 1):
              tomorrow.append(what)
!         if time.localtime(what.start)[2] > (time.localtime()[2] + 1):
              later.append(what)
  




-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to