Author: duncan
Date: Fri May 11 18:31:49 2007
New Revision: 9562
Modified:
branches/rel-1/freevo/src/www/htdocs/edit_favorite.rpy
branches/rel-1/freevo/src/www/htdocs/favorites.rpy
branches/rel-1/freevo/src/www/htdocs/fileinfo.rpy
branches/rel-1/freevo/src/www/htdocs/genre.rpy
branches/rel-1/freevo/src/www/htdocs/guide.rpy
branches/rel-1/freevo/src/www/htdocs/help/doc.rpy
branches/rel-1/freevo/src/www/htdocs/help/howto.rpy
branches/rel-1/freevo/src/www/htdocs/help/index.rpy
branches/rel-1/freevo/src/www/htdocs/help/plugins.rpy
branches/rel-1/freevo/src/www/htdocs/iceslistchanger.rpy
branches/rel-1/freevo/src/www/htdocs/index.rpy
branches/rel-1/freevo/src/www/htdocs/library.rpy
branches/rel-1/freevo/src/www/htdocs/manualrecord.rpy
branches/rel-1/freevo/src/www/htdocs/record.rpy
branches/rel-1/freevo/src/www/htdocs/search.rpy
branches/rel-1/freevo/src/www/htdocs/wap_login.rpy
branches/rel-1/freevo/src/www/htdocs/wap_rec.rpy
branches/rel-1/freevo/src/www/htdocs/webremote.rpy
Log:
A big commit, run reindent.py on all files, this removes trailing spaces too.
Modified: branches/rel-1/freevo/src/www/htdocs/edit_favorite.rpy
==============================================================================
--- branches/rel-1/freevo/src/www/htdocs/edit_favorite.rpy (original)
+++ branches/rel-1/freevo/src/www/htdocs/edit_favorite.rpy Fri May 11
18:31:49 2007
@@ -6,7 +6,7 @@
# $Id$
#
# Notes:
-# Todo:
+# Todo:
#
# -----------------------------------------------------------------------
# Freevo - A Home Theater PC framework
@@ -59,7 +59,7 @@
chan = Unicode(fv.formValue(form, 'chan'))
if isinstance( chan, str ):
chan = Unicode( chan, 'latin-1' )
-
+
start = fv.formValue(form, 'start')
action = fv.formValue(form, 'action')
name = Unicode(fv.formValue(form, 'name'))
@@ -131,9 +131,9 @@
fv.tableCell(_('Day of week'), 'class="guidehead" colspan="1"')
fv.tableCell(_('Time of day'), 'class="guidehead" colspan="1"')
if config.DUPLICATE_DETECTION:
- fv.tableCell(_('Duplicates'), 'class="guidehead" colspan="1"')
+ fv.tableCell(_('Duplicates'), 'class="guidehead" colspan="1"')
if config.ONLY_NEW_DETECTION:
- fv.tableCell(_('Episodes'), 'class="guidehead" colspan="1"')
+ fv.tableCell(_('Episodes'), 'class="guidehead" colspan="1"')
fv.tableCell(_('Action'), 'class="guidehead" colspan="1"')
fv.tableRowClose()
@@ -171,7 +171,7 @@
' <option value="5">'+_('Sat')+'</option>\n' \
' <option value="6">'+_('Sun')+'</option>\n' \
'</select>\n'
-
+
fv.tableCell(cell, 'class="'+status+'" colspan="1"')
cell = '\n<select name="mod" selected="%s">\n' % fav.mod
@@ -230,25 +230,25 @@
fv.tableCell(cell, 'class="'+status+'" colspan="1"')
if config.DUPLICATE_DETECTION:
- if hasattr(fav, 'allowDuplicates'):
- cell = '\n<select name="allowDuplicates" selected="%s">\n' % \
- fav.allowDuplicates
- else:
- cell = '\n<select name="allowDuplicates">\n'
- cell += ' <option value="1">'+_('ALLOW')+'</option>\n'
- cell += ' <option value="0">'+_('PREVENT')+'</option>\n'
- cell += '</select>\n'
- fv.tableCell(cell, 'class="'+status+'" colspan="1"')
+ if hasattr(fav, 'allowDuplicates'):
+ cell = '\n<select name="allowDuplicates" selected="%s">\n' % \
+ fav.allowDuplicates
+ else:
+ cell = '\n<select name="allowDuplicates">\n'
+ cell += ' <option value="1">'+_('ALLOW')+'</option>\n'
+ cell += ' <option value="0">'+_('PREVENT')+'</option>\n'
+ cell += '</select>\n'
+ fv.tableCell(cell, 'class="'+status+'" colspan="1"')
if config.ONLY_NEW_DETECTION:
- if hasattr(fav, 'onlyNew'):
- cell = '\n<select name="onlyNew" selected="%s">\n' % fav.onlyNew
- else:
- cell = '\n<select name="onlyNew">\n'
- cell += ' <option value="0">'+_('ALL')+'</option>\n'
- cell += ' <option value="1">'+_('ONLY NEW')+'</option>\n'
- cell += '</select>\n'
- fv.tableCell(cell, 'class="'+status+'" colspan="1"')
+ if hasattr(fav, 'onlyNew'):
+ cell = '\n<select name="onlyNew" selected="%s">\n' %
fav.onlyNew
+ else:
+ cell = '\n<select name="onlyNew">\n'
+ cell += ' <option value="0">'+_('ALL')+'</option>\n'
+ cell += ' <option value="1">'+_('ONLY NEW')+'</option>\n'
+ cell += '</select>\n'
+ fv.tableCell(cell, 'class="'+status+'" colspan="1"')
# cell = '\n<select name="priority" selected="%s">\n' % fav.priority
@@ -259,7 +259,7 @@
cell = '<input type="hidden" name="priority" value="%s">' %
fav.priority
cell += '<input type="hidden" name="action" value="%s">' % action
- cell += '<input type="submit" value="'+_('Save')+'">'
+ cell += '<input type="submit" value="'+_('Save')+'">'
fv.tableCell(cell, 'class="'+status+'" colspan="1"')
fv.tableRowClose()
@@ -295,6 +295,5 @@
fv.printFooter()
return String( fv.res )
-
-resource = EditFavoriteResource()
+resource = EditFavoriteResource()
Modified: branches/rel-1/freevo/src/www/htdocs/favorites.rpy
==============================================================================
--- branches/rel-1/freevo/src/www/htdocs/favorites.rpy (original)
+++ branches/rel-1/freevo/src/www/htdocs/favorites.rpy Fri May 11 18:31:49 2007
@@ -6,7 +6,7 @@
# $Id$
#
# Notes:
-# Todo:
+# Todo:
#
# -----------------------------------------------------------------------
# Freevo - A Home Theater PC framework
@@ -69,9 +69,9 @@
allowDuplicates = 1
onlyNew = 0
if config.DUPLICATE_DETECTION:
- allowDuplicates = fv.formValue(form, 'allowDuplicates')
+ allowDuplicates = fv.formValue(form, 'allowDuplicates')
if config.ONLY_NEW_DETECTION:
- onlyNew = fv.formValue(form, 'onlyNew')
+ onlyNew = fv.formValue(form, 'onlyNew')
if action == 'remove':
ri.removeFavorite(name)
@@ -108,20 +108,20 @@
fv.tableCell(_('Day of week'), 'class="guidehead" colspan="1"')
fv.tableCell(_('Time of day'), 'class="guidehead" colspan="1"')
if config.DUPLICATE_DETECTION:
- fv.tableCell(_('Duplicates'), 'class="guidehead" colspan="1"')
+ fv.tableCell(_('Duplicates'), 'class="guidehead" colspan="1"')
if config.ONLY_NEW_DETECTION:
- fv.tableCell(_('Episodes'), 'class="guidehead" colspan="1"')
+ fv.tableCell(_('Episodes'), 'class="guidehead" colspan="1"')
fv.tableCell(_('Actions'), 'class="guidehead" colspan="1"')
fv.tableCell(_('Priority'), 'class="guidehead" colspan="1"')
fv.tableRowClose()
def sortByPriority(a,b):
if (a.priority < b.priority):
- return -1
+ return -1
elif (a.priority > b.priority):
- return 1
+ return 1
else:
- return 0
+ return 0
favs = favorites.values()
favs.sort(sortByPriority)
for fav in favs:
@@ -130,7 +130,7 @@
fchan = _('ANY')
else:
fchan = fav.channel
-
+
fv.tableRowOpen('class="chanrow"')
fv.tableCell(Unicode(fav.name), 'class="'+status+'" colspan="1"')
fv.tableCell(Unicode(fav.title), 'class="'+status+'" colspan="1"')
@@ -149,24 +149,24 @@
fv.tableCell(cell, 'class="'+status+'" colspan="1"')
if config.DUPLICATE_DETECTION:
- (tempStatus, tempFav) = ri.getFavorite(fav.title)
- if hasattr(tempFav,'allowDuplicates') and
int(tempFav.allowDuplicates) == 1:
- cell = 'ALLOW'
- elif hasattr(tempFav,'allowDuplicates') and
int(tempFav.allowDuplicates) == 0:
- cell = 'PREVENT'
- else:
- cell = 'NONE'
- fv.tableCell(cell, 'class="'+status+'" colspan="1"')
+ (tempStatus, tempFav) = ri.getFavorite(fav.title)
+ if hasattr(tempFav,'allowDuplicates') and
int(tempFav.allowDuplicates) == 1:
+ cell = 'ALLOW'
+ elif hasattr(tempFav,'allowDuplicates') and
int(tempFav.allowDuplicates) == 0:
+ cell = 'PREVENT'
+ else:
+ cell = 'NONE'
+ fv.tableCell(cell, 'class="'+status+'" colspan="1"')
if config.ONLY_NEW_DETECTION:
- (tempStatus, tempFav) = ri.getFavorite(fav.title)
- if hasattr(tempFav,'onlyNew') and int(tempFav.onlyNew) == 1:
- cell = 'ONLY NEW'
- elif hasattr(tempFav,'onlyNew') and int(tempFav.onlyNew) == 0:
- cell = 'ALL'
- else:
- cell = 'NONE'
- fv.tableCell(cell, 'class="'+status+'" colspan="1"')
+ (tempStatus, tempFav) = ri.getFavorite(fav.title)
+ if hasattr(tempFav,'onlyNew') and int(tempFav.onlyNew) == 1:
+ cell = 'ONLY NEW'
+ elif hasattr(tempFav,'onlyNew') and int(tempFav.onlyNew) == 0:
+ cell = 'ALL'
+ else:
+ cell = 'NONE'
+ fv.tableCell(cell, 'class="'+status+'" colspan="1"')
fname_esc = urllib.quote(String(fav.name.replace('&','%26')))
# cell = '<input type="hidden" name="action" value="%s">' % action
@@ -188,7 +188,7 @@
cell += ('<a
href="favorites.rpy?action=bump&name=%s&priority=1">'+_('Lower')+'</a>') %
fname_esc
fv.tableCell(cell, 'class="'+status+'" colspan="1"')
-
+
fv.tableRowClose()
fv.tableClose()
@@ -200,6 +200,5 @@
fv.printFooter()
return String( fv.res )
-
-resource = FavoritesResource()
+resource = FavoritesResource()
Modified: branches/rel-1/freevo/src/www/htdocs/fileinfo.rpy
==============================================================================
--- branches/rel-1/freevo/src/www/htdocs/fileinfo.rpy (original)
+++ branches/rel-1/freevo/src/www/htdocs/fileinfo.rpy Fri May 11 18:31:49 2007
@@ -4,7 +4,7 @@
# proginfo.rpy - Dynamically update program info popup box.
# -----------------------------------------------------------------------
# Freevo - A Home Theater PC framework
-# Copyright (C) 2002 Krister Lagerstrom, et al.
+# Copyright (C) 2002 Krister Lagerstrom, et al.
# Please see the file freevo/Docs/CREDITS for a complete list of authors.
#
# This program is free software; you can redistribute it and/or modify
@@ -29,8 +29,8 @@
from www.web_types import HTMLResource, FreevoResource
from twisted.web.woven import page
import util
-import config
-import kaa.metadata as metadata
+import config
+import kaa.metadata as metadata
from twisted.web import static
MAX_DESCRIPTION_CHAR = 1000
@@ -51,18 +51,18 @@
form = request.args
file = fv.formValue(form, 'dir')
img = fv.formValue(form, 'img')
-
+
if file:
medium = metadata.parse(file)
#print medium
title = ""
info = "<table>"
(basedir, item) = os.path.split(file)
-
+
fxd_file = file[:file.rindex('.')] + ".fxd"
if os.path.exists(fxd_file):
fxd_info = self.get_fxd_info(fxd_file)
- i = 0
+ i = 0
for z in fxd_info:
if z and z != "cover-img":
info += "<tr><td><b>" + fxd_info.keys()[i] + ":
</b></td><td>"+fxd_info.values()[i]+"</td></tr>"
@@ -90,15 +90,15 @@
#movie info
if media_info['height'] and media_info['width']:
info +='<tr><td><b>Dimensions:
</b></td><td>'+str(media_info['height'])+' x '\
- +str(media_info['width'])+'</td></tr>'
+ +str(media_info['width'])+'</td></tr>'
if media_info['type']:
- info+='<tr><td><b>Type:
</b></td><td>'+media_info['type']+'</td></tr>'
+ info+='<tr><td><b>Type:
</b></td><td>'+media_info['type']+'</td></tr>'
#add size
info+='<tr><td><b>Size:
</b></td><td>'+str((os.stat(file)[6]/1024)/1024)+' MB</td></tr>'
info+= "</table>"
-
+
file_link = self.convert_dir(file)
-
+
fv.res += (
u"<script>\n" \
u"var doc = parent.top.document;\n" \
@@ -126,7 +126,7 @@
vlc_window.document.write(\'</body></html>\'); \
}\
'
- )
+ )
elif img:
_img = img.split("_")#
@@ -141,9 +141,9 @@
u"<img src=\"%s\" height=\"%s\" width=\"%s\" />"\
u"</body></html>"
) % ( img_name, img, height, width )
-
+
return String(fv.res)
-
+
def get_fxd_info(self, fxd_file):
print 'get_fxd_info(self, %r)' % (fxd_file)
fxd_info = {}
Modified: branches/rel-1/freevo/src/www/htdocs/genre.rpy
==============================================================================
--- branches/rel-1/freevo/src/www/htdocs/genre.rpy (original)
+++ branches/rel-1/freevo/src/www/htdocs/genre.rpy Fri May 11 18:31:49 2007
@@ -114,7 +114,7 @@
bforcell=('<a href="genre.rpy?stime=%i%s">'
+'<img src="images/LeftArrow.png" alt="left"
border="0"/></a> ') \
% (mfrprevguide, keepcat)
-
+
fv.tableOpen('border="0" cellpadding="4" cellspacing="1" width="100%"')
fv.tableRowOpen('class="chanrow"')
fv.tableCell('<form
action="">'+bforcell+_('Show')+' '+_('Category')+': '\
@@ -167,7 +167,7 @@
fv.tableRowOpen('class="chanrow"')
fv.tableCell(chan.displayname, 'class="channel"')
popid = '%s:%s' % (prog.channel_id, prog.start)
-
+
fv.tableCell(prog.title+' - '+prog.desc,
'class="'+status+'" \
onclick="guide_click(this, event)" id="%s"
width="80%%"' % popid )
fv.tableCell(time.strftime('%H:%M',
time.localtime(prog.start)), 'class="channel"')
Modified: branches/rel-1/freevo/src/www/htdocs/guide.rpy
==============================================================================
--- branches/rel-1/freevo/src/www/htdocs/guide.rpy (original)
+++ branches/rel-1/freevo/src/www/htdocs/guide.rpy Fri May 11 18:31:49 2007
@@ -6,11 +6,11 @@
# $Id$
#
# Notes:
-# Todo:
+# Todo:
#
# -----------------------------------------------------------------------
# Freevo - A Home Theater PC framework
-# Copyright (C) 2002 Krister Lagerstrom, et al.
+# Copyright (C) 2002 Krister Lagerstrom, et al.
# Please see the file freevo/Docs/CREDITS for a complete list of authors.
#
# This program is free software; you can redistribute it and/or modify
@@ -37,8 +37,8 @@
import util.tv_util as tv_util
import util
-import config
-import tv.epg_xmltv
+import config
+import tv.epg_xmltv
import tv.record_client as ri
from twisted.web import static
@@ -73,7 +73,7 @@
myt = time.time()
myt_t = time.localtime(myt)
gstart_t = time.localtime(gstart)
- myt = time.mktime((myt_t[0], myt_t[1], myt_t[2], 0, 0, 5,
+ myt = time.mktime((myt_t[0], myt_t[1], myt_t[2], 0, 0, 5,
myt_t[6], myt_t[7], -1))
listh = tv_util.when_listings_expire()
if listh == 0:
@@ -96,7 +96,7 @@
retval = '<select name="offset">\n'
myt = gstart
myt_t = time.localtime(myt)
- hrstart = time.mktime((myt_t[0], myt_t[1], myt_t[2], 0, 0, 5,
+ hrstart = time.mktime((myt_t[0], myt_t[1], myt_t[2], 0, 0, 5,
myt_t[6], myt_t[7], -1))
hrinc = hrstart
hrstop = hrstart + (60*60*24)
@@ -176,7 +176,7 @@
datime = time.strftime(config.TV_TIMEFORMAT,
time.localtime(headerstart))
if i == n_cols-1:
dacell = datime + ' <a
href="guide.rpy?stime=%i">»</a>' % mfrnextguide
- else:
+ else:
if mfrprevguide > 0:
dacell = '<a
href="guide.rpy?stime=%i">«</a> ' % mfrprevguide + datime
else:
@@ -188,7 +188,7 @@
headerstart += INTERVAL
fv.tableRowClose()
showheader+= 1
-
+
rowdata = []
now = mfrguidestart
# chan.displayname = string.replace(chan.displayname, "&", "SUB")
@@ -212,7 +212,7 @@
status = 'scheduled'
really_now = time.time()
if prog.start <= really_now and prog.stop >=
really_now:
- # in the future we should REALLY see if it is
+ # in the future we should REALLY see if it is
# recording instead of just guessing
status = 'recording'
@@ -228,7 +228,7 @@
# prog.title = string.replace(prog.title, "&", "SUB")
# prog.desc = string.replace(prog.desc, "&", "SUB")
cell += '%s' % prog.title
- if colspan > c_left:
+ if colspan > c_left:
# show extends past visible range,
# insert right arrows
cell += ' »'
@@ -246,7 +246,7 @@
rowdata.append("</tr>")
fv.res += string.join(rowdata, "\n")
fv.tableClose()
-
+
fv.printSearchForm()
fv.printLinks()
fv.res += '</div>'
Modified: branches/rel-1/freevo/src/www/htdocs/help/doc.rpy
==============================================================================
--- branches/rel-1/freevo/src/www/htdocs/help/doc.rpy (original)
+++ branches/rel-1/freevo/src/www/htdocs/help/doc.rpy Fri May 11 18:31:49 2007
@@ -5,7 +5,7 @@
# $Id$
#
# Notes:
-# Todo:
+# Todo:
#
# -----------------------------------------------------------------------
# Freevo - A Home Theater PC framework
@@ -44,7 +44,7 @@
else:
docRoot = os.path.join(config.SHARE_DIR, 'htdocs')
self.docRoot = docRoot + '/help/wiki'
-
+
def _render(self, request):
fv = HTMLResource()
Modified: branches/rel-1/freevo/src/www/htdocs/help/howto.rpy
==============================================================================
--- branches/rel-1/freevo/src/www/htdocs/help/howto.rpy (original)
+++ branches/rel-1/freevo/src/www/htdocs/help/howto.rpy Fri May 11 18:31:49 2007
@@ -5,7 +5,7 @@
# $Id$
#
# Notes:
-# Todo:
+# Todo:
#
# -----------------------------------------------------------------------
# Freevo - A Home Theater PC framework
@@ -48,7 +48,7 @@
_('Freevo Plugin Writing HOWTO'),
_('Freevo Plugin Writing HOWTO')+': '+_('Writing your own
plugins for Freevo'))
}
-
+
class HowtoResource(FreevoResource):
def __init__(self):
FreevoResource.__init__(self)
@@ -62,7 +62,7 @@
self.BASEDIR[type] = os.path.join(d, dirname)
elif os.path.isfile(os.path.join(d, dirname, 'book1.html')):
self.BASEDIR[type] = os.path.join(d, dirname)
-
+
def _render(self, request):
fv = HTMLResource()
pos = 0
@@ -75,9 +75,9 @@
type = fv.formValue(form, 'type')
if not type:
type = 'install'
-
+
name = TYPES[type][1]
-
+
if not self.BASEDIR.has_key(type):
fv.printHeader(name, '/styles/main.css',
prefix=request.path.count('/')-1)
fv.res += '<div id="content">\n'
@@ -107,7 +107,7 @@
# remove border for some DocBook stylesheets
if line.find('BGCOLOR="#E0E0E0"') == 0:
line = ''
-
+
if pos == 0 and line.find('><TITLE') == 0:
pos = 1
elif pos == 1:
@@ -131,6 +131,6 @@
fv.printFooter()
fv.res+=('</ul>')
return String(fv.res)
-
+
resource = HowtoResource()
Modified: branches/rel-1/freevo/src/www/htdocs/help/index.rpy
==============================================================================
--- branches/rel-1/freevo/src/www/htdocs/help/index.rpy (original)
+++ branches/rel-1/freevo/src/www/htdocs/help/index.rpy Fri May 11 18:31:49 2007
@@ -5,7 +5,7 @@
# $Id$
#
# Notes:
-# Todo:
+# Todo:
#
# -----------------------------------------------------------------------
# Freevo - A Home Theater PC framework
@@ -48,7 +48,7 @@
information), feel free to add information there.')
fv.res += '<p><b>'+_('Index')+'</b><ol>'
-
+
fv.res += '<li><a href="howto.rpy">'+_('Freevo Installation
Howto')+'</a></li>'
fv.res += '<li><a href="doc.rpy?file=faq">'+_('Frequently Asked
Questions')+'</a></li>'
fv.res += '<li><a href="doc.rpy?file=recording">'+_('Recording
Information')+'</a></li>'
@@ -63,5 +63,5 @@
fv.res+=('</ul>')
fv.res+='</div>'
return String( fv.res )
-
+
resource = HelpResource()
Modified: branches/rel-1/freevo/src/www/htdocs/help/plugins.rpy
==============================================================================
--- branches/rel-1/freevo/src/www/htdocs/help/plugins.rpy (original)
+++ branches/rel-1/freevo/src/www/htdocs/help/plugins.rpy Fri May 11
18:31:49 2007
@@ -5,7 +5,7 @@
# $Id$
#
# Notes:
-# Todo:
+# Todo:
#
# -----------------------------------------------------------------------
# Freevo - A Home Theater PC framework
@@ -42,7 +42,7 @@
class PluginResource(FreevoResource):
def _render(self, request):
-
+
fv = HTMLResource()
form = request.args
@@ -103,6 +103,6 @@
fv.printFooter()
fv.res+=('</ul>')
return String( fv.res )
-
+
resource = PluginResource()
Modified: branches/rel-1/freevo/src/www/htdocs/iceslistchanger.rpy
==============================================================================
--- branches/rel-1/freevo/src/www/htdocs/iceslistchanger.rpy (original)
+++ branches/rel-1/freevo/src/www/htdocs/iceslistchanger.rpy Fri May 11
18:31:49 2007
@@ -6,7 +6,7 @@
# $Id$
#
# Notes:
-# Todo:
+# Todo:
#
# -----------------------------------------------------------------------
# Freevo - A Home Theater PC framework
@@ -48,7 +48,7 @@
def _render(self, request):
fv = HTMLResource()
form = request.args
-
+
directories = config.AUDIO_ITEMS
rpyscript = 'iceslistchanger.rpy'
#rpyscript = os.path.basename(os.environ['SCRIPT_FILENAME'])
@@ -97,7 +97,7 @@
fv.tableRowClose()
fv.tableClose()
-
+
fv.printSearchForm()
fv.printLinks()
fv.printFooter()
Modified: branches/rel-1/freevo/src/www/htdocs/index.rpy
==============================================================================
--- branches/rel-1/freevo/src/www/htdocs/index.rpy (original)
+++ branches/rel-1/freevo/src/www/htdocs/index.rpy Fri May 11 18:31:49 2007
@@ -6,7 +6,7 @@
# $Id$
#
# Notes:
-# Todo:
+# Todo:
#
# -----------------------------------------------------------------------
# Freevo - A Home Theater PC framework
@@ -31,7 +31,7 @@
import sys, time
-import tv.record_client
+import tv.record_client
from www.web_types import HTMLResource, FreevoResource
import util, config
import util.tv_util as tv_util
@@ -46,10 +46,10 @@
fv.printHeader(_('Welcome'), 'styles/main.css',selected=_('Home'))
fv.res += '<div id="contentmain">\n'
-
+
fv.res += '<br/><br/><h2>'+( _('Freevo Web Status as of %s') % \
time.strftime('%B %d ' + config.TV_TIMEFORMAT,
time.localtime()) ) +'</h2>'
-
+
(server_available, schedule) = tv.record_client.connectionTest()
if not server_available:
fv.res += '<p class="alert"><b>'+_('Notice')+'</b>: '+_('The
recording server is down.')+'</p>\n'
@@ -95,6 +95,6 @@
fv.printFooter()
return String( fv.res )
-
+
resource = IndexResource()
Modified: branches/rel-1/freevo/src/www/htdocs/library.rpy
==============================================================================
--- branches/rel-1/freevo/src/www/htdocs/library.rpy (original)
+++ branches/rel-1/freevo/src/www/htdocs/library.rpy Fri May 11 18:31:49 2007
@@ -420,7 +420,7 @@
else:
image_link = "images/library/www-mp-tv.png"
mydirlink = '<a
href="'+action_script+'?media='+action_mediatype+'&dir='+urllib.quote(mydir)+'">'\
- +'<img src="' + image_link + '" class="folder"
height="200px" width="200px" /><br />'+mydispdir+'</a>'
+ +'<img src="' + image_link + '" class="folder"
height="200px" width="200px" /><br />'+mydispdir+'</a>'
### show image cover
elif action_mediatype == "images":
image_link = "images/library/www-mp-pictures.png"
@@ -515,7 +515,7 @@
image = '<img
src="images/library/recorded_small.png" height="30px" width="30px" />'
fv.tableCell('<a onclick="info_click(this, event)"
id="'+filepath+'">'\
+image+Unicode(title)+'</a>',\
- 'class="'+status+'" colspan="1"')
+ 'class="'+status+'" colspan="1"')
### show music
elif action_mediatype == "music":
try:
@@ -658,4 +658,3 @@
resource = LibraryResource()
-
Modified: branches/rel-1/freevo/src/www/htdocs/manualrecord.rpy
==============================================================================
--- branches/rel-1/freevo/src/www/htdocs/manualrecord.rpy (original)
+++ branches/rel-1/freevo/src/www/htdocs/manualrecord.rpy Fri May 11
18:31:49 2007
@@ -6,7 +6,7 @@
# $Id$
#
# Notes:
-# Todo:
+# Todo:
# -----------------------------------------------------------------------
# Freevo - A Home Theater PC framework
# Copyright (C) 2002 Krister Lagerstrom, et al.
@@ -76,13 +76,13 @@
startday = fv.formValue(form, 'startday')
starthour = fv.formValue(form, 'starthour')
startminute = fv.formValue(form, 'startminute')
- startyear = curtime[0]
+ startyear = curtime[0]
stopmonth = fv.formValue(form, 'stopmonth')
stopday = fv.formValue(form, 'stopday')
stophour = fv.formValue(form, 'stophour')
stopminute = fv.formValue(form, 'stopminute')
- stopyear = curtime[0]
- currentmonth = curtime[1]
+ stopyear = curtime[0]
+ currentmonth = curtime[1]
desc = fv.formValue(form, 'desc')
title = fv.formValue(form, 'title')
action = fv.formValue(form, 'action')
@@ -101,7 +101,7 @@
# create utc stop time
stoptime = time.mktime(strptime.strptime(str(stopmonth)+"
"+str(stopday)+" "+str(stopyear)+"
"+str(stophour)+":"+str(stopminute)+":00",'%m %d %Y %H:%M:%S'))
# so we don't record for more then maxdays (maxdays day *
24hr/day * 60 min/hr * 60 sec/min)
- if abs(stoptime - starttime) < (MAXDAYS * 86400):
+ if abs(stoptime - starttime) < (MAXDAYS * 86400):
if starttime < stoptime:
if stoptime < curtime_epoch + MINPICKUP:
errormsg = "Sorry, the stop time does not give
enough time for cron to pickup the change. Please set it to record for a few
minutes longer."
@@ -187,14 +187,14 @@
startcell = startcell + dayselect % ("startday",
'onChange="document.manrec.stopday.selectedIndex=document.manrec.startday.selectedIndex"')
startcell = startcell + '@'
startcell = startcell + hourselect % ("starthour",
'onChange="document.manrec.stophour.selectedIndex=document.manrec.starthour.selectedIndex"')
- startcell = startcell + ':'
+ startcell = startcell + ':'
startcell = startcell + minuteselect % ("startminute",
'onChange="document.manrec.stopminute.selectedIndex=document.manrec.startminute.selectedIndex"')
stopcell = monthselect % ("stopmonth", " ")
stopcell = stopcell + dayselect % ("stopday", " ")
- stopcell = stopcell + '@'
+ stopcell = stopcell + '@'
stopcell = stopcell + hourselect % ("stophour", " ")
- stopcell = stopcell + ':'
+ stopcell = stopcell + ':'
stopcell = stopcell + minuteselect % ("stopminute", " ")
fv.printHeader(_('Manual Record'), 'styles/main.css',
selected=_("Manual Recording"))
@@ -240,7 +240,5 @@
fv.printFooter()
return String( fv.res )
-
-resource = ManualRecordResource()
-
+resource = ManualRecordResource()
Modified: branches/rel-1/freevo/src/www/htdocs/record.rpy
==============================================================================
--- branches/rel-1/freevo/src/www/htdocs/record.rpy (original)
+++ branches/rel-1/freevo/src/www/htdocs/record.rpy Fri May 11 18:31:49 2007
@@ -6,7 +6,7 @@
# $Id$
#
# Notes:
-# Todo:
+# Todo:
#
# -----------------------------------------------------------------------
# Freevo - A Home Theater PC framework
@@ -50,7 +50,7 @@
chan = Unicode(fv.formValue(form, 'chan'))
if isinstance( chan, str ):
chan = Unicode( chan, 'latin-1' )
-
+
start = fv.formValue(form, 'start')
action = fv.formValue(form, 'action')
@@ -66,7 +66,7 @@
if action == 'remove':
(status, recordings) = ri.getScheduledRecordings()
progs = recordings.getProgramList()
-
+
prog = None
for what in progs.values():
if start == '%s' % what.start and chan == '%s' %
what.channel_id:
@@ -93,7 +93,7 @@
return String(fv.res)
-
+
#print 'RESULT: %s' % status
#print 'PROG: %s' % String(prog)
ri.scheduleRecording(prog)
@@ -149,24 +149,24 @@
cell = Unicode(prog.sub_title)
fv.tableCell(cell,'class="'+status+'" colspan="1"')
-
+
if prog.desc == '':
cell = _('Sorry, the program description for %s is
unavailable.') % ('<b>'+prog.title+'</b>')
else:
cell = Unicode(prog.desc)
fv.tableCell(cell, 'class="'+status+'" colspan="1"')
-
+
cell = ('<a
href="record.rpy?chan=%s&start=%s&action=remove">'+_('Remove')+'</a>')
% (prog.channel_id, prog.start)
fv.tableCell(cell, 'class="'+status+'" colspan="1"')
fv.tableRowClose()
fv.tableClose()
-
+
fv.printSearchForm()
#fv.printLinks()
fv.printFooter()
return String( fv.res )
-
+
resource = RecordResource()
Modified: branches/rel-1/freevo/src/www/htdocs/search.rpy
==============================================================================
--- branches/rel-1/freevo/src/www/htdocs/search.rpy (original)
+++ branches/rel-1/freevo/src/www/htdocs/search.rpy Fri May 11 18:31:49 2007
@@ -6,7 +6,7 @@
# $Id$
#
# Notes:
-# Todo:
+# Todo:
#
# -----------------------------------------------------------------------
# Freevo - A Home Theater PC framework
@@ -66,7 +66,7 @@
(got_matches, progs) = ri.findMatches(find, movies_only)
- if got_matches:
+ if got_matches:
(result, favs) = ri.getFavorites()
(result, recordings) = ri.getScheduledRecordings()
if result:
@@ -78,7 +78,7 @@
fv.printAdvancedSearchForm()
if not got_matches:
- if find or movies_only:
+ if find or movies_only:
fv.res += '<h3>'+_('No matches')+'</h3>'
else:
@@ -107,10 +107,10 @@
status = 'recording'
except:
sys.stderr.write('isRecording not set')
-
+
if ri.isProgAFavorite(prog, favs):
status = 'favorite'
-
+
fv.tableRowOpen('class="chanrow"')
fv.tableCell(time.strftime('%b %d ' + config.TV_TIMEFORMAT,
time.localtime(prog.start)), 'class="'+status+'" colspan="1"')
@@ -125,24 +125,24 @@
fv.tableCell(prog.sub_title, 'class="'+status+'"
colspan="1"')
else:
fv.tableCell(' ', 'class="'+status+'" colspan="1"')
-
-
+
+
if prog.desc == '':
cell = _('Sorry, the program description for %s is
unavailable.') % ('<b>'+prog.title+'</b>')
else:
cell = prog.desc
fv.tableCell(cell, 'class="'+status+'" colspan="1"')
-
+
if status == 'scheduled':
cell = ('<a
href="record.rpy?chan=%s&start=%s&action=remove">'+_('Remove')+'</a>') %
(prog.channel_id, prog.start)
elif status == 'recording':
cell = ('<a
href="record.rpy?chan=%s&start=%s&action=add">'+_('Record')+'</a>') %
(prog.channel_id, prog.start)
else:
cell = ('<a
href="record.rpy?chan=%s&start=%s&action=add">'+_('Record')+'</a>') %
(prog.channel_id, prog.start)
-
+
cell += (' | <a
href="edit_favorite.rpy?chan=%s&start=%s&action=add">'+_('New
favorite')+'</a>') % (prog.channel_id, prog.start)
fv.tableCell(cell, 'class="'+status+'" colspan="1"')
-
+
fv.tableRowClose()
fv.tableClose()
@@ -155,6 +155,5 @@
fv.printFooter()
return String( fv.res )
-
-resource = SearchResource()
+resource = SearchResource()
Modified: branches/rel-1/freevo/src/www/htdocs/wap_login.rpy
==============================================================================
--- branches/rel-1/freevo/src/www/htdocs/wap_login.rpy (original)
+++ branches/rel-1/freevo/src/www/htdocs/wap_login.rpy Fri May 11 18:31:49 2007
@@ -6,11 +6,11 @@
# $Id$
#
# Notes:
-# Todo:
+# Todo:
#
# -----------------------------------------------------------------------
# Freevo - A Home Theater PC framework
-# Copyright (C) 2003 Krister Lagerstrom, et al.
+# Copyright (C) 2003 Krister Lagerstrom, et al.
# Please see the file freevo/Docs/CREDITS for a complete list of authors.
#
# This program is free software; you can redistribute it and/or modify
@@ -41,7 +41,7 @@
user = fv.formValue(form, 'user')
passw = fv.formValue(form, 'passw')
action = fv.formValue(form, 'action')
-
+
fv.printHeader()
fv.res += ' <card id="card1" title="Freevo Wap">\n'
Modified: branches/rel-1/freevo/src/www/htdocs/wap_rec.rpy
==============================================================================
--- branches/rel-1/freevo/src/www/htdocs/wap_rec.rpy (original)
+++ branches/rel-1/freevo/src/www/htdocs/wap_rec.rpy Fri May 11 18:31:49 2007
@@ -6,11 +6,11 @@
# $Id$
#
# Notes:
-# Todo:
+# Todo:
#
# -----------------------------------------------------------------------
# Freevo - A Home Theater PC framework
-# Copyright (C) 2003 Krister Lagerstrom, et al.
+# Copyright (C) 2003 Krister Lagerstrom, et al.
# Please see the file freevo/Docs/CREDITS for a complete list of authors.
#
# This program is free software; you can redistribute it and/or modify
@@ -67,25 +67,25 @@
# look for action to do an add
if action:
- if action == 'add':
- starttime = time.mktime(strptime.strptime(str(startdate)+"
"+str(start)+":00",'%d/%m/%y %H:%M:%S'))
- stoptime = time.mktime(strptime.strptime(str(startdate)+"
"+str(stop)+":00",'%d/%m/%y %H:%M:%S'))
- if stoptime < starttime:
- stoptime = stoptime + 86400
- prog = tv.epg_types.TvProgram()
- prog.channel_id = channel
- prog.title = "Wap Recorded"
- prog.start = starttime
- prog.stop = stoptime
- ri.scheduleRecording(prog)
- fv.res += ' <card id="card3" title="Freevo">\n'
- fv.res += ' <p><strong>Rec. Sheduled</strong><br/>\n'
- fv.res += ' Date : %s<br/>\n' % startdate
- fv.res += ' Start : %s<br/>\n' % start
- fv.res += ' Stop : %s<br/>\n' % stop
- fv.res += ' Chan.: %s</p>\n' % channel
- fv.res += ' </card>\n'
-
+ if action == 'add':
+ starttime = time.mktime(strptime.strptime(str(startdate)+"
"+str(start)+":00",'%d/%m/%y %H:%M:%S'))
+ stoptime = time.mktime(strptime.strptime(str(startdate)+"
"+str(stop)+":00",'%d/%m/%y %H:%M:%S'))
+ if stoptime < starttime:
+ stoptime = stoptime + 86400
+ prog = tv.epg_types.TvProgram()
+ prog.channel_id = channel
+ prog.title = "Wap Recorded"
+ prog.start = starttime
+ prog.stop = stoptime
+ ri.scheduleRecording(prog)
+ fv.res += ' <card id="card3" title="Freevo">\n'
+ fv.res += ' <p><strong>Rec. Sheduled</strong><br/>\n'
+ fv.res += ' Date : %s<br/>\n' % startdate
+ fv.res += ' Start : %s<br/>\n' % start
+ fv.res += ' Stop : %s<br/>\n' % stop
+ fv.res += ' Chan.: %s</p>\n' % channel
+ fv.res += ' </card>\n'
+
else:
if errormsg == 'not validated':
@@ -116,7 +116,7 @@
fv.res += ' Channel: <select name="channel">\n'
for ch in guide.chan_list:
fv.res += ' <option
value="'+ch.id+'">'+ch.displayname+"</option>\n"
- fv.res += ' </select></p>\n'
+ fv.res += ' </select></p>\n'
fv.res += ' <do type="accept" label="Record">\n'
fv.res += ' <go href="wap_rec.rpy" method="post">\n'
fv.res += ' <postfield name="action" value="add"/>\n'
Modified: branches/rel-1/freevo/src/www/htdocs/webremote.rpy
==============================================================================
--- branches/rel-1/freevo/src/www/htdocs/webremote.rpy (original)
+++ branches/rel-1/freevo/src/www/htdocs/webremote.rpy Fri May 11 18:31:49 2007
@@ -41,33 +41,33 @@
form = request.args
if not (config.ENABLE_NETWORK_REMOTE == 1 and
config.REMOTE_CONTROL_PORT):
- fv.res += """
- The WebRemote is currently disabled.<br/><br/>
- To enable, add the following settings to your local_conf.py file
and restart freevo:<br/>
- <ul>
- <li>ENABLE_NETWORK_REMOTE = 1</li>
- <li>REMOTE_CONTROL_HOST = '127.0.0.1'</li>
- <li>REMOTE_CONTROL_PORT = 16310</li>
- </ul>
- """
- return String( fv.res )
+ fv.res += """
+ The WebRemote is currently disabled.<br/><br/>
+ To enable, add the following settings to your local_conf.py file
and restart freevo:<br/>
+ <ul>
+ <li>ENABLE_NETWORK_REMOTE = 1</li>
+ <li>REMOTE_CONTROL_HOST = '127.0.0.1'</li>
+ <li>REMOTE_CONTROL_PORT = 16310</li>
+ </ul>
+ """
+ return String( fv.res )
code = fv.formValue(form, 'code')
if code:
- if code == 'VOLP': code = 'VOL+';
- if code == 'VOLM': code = 'VOL-';
- if code == 'CHP': code = 'CH+';
- if code == 'CHM': code = 'CH-';
-
- host = config.REMOTE_CONTROL_HOST
- port = config.REMOTE_CONTROL_PORT
- buf = 1024
- addr = (host, port)
-
- UDPSock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
- UDPSock.sendto(code, addr)
- UDPSock.close()
- return;
+ if code == 'VOLP': code = 'VOL+';
+ if code == 'VOLM': code = 'VOL-';
+ if code == 'CHP': code = 'CH+';
+ if code == 'CHM': code = 'CH-';
+
+ host = config.REMOTE_CONTROL_HOST
+ port = config.REMOTE_CONTROL_PORT
+ buf = 1024
+ addr = (host, port)
+
+ UDPSock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
+ UDPSock.sendto(code, addr)
+ UDPSock.close()
+ return;
fv.res += """
<?xml version="1.0" encoding="UTF-8"?>
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog