Author: duncan
Date: Mon Dec 11 14:07:53 2006
New Revision: 8718

Modified:
   branches/rel-1/freevo/src/encodingcore.py
   branches/rel-1/freevo/src/plugins/upsoon.py
   branches/rel-1/freevo/src/video/plugins/dvdbackup.py
   branches/rel-1/freevo/src/video/plugins/mplayer.py
   branches/rel-1/freevo/src/video/plugins/reencode.py

Log:
Corrected debug messages and levels


Modified: branches/rel-1/freevo/src/encodingcore.py
==============================================================================
--- branches/rel-1/freevo/src/encodingcore.py   (original)
+++ branches/rel-1/freevo/src/encodingcore.py   Mon Dec 11 14:07:53 2006
@@ -247,8 +247,9 @@
             data = mmpython.parse(self.source)
             _debug_('source=\"%s\"' % (self.source))
             self.sourcetype = data['type'].encode('latin1')
-            for f in dir(data):
-                print '%s: %s' % (f, eval('data["%s"]' % f))
+            if config.DEBUG >= 2:
+                for f in dir(data):
+                    _debug_('%s: %s' % (f, eval('data["%s"]' % f)), 2)
             try:
                 self.length = data.get_length()
             except:

Modified: branches/rel-1/freevo/src/plugins/upsoon.py
==============================================================================
--- branches/rel-1/freevo/src/plugins/upsoon.py (original)
+++ branches/rel-1/freevo/src/plugins/upsoon.py Mon Dec 11 14:07:53 2006
@@ -183,7 +183,7 @@
         _debug_('poll(self)', 2)
 
         self.next_program  = self.findNextProgram()
-        _debug_('now=%s next=%s ' % (time.strftime('%T', time.localtime(now)), 
self.next_program))
+        _debug_('now=%s next=%s ' % (time.strftime('%T', time.localtime(now)), 
self.next_program), 2)
         if self.next_program == None:
             return None
 

Modified: branches/rel-1/freevo/src/video/plugins/dvdbackup.py
==============================================================================
--- branches/rel-1/freevo/src/video/plugins/dvdbackup.py        (original)
+++ branches/rel-1/freevo/src/video/plugins/dvdbackup.py        Mon Dec 11 
14:07:53 2006
@@ -49,12 +49,16 @@
     def actions(self, item):
         if DEBUG >= 1:
             #testing stuff
-            print 'item.type=\"%s\"' % (item.type)
-            print 'item.mode=\"%s\"' % (item.mode)
+            if hasattr(item, 'type'):
+                print 'item.type=\"%s\"' % (item.type)
+            if hasattr(item, 'mode'):
+                print 'item.mode=\"%s\"' % (item.mode)
             if hasattr(item, 'info_type'):
                 print 'item.info_type=\"%s\"' % (item.info_type)
-            print 'item.name=\"%s\"' % (item.name)
-            print 'item.filename=\"%s\"' % (item.filename)
+            if hasattr(item, 'name'):
+                print 'item.name=\"%s\"' % (item.name)
+            if hasattr(item, 'filename'):
+                print 'item.filename=\"%s\"' % (item.filename)
             if hasattr(item, 'parentname'):
                 print 'item.parentname=\"%s\"' % (item.parentname)
             if hasattr(item, 'media') and hasattr(item.media, 'devicename'):

Modified: branches/rel-1/freevo/src/video/plugins/mplayer.py
==============================================================================
--- branches/rel-1/freevo/src/video/plugins/mplayer.py  (original)
+++ branches/rel-1/freevo/src/video/plugins/mplayer.py  Mon Dec 11 14:07:53 2006
@@ -90,10 +90,11 @@
         if item.mode in ('dvd', 'vcd'):
             return 2
         if item.mimetype in config.VIDEO_MPLAYER_SUFFIX:
-            for d in dir(item):
-                print '%s: %s' % (d, eval('item.%s' % d))
-            for d in dir(item.info):
-                print '%s: %s' % (d, eval('item.info.%s' % d))
+            if config.DEBUG >= 2:
+                for d in dir(item):
+                    print '%s: %s' % (d, eval('item.%s' % d))
+                for d in dir(item.info):
+                    print '%s: %s' % (d, eval('item.info.%s' % d))
             return 2
         if item.network_play:
             return 1

Modified: branches/rel-1/freevo/src/video/plugins/reencode.py
==============================================================================
--- branches/rel-1/freevo/src/video/plugins/reencode.py (original)
+++ branches/rel-1/freevo/src/video/plugins/reencode.py Mon Dec 11 14:07:53 2006
@@ -65,7 +65,7 @@
             print 'type:', item.type
             if hasattr(item, 'mode'): print 'mode:', item.mode
             if hasattr(item, 'name'): print 'name:', type(item.name)
-            if hasattr(item, 'name'): print 'name:', item.name.encode('utf-8')
+            if hasattr(item, 'name'): print 'name-utf8:', 
item.name.encode('utf-8')
             if hasattr(item, 'filename'): print 'filename:', item.filename
             if hasattr(item, 'parentname'):
                 print item.parentname

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