Update of /cvsroot/freevo/freevo/src/www
In directory sc8-pr-cvs1:/tmp/cvs-serv19755a
Modified Files:
html_util.py rec_interface.py
Log Message:
Committed some code by Michael Ruelle which adds highlighting and file
size descriptions to library.cgi.
Index: html_util.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/www/html_util.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** html_util.py 26 Feb 2003 01:16:43 -0000 1.4
--- html_util.py 27 Feb 2003 02:04:33 -0000 1.5
***************
*** 10,13 ****
--- 10,17 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.5 2003/02/27 02:04:33 rshortt
+ # Committed some code by Michael Ruelle which adds highlighting and file
+ # size descriptions to library.cgi.
+ #
# Revision 1.4 2003/02/26 01:16:43 rshortt
# Added manualrecord.cgi to the links. We may soon need to think of a better layout
for the links as the interface grows.
***************
*** 137,140 ****
--- 141,158 ----
</center>
""")
+
+
+ def descfsize(size):
+ if size < 1024:
+ return "%d bytes" % size
+ elif size < 1048576:
+ size = size / 1024
+ return "%s KB" % size
+ elif size < 1073741824:
+ size = size / 1048576.0
+ return "%.1f MB" % size
+ else:
+ size = size / 1073741824.0
+ return "%.3f GB" % size
Index: rec_interface.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/www/rec_interface.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** rec_interface.py 26 Feb 2003 03:12:23 -0000 1.4
--- rec_interface.py 27 Feb 2003 02:04:33 -0000 1.5
***************
*** 7,10 ****
--- 7,14 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.5 2003/02/27 02:04:33 rshortt
+ # Committed some code by Michael Ruelle which adds highlighting and file
+ # size descriptions to library.cgi.
+ #
# Revision 1.4 2003/02/26 03:12:23 rshortt
# Reduced the minimum amount of time to record for just in case the user is
***************
*** 132,135 ****
--- 136,146 ----
+ def getProgFilename(prog=None):
+ if not prog:
+ return 'ERROR: no prog'
+
+ return '%s--%s' % (prog.title, time.strftime('%Y-%m-%d-%H%M',
time.localtime(prog.start)))
+
+
def minToTOD(min):
min = int(min)
***************
*** 278,282 ****
if duration < 10:
return FALSE
! title = '%s--%s' % (prog.title, time.strftime('%Y-%m-%d-%H%M',
time.localtime(prog.start)))
rec_cmd = '%s %s %s "%s"' % \
(config.REC_CMD, prog.tunerid, duration, title)
--- 289,293 ----
if duration < 10:
return FALSE
! title = getProgFilename(prog)
rec_cmd = '%s %s %s "%s"' % \
(config.REC_CMD, prog.tunerid, duration, title)
-------------------------------------------------------
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog