Author: duncan
Date: Mon Dec 25 19:58:07 2006
New Revision: 8797
Modified:
branches/rel-1-6/freevo/src/tv/plugins/manual_record.py
Log:
Code cleanup replacing tabs with spaces and removing old cvs log
Modified: branches/rel-1-6/freevo/src/tv/plugins/manual_record.py
==============================================================================
--- branches/rel-1-6/freevo/src/tv/plugins/manual_record.py (original)
+++ branches/rel-1-6/freevo/src/tv/plugins/manual_record.py Mon Dec 25
19:58:07 2006
@@ -8,17 +8,6 @@
# Todo:
#
# -----------------------------------------------------------------------
-# $Log$
-# Revision 1.7 2004/07/11 15:49:12 mikeruelle
-# great patch from tcwan to fix off by one and start the time menus sensibly
-#
-# Revision 1.6 2004/07/10 12:33:42 dischi
-# header cleanup
-#
-# Revision 1.5 2004/04/12 14:58:38 dischi
-# prevent crash for bad TV.xml
-#
-# -----------------------------------------------------------------------
# Freevo - A Home Theater PC framework
# Copyright (C) 2003 Krister Lagerstrom, et al.
# Please see the file freevo/Docs/CREDITS for a complete list of authors.
@@ -37,7 +26,7 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# ----------------------------------------------------------------------- */
+# -----------------------------------------------------------------------
import calendar
@@ -85,10 +74,10 @@
now = time.time()
now += 300
- self.startnow = now
+ self.startnow = now
self.starttime = time.localtime(now)
now += 1900
- self.stopnow = now
+ self.stopnow = now
self.stoptime = time.localtime(now)
def make_newprog(self):
@@ -100,23 +89,23 @@
self.prog.desc = ''
self.prog.channel_id = config.TV_CHANNELS[0][0]
- self.disp_channel = config.TV_CHANNELS[0][1]
+ self.disp_channel = config.TV_CHANNELS[0][1]
- #self.start_year = self.starttime[0]
+ #self.start_year = self.starttime[0]
self.start_month = self.starttime[1]
- self.disp_start_month = self.months[self.start_month - 1]
+ self.disp_start_month = self.months[self.start_month - 1]
self.start_day = self.starttime[2]
self.start_time = time.strftime(config.TV_TIMEFORMAT, self.starttime)
self.prog.start = self.startnow
- self.disp_starttime = '%s %s %s' % (self.disp_start_month,
self.start_day, self.start_time)
+ self.disp_starttime = '%s %s %s' % (self.disp_start_month,
self.start_day, self.start_time)
- #self.stop_year = self.stoptime[0]
+ #self.stop_year = self.stoptime[0]
self.stop_month = self.stoptime[1]
- self.disp_stop_month = self.months[self.stop_month - 1]
+ self.disp_stop_month = self.months[self.stop_month - 1]
self.stop_day = self.stoptime[2]
self.stop_time = time.strftime(config.TV_TIMEFORMAT, self.stoptime)
self.prog.stop = self.stopnow
- self.disp_stoptime = '%s %s %s' % (self.disp_stop_month, self.stop_day,
self.stop_time)
+ self.disp_stoptime = '%s %s %s' % (self.disp_stop_month,
self.stop_day, self.stop_time)
def actions(self):
return [( self.display_recitem , _('Display record item') )]
@@ -167,7 +156,7 @@
items = []
iter=1
- while iter < 13:
+ while iter < 13:
items.append(menu.MenuItem(self.months[(iter + self.starttime[1] -
1) % 12 - 1], action=self.alter_prop,
arg=('startmonth', (self.months[(iter +
self.starttime[1] - 1) % 12 - 1], (iter + self.starttime[1] - 1) % 12))))
iter = iter + 1
@@ -182,14 +171,14 @@
def mod_start_day(self, arg=None, menuw=None):
items = []
- numdays = calendar.monthrange(self.starttime[0], self.start_month)[1]
- daylimit = numdays + 1
+ numdays = calendar.monthrange(self.starttime[0], self.start_month)[1]
+ daylimit = numdays + 1
iter=1
while iter < daylimit:
- newday = (iter + self.starttime[2] - 1)
- currday = newday % daylimit
- if newday >= daylimit:
- currday += 1
+ newday = (iter + self.starttime[2] - 1)
+ currday = newday % daylimit
+ if newday >= daylimit:
+ currday += 1
items.append(menu.MenuItem(str(currday), action=self.alter_prop,
arg=('startday', currday)))
iter = iter + 1
@@ -204,10 +193,10 @@
def mod_start_time(self, arg=None, menuw=None):
items = []
- currminutes = self.starttime[3]*60 + self.starttime[4]
- minpadding = 5 - (currminutes % 5)
- if minpadding == 5:
- minpadding = 0
+ currminutes = self.starttime[3]*60 + self.starttime[4]
+ minpadding = 5 - (currminutes % 5)
+ if minpadding == 5:
+ minpadding = 0
for i in range(288):
mod = (i * 5 + currminutes + minpadding) % 1440
showtime = strftime(config.TV_TIMEFORMAT, gmtime(float(mod * 60)))
@@ -226,7 +215,7 @@
items = []
iter=1
- while iter < 13:
+ while iter < 13:
items.append(menu.MenuItem(self.months[(iter + self.stoptime[1] -
1) % 12 - 1], action=self.alter_prop,
arg=('stopmonth', (self.months[(iter +
self.stoptime[1] - 1) % 12 - 1], (iter + self.stoptime[1] - 1) % 12))))
iter = iter + 1
@@ -241,14 +230,14 @@
def mod_stop_day(self, arg=None, menuw=None):
items = []
- numdays = calendar.monthrange(self.stoptime[0], self.stop_month)[1]
- daylimit = numdays + 1
+ numdays = calendar.monthrange(self.stoptime[0], self.stop_month)[1]
+ daylimit = numdays + 1
iter=1
while iter < daylimit:
- newday = (iter + self.starttime[2] - 1)
- currday = newday % daylimit
- if newday >= daylimit:
- currday += 1
+ newday = (iter + self.starttime[2] - 1)
+ currday = newday % daylimit
+ if newday >= daylimit:
+ currday += 1
items.append(menu.MenuItem(str(currday), action=self.alter_prop,
arg=('stopday', currday)))
iter = iter + 1
@@ -263,10 +252,10 @@
def mod_stop_time(self, arg=None, menuw=None):
items = []
- currminutes = self.starttime[3]*60 + self.starttime[4]
- minpadding = 5 - (currminutes % 5)
- if minpadding == 5:
- minpadding = 0
+ currminutes = self.starttime[3]*60 + self.starttime[4]
+ minpadding = 5 - (currminutes % 5)
+ if minpadding == 5:
+ minpadding = 0
for i in range(288):
mod = (i * 5 + currminutes + minpadding) % 1440
showtime = strftime(config.TV_TIMEFORMAT, gmtime(float(mod * 60)))
@@ -293,33 +282,33 @@
if prop == 'channel':
self.prog.channel_id = val[1]
- self.disp_channel = val[0]
+ self.disp_channel = val[0]
if prop == 'startday':
self.start_day = val
- self.disp_starttime = '%s %s %s' % (self.disp_start_month,
self.start_day, self.start_time)
+ self.disp_starttime = '%s %s %s' % (self.disp_start_month,
self.start_day, self.start_time)
if prop == 'startmonth':
self.start_month = val[1]
- self.disp_start_month = val[0]
- self.disp_starttime = '%s %s %s' % (self.disp_start_month,
self.start_day, self.start_time)
+ self.disp_start_month = val[0]
+ self.disp_starttime = '%s %s %s' % (self.disp_start_month,
self.start_day, self.start_time)
if prop == 'starttime':
self.start_time = val
- self.disp_starttime = '%s %s %s' % (self.disp_start_month,
self.start_day, self.start_time)
+ self.disp_starttime = '%s %s %s' % (self.disp_start_month,
self.start_day, self.start_time)
if prop == 'stopday':
self.stop_day = val
- self.disp_stoptime = '%s %s %s' % (self.disp_stop_month,
self.stop_day, self.stop_time)
+ self.disp_stoptime = '%s %s %s' % (self.disp_stop_month,
self.stop_day, self.stop_time)
if prop == 'stopmonth':
self.stop_month = val[1]
- self.disp_stop_month = val[0]
- self.disp_stoptime = '%s %s %s' % (self.disp_stop_month,
self.stop_day, self.stop_time)
+ self.disp_stop_month = val[0]
+ self.disp_stoptime = '%s %s %s' % (self.disp_stop_month,
self.stop_day, self.stop_time)
if prop == 'stoptime':
self.stop_time = val
- self.disp_stoptime = '%s %s %s' % (self.disp_stop_month,
self.stop_day, self.stop_time)
+ self.disp_stoptime = '%s %s %s' % (self.disp_stop_month,
self.stop_day, self.stop_time)
if menuw:
menuw.back_one_menu(arg='reload')
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog