Fixed bug where destination was being ignored. The destination attrinute needed...
[recordtv.git] / src / rtv_favourite.py
blob7fa5c65bda41e962e0e1d5acdf5c616fa0dfbbbe
1 #!/usr/bin/python
3 import re
4 import rtv_propertiesfile, rtv_programmeinfo
6 class Favourite(rtv_propertiesfile.PropertiesFile):
8 def __init__( self ):
9 self.title_re = None
10 self.channel = None
11 self.deleteAfterDays = None
12 self.priority = None
13 self.record = "yes"
14 self.destination = None
16 self._title_re = None
19 def matches( self, pi ):
21 if self.title_re == None:
22 return False # This favourite is empty
23 else:
24 if self._title_re == None:
25 self._title_re = re.compile( self.title_re + "$" )
27 return ( self._title_re.match( pi.title ) and
28 ( self.channel == None or self.channel == pi.channel ) )
29 # TODO: other things to match on e.g. time, categories