Author: duncan
Date: Sun Mar  4 21:21:38 2007
New Revision: 9303

Modified:
   branches/rel-1/freevo/Docs/CREDITS
   branches/rel-1/freevo/src/tv/plugins/recordings_manager.py
   branches/rel-1/freevo/src/tv/plugins/view_recordings.py

Log:
Added _gettagline function to recordings_manager
Updated CREDITS and header blocks


Modified: branches/rel-1/freevo/Docs/CREDITS
==============================================================================
--- branches/rel-1/freevo/Docs/CREDITS  (original)
+++ branches/rel-1/freevo/Docs/CREDITS  Sun Mar  4 21:21:38 2007
@@ -49,6 +49,12 @@
 o Mplayer for Audio support
 o Ogg Vorbis Tag and Playback support
 
+TC Wan <[EMAIL PROTECTED]>
+o FC rpm Maintainer
+
+Evan Hisey <[EMAIL PROTECTED]>
+o Slackware Maintainer
+
 John Molohan <[EMAIL PROTECTED]>
 o Web Site Maintainer
 
@@ -69,6 +75,7 @@
 Adam Charrett <[EMAIL PROTECTED]>
 o Buttonbar plug-in
 o Screensaver plug-in
+o TV Recording Manager plug-in
 
 Andrew Flegg <[EMAIL PROTECTED]>
 o Skin additions, anamorphic and past programmes

Modified: branches/rel-1/freevo/src/tv/plugins/recordings_manager.py
==============================================================================
--- branches/rel-1/freevo/src/tv/plugins/recordings_manager.py  (original)
+++ branches/rel-1/freevo/src/tv/plugins/recordings_manager.py  Sun Mar  4 
21:21:38 2007
@@ -8,9 +8,6 @@
 # Todo:        
 #
 # -----------------------------------------------------------------------
-# $Log$
-#
-# -----------------------------------------------------------------------
 # Freevo - A Home Theater PC framework
 # Copyright (C) 2002 Krister Lagerstrom, et al. 
 # Please see the file freevo/Docs/CREDITS for a complete list of authors.
@@ -29,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 os
@@ -386,6 +383,7 @@
 # ======================================================================
 # Series Menu Class
 # ======================================================================
+
 class Series(Item):
     """
     Class representing a set of programs with the same name, but (probably) 
@@ -400,7 +398,8 @@
         self.programs = programs
         self.items = []
         for program in self.programs:
-            self.items.append(RecordedProgramItem(program['tagline'], program))
+            tagline = self._gettagline(program)
+            self.items.append(RecordedProgramItem(tagline, program))
         # TODO: Replace with smart sort that knows about 'n/m <subtitle>' 
style names
         self.items.sort(lambda l, o: cmp(l.sort().upper(), o.sort().upper()))
         self.set_icon()
@@ -497,6 +496,24 @@
             self.icon = config.ICON_DIR + '/status/series_unwatched.png'
 
 
+    def _gettagline(self, program):
+        episode_name = program['tagline']
+        if not episode_name:
+            episode_name = program['subtitle']
+            program['tagline'] = episode_name
+            if not episode_name:
+                try:
+                    pat = re.compile(config.TVRM_EPISODE_FROM_PLOT)
+                    episode_name = pat.match(program['plot']).group(1)
+                    program['tagline'] = episode_name.strip()
+                except Exception, e:
+                    print program['name'], e
+                if not episode_name:
+                    episode_name = _('(Unnamed)')
+                    program['tagline'] = episode_name
+        return program['tagline']
+
+
     def __getitem__(self, key):
         """
         Returns the number of episodes when
@@ -506,21 +523,7 @@
         if key == 'content':
             content = ''
             for i in range(0, len(self.programs)):
-                episode_name = self.programs[i]['tagline']
-                if not episode_name:
-                    episode_name = self.programs[i]['subtitle']
-                    self.programs[i]['tagline'] = episode_name
-                    if not episode_name:
-                        try:
-                            pat = re.compile(config.TVRM_EPISODE_FROM_PLOT)
-                            episode_name = 
pat.match(self.programs[i]['plot']).group(1)
-                            self.programs[i]['tagline'] = episode_name.strip()
-                        except Exception, e:
-                            print self.programs[i]['name'], e
-                        if not episode_name:
-                            episode_name = _('(Unnamed)')
-                            self.programs[i]['tagline'] = episode_name
-                content += episode_name
+                content += self._gettagline(self.programs[i])
                 if i < (len(self.programs) - 1):
                     content += ', '
             return content

Modified: branches/rel-1/freevo/src/tv/plugins/view_recordings.py
==============================================================================
--- branches/rel-1/freevo/src/tv/plugins/view_recordings.py     (original)
+++ branches/rel-1/freevo/src/tv/plugins/view_recordings.py     Sun Mar  4 
21:21:38 2007
@@ -8,9 +8,6 @@
 # Todo:        
 #
 # -----------------------------------------------------------------------
-# $Log$
-#
-# -----------------------------------------------------------------------
 # Freevo - A Home Theater PC framework
 # Copyright (C) 2002 Krister Lagerstrom, et al. 
 # Please see the file freevo/Docs/CREDITS for a complete list of authors.
@@ -29,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 config
 import plugin

-------------------------------------------------------------------------
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

Reply via email to