Author: duncan
Date: Tue Oct 24 15:24:14 2006
New Revision: 8466

Modified:
   branches/rel-1/freevo/freevo_config.py
   branches/rel-1/freevo/src/helpers/makelircrc.py
   branches/rel-1/freevo/src/plugins/command.py
   branches/rel-1/freevo/src/plugins/mediamenu.py

Log:
Merged changes from rel-1-6

Modified: branches/rel-1/freevo/freevo_config.py
==============================================================================
--- branches/rel-1/freevo/freevo_config.py      (original)
+++ branches/rel-1/freevo/freevo_config.py      Tue Oct 24 15:24:14 2006
@@ -712,7 +712,17 @@
 # Enable this for joystick support:
 # plugin.activate('joy')
 
-
+# ======================================================================
+# Headlines
+# ======================================================================
+#plugin.activate('headlines', level=45)
+HEADLINES_LOCATIONS = [
+    ('Freevo news releases', 
'http://sourceforge.net/export/rss2_projnews.php?group_id=46652'),
+    ('Freevo news releases (full)', 
'http://sourceforge.net/export/rss2_projnews.php?group_id=46652&rss_fulltext=1'),
+    ('Freevo file releases', 
'http://sourceforge.net/export/rss2_projfiles.php?group_id=46652'),
+    ('Freevo summary+stats', 
'http://sourceforge.net/export/rss2_projsummary.php?group_id=46652'),
+    ('Freevo donors', 
'http://sourceforge.net/export/rss2_projdonors.php?group_id=46652'),
+]
 
 # ======================================================================
 # Freevo directory settings:

Modified: branches/rel-1/freevo/src/helpers/makelircrc.py
==============================================================================
--- branches/rel-1/freevo/src/helpers/makelircrc.py     (original)
+++ branches/rel-1/freevo/src/helpers/makelircrc.py     Tue Oct 24 15:24:14 2006
@@ -83,19 +83,14 @@
 write_option = False
 use_pos = None
 
-for arg in sys.argv:
+for arg in sys.argv[1:]:
     if arg == '-w':
         write_option = True
-    elif arg.find('=') > 0:
-        alternatives[arg[:arg.find('=')]] = arg[arg.find('=')+1:]
-    else:
-        try:
-            use_pos = int(arg)
-        except ValueError:
-            sys.stderr.write("Unrecognized argument (%s)!\n" % arg)
 
-if os.path.exists('/etc/lircd.conf'): x = open('/etc/lircd.conf')
-elif os.path.exists('/etc/lirc/lircd.conf'): x = open ('/etc/lirc/lircd.conf')
+if os.path.exists('/etc/lircd.conf'): 
+    x = open('/etc/lircd.conf')
+elif os.path.exists('/etc/lirc/lircd.conf'): 
+    x = open ('/etc/lirc/lircd.conf')
 
 pos = 0
 for line in x.readlines():

Modified: branches/rel-1/freevo/src/plugins/command.py
==============================================================================
--- branches/rel-1/freevo/src/plugins/command.py        (original)
+++ branches/rel-1/freevo/src/plugins/command.py        Tue Oct 24 15:24:14 2006
@@ -197,13 +197,13 @@
     """
     def __init__(self, command=None, directory=None):
         Item.__init__(self, skin_type='commands')
-       self.display_type = 'commands'
-       self.stoposd = False
-       self.use_wm  = False
-       self.spawnwm = config.COMMAND_SPAWN_WM
-       self.killwm  = config.COMMAND_KILL_WM
+        self.display_type = 'commands'
+        self.stoposd = False
+        self.use_wm  = False
+        self.spawnwm = config.COMMAND_SPAWN_WM
+        self.killwm  = config.COMMAND_KILL_WM
         self.stdout  = True
-       if command and directory:
+        if command and directory:
             self.name = command
             self.cmd  = os.path.join(directory, command)
             self.image = util.getimage(self.cmd)
@@ -221,30 +221,30 @@
         start popup and execute command
         """
         if self.stoposd:
-           if self.use_wm:
-               os.system(self.spawnwm)
-       else:
+            if self.use_wm:
+                os.system(self.spawnwm)
+        else:
             popup_string=_("Running Command...")
             pop = PopupBox(text=popup_string)
             pop.show()
 
-       workapp = CommandChild(self.cmd, 'command', 1, self.stoposd)
-       while workapp.isAlive():
+        workapp = CommandChild(self.cmd, 'command', 1, self.stoposd)
+        while workapp.isAlive():
             # make sure all callbacks in rc are running
             rc.poll()
             # wait some time
-           time.sleep(0.5)
+            time.sleep(0.5)
 
         if self.stoposd:
-           if self.use_wm:
-               os.system(self.killwm)
-               time.sleep(0.5)
-       else:
+            if self.use_wm:
+                os.system(self.killwm)
+                time.sleep(0.5)
+        else:
             pop.destroy()
-       workapp.stop()
-       message = ''
-       if workapp.status:
-           message = _('Command Failed')
+        workapp.stop()
+        message = ''
+        if workapp.status:
+            message = _('Command Failed')
         else:
             message = _('Command Completed')
 
@@ -299,7 +299,7 @@
             if os.path.splitext(command)[1] in ('.jpg', '.png'):
                 continue
             if os.path.splitext(command)[1] in ('.fxd', '.xml'):
-               fxd_file=os.path.join(config.COMMANDS_DIR, command)
+                fxd_file=os.path.join(config.COMMANDS_DIR, command)
 
                 # create a basic fxd parser
                 parser = util.fxdparser.FXD(fxd_file)
@@ -312,7 +312,7 @@
                 
                 # start the parsing
                 parser.parse()
-           else:
+            else:
                 cmd_item = CommandItem(command, config.COMMANDS_DIR)
                 command_items.append(cmd_item)
 
@@ -355,7 +355,7 @@
         return [ ('COMMANDS_DIR', '/usr/local/bin', 'The directory to show 
commands from.'),
                  ('COMMAND_SPAWN_WM', '', 'command to start window manager.'),
                  ('COMMAND_KILL_WM', '', 'command to stop window manager.'),
-       ]
+        ]
 
 
 class fxdhandler(plugin.Plugin):

Modified: branches/rel-1/freevo/src/plugins/mediamenu.py
==============================================================================
--- branches/rel-1/freevo/src/plugins/mediamenu.py      (original)
+++ branches/rel-1/freevo/src/plugins/mediamenu.py      Tue Oct 24 15:24:14 2006
@@ -184,8 +184,14 @@
                                 filename = filename[1:]
                             filename = vfs.join(config.SHARE_DIR, filename)
                         # normal file
+                        # webradio is both a playlist and an fxditem
+                        dups = []
                         for p in plugin.mimetype(self.display_type):
                             items = p.get(self, [ String(filename) ])
+                            if filename in dups:
+                                continue
+                            else:
+                                dups.append(filename)
                             if title:
                                 for i in items:
                                     i.name = title

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to