Update of /cvsroot/freevo/freevo/src/www/htdocs
In directory sc8-pr-cvs1:/tmp/cvs-serv24909

Modified Files:
        guide.rpy 
Log Message:
The ability to previous / next added by Mike Ruelle.  We'll make it pretty later.  
Also some comment cleanup.


Index: guide.rpy
===================================================================
RCS file: /cvsroot/freevo/freevo/src/www/htdocs/guide.rpy,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** guide.rpy   22 May 2003 21:33:23 -0000      1.5
--- guide.rpy   29 May 2003 23:06:56 -0000      1.6
***************
*** 12,15 ****
--- 12,18 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.6  2003/05/29 23:06:56  rshortt
+ # The ability to previous / next added by Mike Ruelle.  We'll make it pretty later.  
Also some comment cleanup.
+ #
  # Revision 1.5  2003/05/22 21:33:23  outlyer
  # Lots of cosmetic changes:
***************
*** 87,90 ****
--- 90,103 ----
          n_cols = web.n_cols
  
+         mfrguidestart = time.time()
+         mfrguideinput = fv.formValue(form, 'stime')
+         if mfrguideinput:
+             mfrguidestart = int(mfrguideinput)
+         now = int(mfrguidestart / INTERVAL) * INTERVAL
+         now2 = int(time.time() / INTERVAL) * INTERVAL
+         mfrnextguide = now + INTERVAL * n_cols
+         mfrprevguide = now - INTERVAL * n_cols
+         if mfrprevguide < now2:
+             mfrprevguide = 0
  
          guide = epg_xmltv.get_guide()
***************
*** 95,105 ****
          fv.printHeader('TV Guide', web.STYLESHEET, web.JAVASCRIPT)
  
-         #fv.tableOpen('border="0" cellpadding="4" cellspacing="1" width="100%"')
-         #fv.tableRowOpen('class="chanrow"')
-         #fv.tableCell('<img src="images/logo_200x100.png" />', 'align="left"')
-         #fv.tableCell('TV Guide', 'class="heading" align="left"')
-         #fv.tableRowClose()
-         #fv.tableClose()
- 
          if not got_schedule:
              fv.res += '<h4>The recording server is down, recording information is 
unavailable.</h4>'
--- 108,111 ----
***************
*** 108,116 ****
          desc = ''
  
          fv.tableOpen('border="0" cellpadding="4" cellspacing="1"')
  
          fv.tableRowOpen('class="chanrow"')
          fv.tableCell(time.strftime('%b %d'), 'class="guidehead"')
!         now = int(time.time() / INTERVAL) * INTERVAL
          for i in range(n_cols):
              fv.tableCell(time.strftime('%H:%M', time.localtime(now)), 
'class="guidehead"')
--- 114,126 ----
          desc = ''
  
+         if mfrprevguide > 0:
+             fv.res += '<a href="guide.rpy?stime=%i">Prev</a>&nbsp;&nbsp;' % 
mfrprevguide
+         fv.res += '<a href="guide.rpy?stime=%i">Next</a><br />' % mfrnextguide
+ 
          fv.tableOpen('border="0" cellpadding="4" cellspacing="1"')
  
          fv.tableRowOpen('class="chanrow"')
          fv.tableCell(time.strftime('%b %d'), 'class="guidehead"')
!         now = int(mfrguidestart / INTERVAL) * INTERVAL
          for i in range(n_cols):
              fv.tableCell(time.strftime('%H:%M', time.localtime(now)), 
'class="guidehead"')
***************
*** 119,123 ****
  
          for chan in guide.chan_list:
!             now = time.time()
              fv.tableRowOpen('class="chanrow"')
              # chan.displayname = string.replace(chan.displayname, "&", "SUB")
--- 129,133 ----
  
          for chan in guide.chan_list:
!             now = mfrguidestart
              fv.tableRowOpen('class="chanrow"')
              # chan.displayname = string.replace(chan.displayname, "&", "SUB")
***************
*** 129,143 ****
  
              for prog in chan.programs:
!                 if prog.stop > time.time() and \
!                    prog.start < (time.time() + INTERVAL * n_cols) and \
                     c_left > 0:
  
                      status = 'program'
  
-                     #if 0:
-                     # if prog.start < (time.time() + INTERVAL * n_cols) and \
-                     #    prog.stop > time.time():
-                     #     sys.stderr.write('Calling isProgScheduled: chan=%s 
prog=%s' % (chan.displayname,prog))        
-                     # sys.stderr.write('Calling isProgScheduled: chan=%s prog=%s' % 
(chan.displayname,prog))        
                      if got_schedule:
                          (result, message) = ri.isProgScheduled(prog, schedule)
--- 139,148 ----
  
              for prog in chan.programs:
!                 if prog.stop > mfrguidestart and \
!                    prog.start < mfrnextguide and \
                     c_left > 0:
  
                      status = 'program'
  
                      if got_schedule:
                          (result, message) = ri.isProgScheduled(prog, schedule)
***************
*** 196,199 ****
--- 201,208 ----
          
          fv.res += pops
+ 
+         if mfrprevguide > 0:
+             fv.res += '<a href="guide.rpy?stime=%i">Prev</a>&nbsp;&nbsp;' % 
mfrprevguide
+         fv.res += '<a href="guide.rpy?stime=%i">Next</a><br /><br />' % mfrnextguide
  
          fv.printSearchForm()




-------------------------------------------------------
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to