Update of /cvsroot/freevo/freevo/src/tv
In directory sc8-pr-cvs1:/tmp/cvs-serv5532

Modified Files:
        epg_xmltv.py 
Log Message:
Added (disabled) support for a simple favourites list. Basically, create
a file called "watchlist" and put it somewhere, edit this thing and
specify the location of the file and comment in the find_favorites()
function in __main__

All it does is go through the guide, post-pickle and dump out the schedules
for the show in freevo_record.lst format.

There is no duplicate filtering, or other neat-o intelligence, but it should
lay the groundwork for something more in the future. 



Index: epg_xmltv.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/tv/epg_xmltv.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** epg_xmltv.py        27 Feb 2003 02:03:03 -0000      1.10
--- epg_xmltv.py        14 Mar 2003 06:38:40 -0000      1.11
***************
*** 10,13 ****
--- 10,25 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.11  2003/03/14 06:38:40  outlyer
+ # Added (disabled) support for a simple favourites list. Basically, create
+ # a file called "watchlist" and put it somewhere, edit this thing and
+ # specify the location of the file and comment in the find_favorites()
+ # function in __main__
+ #
+ # All it does is go through the guide, post-pickle and dump out the schedules
+ # for the show in freevo_record.lst format.
+ #
+ # There is no duplicate filtering, or other neat-o intelligence, but it should
+ # lay the groundwork for something more in the future.
+ #
  # Revision 1.10  2003/02/27 02:03:03  outlyer
  # Added support for the xmltv 'sub-title' tag which sometimes contains the
***************
*** 107,110 ****
--- 119,123 ----
  import epg_types
  
+ 
  # Set to 1 for debug output
  DEBUG = config.DEBUG
***************
*** 333,336 ****
--- 346,367 ----
  
  
+ def find_favorites():
+ 
+     import string
+     import tvgrep
+     import re
+ 
+     SEASONPASS='/var/cache/freevo/recording/watchlist'
+     if os.path.isfile(SEASONPASS):
+         m = open(SEASONPASS,'r')
+         for show in m.readlines():
+             show = string.replace(show.strip(),' ','\ ')
+             ARG = '.*' + show + '*.'
+             REGEXP = re.compile(ARG,re.IGNORECASE)
+             for a in guide.GetPrograms():
+                 for b in a.programs:
+                     if REGEXP.match(b.title):
+                         print tvgrep.make_schedule(b)
+ 
  if __name__ == '__main__':
      # Remove a pickled file (if any) if we're trying to list all channels
***************
*** 344,347 ****
--- 375,381 ----
      guide = get_guide()
  
+     #print "Finding favourites"
+     #find_favorites()
+         
      # No args means just pickle the guide, for use with cron-jobs
      # after getting a new guide.




-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open! 
Get cracking and register here for some mind boggling fun and 
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to