Hi,

I just made two fixes to the recordserver I want you to prove read
before I check it in. I don't know the code very well. 

1. I have a favorite at 8:55 p.m. every day. It's a small thing. When
   I want to record something important from 8 p.m. to let's say 10
   p.m., I need to remove the favorite. But I can't, every time I run
   the tv_grab helper (crontab), it gets re-inserted. That bug can't
   be fixed in 1.5.1, it would break too much. But I had a better
   idea: right now we check: if something is running, kill it, start
   new recording. Now I guess: if something is running and something
   new comes up, check favorite. If the new one is a favorite and the
   running is not, the running wins because the user added it, not a
   script. The favorite will not kill the running, it will be
   ignored. Comments on that please.

2. The second is a very bad bug: I can't have a favorite at every
   Sunday (or every other day != ANY), it will not be updated. I use
   Freevo, not the webserver to set the favorite. After some digging I
   found the problem: When comparing prog with favorite, the day looks
   equal on debug, but one time it's an int, the other is a
   string. int(5) != str(5). You can't imagine how cranky co-workers
   can when they can't record 'Bernd das Brot' :)


Please verify my bug patch. Since 2 it's a bad problem and 1 makes me
crasy, I guess we should schedule a 1.5.2 release.


Dischi

*** recordserver.py.cvs	Fri Sep 17 21:51:47 2004
--- recordserver.py	Fri Sep 17 21:50:43 2004
***************
*** 421,426 ****
--- 421,433 ----
                      # Hey, something is already recording!
                      if prog.start - 10 <= now:
                          # our new recording should start no later than now!
+                         # check if the new prog is a favorite and the current running is
+                         # not. If so, the user manually added something, we guess it
+                         # has a higher priority.
+                         if self.isProgAFavorite(prog)[0] and \
+                            not self.isProgAFavorite(currently_recording)[0]:
+                             _debug_('ignore %s' % String(prog))
+                             continue
                          sr.removeProgram(currently_recording, 
                                           tv_util.getKey(currently_recording))
                          plugin.getbyname('RECORD').Stop()
***************
*** 608,615 ****
              if prog.title == fav.title:    
                  if fav.channel == tv_util.get_chan_displayname(prog.channel_id) \
                     or fav.channel == 'ANY':
!                     if fav.dow == dow or fav.dow == 'ANY':
!                         if fav.mod == min_of_day or fav.mod == 'ANY':
                              return (TRUE, fav.name)
                          elif abs(int(fav.mod) - int(min_of_day)) <= 8:
                              return (TRUE, fav.name)
--- 615,623 ----
              if prog.title == fav.title:    
                  if fav.channel == tv_util.get_chan_displayname(prog.channel_id) \
                     or fav.channel == 'ANY':
!                     if Unicode(fav.dow) == Unicode(dow) or Unicode(fav.dow) == u'ANY':
!                         if Unicode(fav.mod) == Unicode(min_of_day) or \
!                                Unicode(fav.mod) == u'ANY':
                              return (TRUE, fav.name)
                          elif abs(int(fav.mod) - int(min_of_day)) <= 8:
                              return (TRUE, fav.name)
 
-- 
I think there's a world market for about five computers.
                -- attr. Thomas J. Watson (Chairman of the Board, IBM), 1943

Attachment: pgp5WstHD0pFJ.pgp
Description: PGP signature

Reply via email to