Author: duncan
Date: Sat Mar 22 07:23:38 2008
New Revision: 10558

Log:
Changed level 1 debug messages to level 2


Modified:
   branches/rel-1-7/freevo/src/childapp.py
   branches/rel-1-7/freevo/src/helpers/commdetectserver.py
   branches/rel-1-7/freevo/src/helpers/recordserver.py
   branches/rel-1-7/freevo/src/osd.py
   branches/rel-1-7/freevo/src/playlist.py
   branches/rel-1-7/freevo/src/tv/plugins/vbi2srt_record.py
   branches/rel-1-7/freevo/src/tv/v4l2.py
   branches/rel-1-7/freevo/src/video/__init__.py
   branches/rel-1-7/freevo/src/video/fxdhandler.py
   branches/rel-1-7/freevo/src/video/plugins/reencode.py
   branches/rel-1-7/freevo/src/video/videoitem.py
   branches/rel-1-7/freevo/src/www/htdocs/encoding_web.rpy
   branches/rel-1-7/freevo/src/www/htdocs/pluginconfig.rpy
   branches/rel-1-7/freevo/src/www/htdocs/youtube.rpy

Modified: branches/rel-1-7/freevo/src/childapp.py
==============================================================================
--- branches/rel-1-7/freevo/src/childapp.py     (original)
+++ branches/rel-1-7/freevo/src/childapp.py     Sat Mar 22 07:23:38 2008
@@ -55,7 +55,7 @@
         """
         Initialise ChildApp
         """
-        _debug_('ChildApp.__init__(app=%r, debugname=%r, doeslogging=%r)' % 
(app, debugname, doeslogging), 1)
+        _debug_('ChildApp.__init__(app=%r, debugname=%r, doeslogging=%r)' % 
(app, debugname, doeslogging), 2)
         # Use a non reentrant lock, stops kill being called twice
         self.lock = threading.Lock()
         self.status = None
@@ -172,7 +172,7 @@
 
     # Write a string to the app.
     def write(self, line):
-        _debug_('ChildApp.write(line=%r) to pid %s' % (line.strip('\n'), 
self.child.pid), 1)
+        _debug_('ChildApp.write(line=%r) to pid %s' % (line.strip('\n'), 
self.child.pid), 2)
         #self.shild.communicate(line)
         self.child.stdin.write(line)
         self.child.stdin.flush()
@@ -209,7 +209,7 @@
         """
         Kill the application
         """
-        _debug_('ChildApp.kill(signal=%r)' % (signal), 1)
+        _debug_('ChildApp.kill(signal=%r)' % (signal), 2)
         # killed already
         if not hasattr(self, 'child'):
             _debug_('This should never happen!', DERROR)
@@ -332,7 +332,7 @@
         """
         event to send on stop
         """
-        _debug_('ChildApp2.stop_event()', 1)
+        _debug_('ChildApp2.stop_event()', 2)
         return PLAY_END
 
 
@@ -340,7 +340,7 @@
         """
         stop the child
         """
-        _debug_('ChildApp2.stop(cmd=%r)' % (cmd), 1)
+        _debug_('ChildApp2.stop(cmd=%r)' % (cmd), 2)
         rc.unregister(self.poll)
         rc.unregister(self.stop)
 
@@ -404,7 +404,7 @@
 
 
     def run(self):
-        _debug_('Read_Thread.run()', 1)
+        _debug_('Read_Thread.run()', 2)
         try:
             self._handle_input()
         except (IOError, ValueError):
@@ -412,7 +412,7 @@
 
 
     def _handle_input(self):
-        _debug_('Read_Thread._handle_input()', 1)
+        _debug_('Read_Thread._handle_input()', 2)
         saved = ''
         while 1:
             data = self.fh.readline(300)

Modified: branches/rel-1-7/freevo/src/helpers/commdetectserver.py
==============================================================================
--- branches/rel-1-7/freevo/src/helpers/commdetectserver.py     (original)
+++ branches/rel-1-7/freevo/src/helpers/commdetectserver.py     Sat Mar 22 
07:23:38 2008
@@ -63,7 +63,7 @@
 
     def __init__(self, debug=False, allowNone=False):
         """ Initialise the Commercial Detection Server class """
-        _debug_('CommDetectServer.__init__(debug=%r, allowNone=%r)' % (debug, 
allowNone), 1)
+        _debug_('CommDetectServer.__init__(debug=%r, allowNone=%r)' % (debug, 
allowNone), 2)
         try:
             xmlrpc.XMLRPC.__init__(self, allowNone)
         except TypeError:

Modified: branches/rel-1-7/freevo/src/helpers/recordserver.py
==============================================================================
--- branches/rel-1-7/freevo/src/helpers/recordserver.py (original)
+++ branches/rel-1-7/freevo/src/helpers/recordserver.py Sat Mar 22 07:23:38 2008
@@ -119,7 +119,7 @@
 
     def __init__(self, debug=False, allowNone=False):
         """ Initialise the Record Server class """
-        _debug_('RecordServer.__init__(debug=%r, allowNone=%r)' % (debug, 
allowNone), 1)
+        _debug_('RecordServer.__init__(debug=%r, allowNone=%r)' % (debug, 
allowNone), 2)
         try:
             xmlrpc.XMLRPC.__init__(self, allowNone)
         except TypeError:
@@ -186,7 +186,7 @@
             _debug_('%s is recording %s stopping at %s' % (prog.title, 
recording and 'yes' or 'no', endtime), 2)
 
             if now > prog.stop + config.TV_RECORD_PADDING_POST:
-                _debug_('%s: finished %s > %s' % (prog.title, 
time.strftime('%H:%M:%S', timenow), endtime), 1)
+                _debug_('%s: finished %s > %s' % (prog.title, 
time.strftime('%H:%M:%S', timenow), endtime), 2)
                 continue
 
             if not recording:
@@ -649,7 +649,7 @@
         for chan in guide.chan_list:
             if prog.channel_id == chan.id:
                 prog.tunerid = chan.tunerid
-                _debug_('%s %r' % (prog, prog.tunerid), 1)
+                _debug_('%s %r' % (prog, prog.tunerid), 2)
         return prog
 
 

Modified: branches/rel-1-7/freevo/src/osd.py
==============================================================================
--- branches/rel-1-7/freevo/src/osd.py  (original)
+++ branches/rel-1-7/freevo/src/osd.py  Sat Mar 22 07:23:38 2008
@@ -190,7 +190,7 @@
             filename = config.OSD_FORCE_FONTNAME
             ptsize *= hasattr(config, 'OSD_FORCE_FONTSIZE') and 
config.OSD_FORCE_FONTSIZE or 1.5
 
-        _debug_('Loading font "%s"' % filename, 2)
+        _debug_('Loading font %r' % filename)
 
         font   = self.__loadfont__(filename, ptsize)
         if not font:
@@ -208,13 +208,13 @@
                 #     break
 
         if not font:
-            _debug_('Couldnt load font "%s"' % os.path.basename(filename))
+            _debug_('Couldn\'t load font %r' % os.path.basename(filename), 
DINFO)
 
             # Ok, see if there is an alternate font to use
             if fontname.lower() in config.OSD_FONT_ALIASES:
                 alt_fname = os.path.join(config.FONT_DIR,
                                          
config.OSD_FONT_ALIASES[fontname.lower()])
-                _debug_('trying alternate: %s' % 
os.path.basename(alt_fname).lower())
+                _debug_('trying alternate: %r' % os.path.basename(alt_fname), 
DINFO)
                 font = self.__loadfont__(alt_fname, ptsize)
 
         if not font:
@@ -227,7 +227,7 @@
             font = self.__loadfont__(config.OSD_DEFAULT_FONTNAME, ptsize)
 
         if not font:
-            _debug_('Couldn\'t load font "%s"' % config.OSD_DEFAULT_FONTNAME, 
config.INFO)
+            _debug_('Couldn\'t load font %r' % config.OSD_DEFAULT_FONTNAME, 
config.INFO)
             raise
 
         return font
@@ -280,16 +280,16 @@
                         x = osd.width  - config.OSD_OVERSCAN_RIGHT - 20 - width
                         y = osd.height - config.OSD_OVERSCAN_BOTTOM - 20 - 
height
 
-                        self.rect = (x,y,width,height)
+                        self.rect = (x, y, width, height)
                         # backup the screen
-                        screen = pygame.Surface((width,height))
-                        screen.blit(osd.screen, (0,0), self.rect)
+                        screen = pygame.Surface((width, height))
+                        screen.blit(osd.screen, (0, 0), self.rect)
                         # draw the icon
                         osd.drawbitmap(image, x, y)
                         osd.update(rect=self.rect, stop_busyicon=False)
 
                         # restore the screen
-                        osd.screen.blit(screen, (x,y))
+                        osd.screen.blit(screen, (x, y))
                 finally:
                     self.lock.release()
 
@@ -345,7 +345,7 @@
         # disable term blanking for mga and fbcon and restore the
         # tty so that sdl can use it
         if config.CONF.display in ('mga', 'fbcon'):
-            for i in range(0,7):
+            for i in range(0, 7):
                 try:
                     fd = os.open('/dev/tty%s' % i, os.O_RDONLY | os.O_NONBLOCK)
                     try:
@@ -356,7 +356,7 @@
                     os.close(fd)
                     os.system('%s -term linux -cursor off -blank 0 -clear 
-powerdown 0 ' \
                               '-powersave off </dev/tty%s > /dev/tty%s 
2>/dev/null' % \
-                              (config.CONF.setterm, i,i))
+                              (config.CONF.setterm, i, i))
                 except:
                     pass
 
@@ -373,7 +373,7 @@
             self.depth = 32
 
         if config.CONF.x or config.CONF.y:
-            os.putenv('SDL_VIDEO_WINDOW_POS', '%d,%d' % (config.CONF.x, 
config.CONF.y))
+            os.putenv('SDL_VIDEO_WINDOW_POS', '%d, %d' % (config.CONF.x, 
config.CONF.y))
 
         try:
             self.screen = pygame.display.set_mode((self.width, self.height),
@@ -407,7 +407,7 @@
             os.system(config.OSD_SDL_EXEC_AFTER_STARTUP)
 
         self.sdl_driver = pygame.display.get_driver()
-        _debug_('SDL Driver: %s' % (str(self.sdl_driver)),2)
+        _debug_('SDL Driver: %s' % (str(self.sdl_driver)), 2)
 
         pygame.mouse.set_visible(0)
         pygame.key.set_repeat(500, 30)
@@ -449,8 +449,8 @@
         for _time in range(_times):
             self.app_list.remove(app)
         if _times and hasattr(self.focused_app(), 'event_context'):
-            _debug_('app is %s' % self.focused_app(),2)
-            _debug_('osd: Setting context to %s' % 
self.focused_app().get_event_context(),2)
+            _debug_('app is %s' % self.focused_app(), 2)
+            _debug_('osd: Setting context to %s' % 
self.focused_app().get_event_context(), 2)
             rc.set_context(self.focused_app().get_event_context())
 
 
@@ -540,7 +540,7 @@
 
             # backup the screen
             self.__stop_screen__ = pygame.Surface((self.width, self.height))
-            self.__stop_screen__.blit(self.screen, (0,0))
+            self.__stop_screen__.blit(self.screen, (0, 0))
             pygame.display.quit()
         finally:
             self.mutex.release()
@@ -561,7 +561,7 @@
             self.screen = pygame.display.set_mode((self.width, self.height), 
self.hw,
                                                   self.depth)
             if hasattr(self, '__stop_screen__'):
-                self.screen.blit(self.__stop_screen__, (0,0))
+                self.screen.blit(self.__stop_screen__, (0, 0))
                 del self.__stop_screen__
 
             # We need to go back to fullscreen mode if that was the mode 
before the shutdown
@@ -793,11 +793,11 @@
                 width = 1
 
             if width == -1 or fill:
-                r,g,b,a = self._sdlcol(color)
+                r, g, b, a = self._sdlcol(color)
                 w = x1 - x0
                 h = y1 - y0
                 box = pygame.Surface((int(w), int(h)))
-                box.fill((r,g,b))
+                box.fill((r, g, b))
                 box.set_alpha(a)
                 if layer:
                     layer.blit(box, (x0, y0))
@@ -967,12 +967,12 @@
             w, h       = surface.get_size()
             alpha      = pygame.surfarray.pixels_alpha(surface)
 
-            # transform all the alpha values in x,y range
+            # transform all the alpha values in x, y range
             # any speedup could help alot
             for x in range(max(w-pixels, 1), w):
                 for y in range(1, h):
-                    if alpha[x,y][0] != 0:
-                        alpha[x,y] = int(alpha[x,y][0]*opaque_mod)
+                    if alpha[x, y][0] != 0:
+                        alpha[x, y] = int(alpha[x, y][0]*opaque_mod)
                 opaque_mod -= opaque_stp
         except Exception, e:
             _debug_('__draw_transparent_text__: %s' % e, DERROR)
@@ -1005,10 +1005,10 @@
             or 'soft' (based on words)
         """
         if not pygame.display.get_init():
-            return '', (x,y,x,y)
+            return '', (x, y, x, y)
 
         if not string:
-            return '', (x,y,x,y)
+            return '', (x, y, x, y)
 
         shadow_x      = 0
         shadow_y      = 0
@@ -1055,7 +1055,7 @@
             line_height = int(line_height) + 1
 
         if width <= 0 or height < font.height:
-            return string, (x,y,x,y)
+            return string, (x, y, x, y)
 
         num_lines_left   = int((height+line_height-font.height) / line_height)
         lines            = []
@@ -1171,7 +1171,7 @@
                                     if ox or oy:
                                         tmp.blit(re, (ox, oy))
                             tmp.blit(render, (border_radius, border_radius))
-                            self.__draw_transparent_text__(tmp,dim_size)
+                            self.__draw_transparent_text__(tmp, dim_size)
                             layer.blit(tmp, (x0-border_radius, 
y0-border_radius))
 
                         else:
@@ -1270,7 +1270,7 @@
         for drawcircle
         """
         try:
-            return (x, y, s.get_at((x,y)))
+            return (x, y, s.get_at((x, y)))
         except:
             return None
 
@@ -1279,7 +1279,7 @@
         restore the saved pixel
         """
         if save:
-            s.set_at((save[0],save[1]), save[2])
+            s.set_at((save[0], save[1]), save[2])
 
 
     def drawcircle(self, s, color, x, y, radius):
@@ -1346,11 +1346,11 @@
                 box = pygame.Surface((w, h), SRCALPHA)
 
                 # clear surface
-                box.fill((0,0,0,0))
+                box.fill((0, 0, 0, 0))
             else:
                 box = layer
 
-            r,g,b,a = self._sdlcol(color)
+            r, g, b, a = self._sdlcol(color)
 
             if border_size:
                 if radius >= 1:
@@ -1402,7 +1402,7 @@
                 try:
                     pygame.display.update(rect)
                 except:
-                    _debug_('osd.update(rect) failed, bad rect? - %s' % 
str(rect), 1)
+                    _debug_('osd.update(rect) failed, bad rect? - %s' % 
str(rect), 2)
                     _debug_('updating whole screen')
                     pygame.display.flip()
             else:
@@ -1455,7 +1455,7 @@
     # Convert a 32-bit TRGB color to a 4 element tuple for SDL
     def _sdlcol(self, col):
         if col==None:
-            return (0,0,0,255)
+            return (0, 0, 0, 255)
         a = 255 - ((col >> 24) & 0xff)
         r = (col >> 16) & 0xff
         g = (col >> 8) & 0xff

Modified: branches/rel-1-7/freevo/src/playlist.py
==============================================================================
--- branches/rel-1-7/freevo/src/playlist.py     (original)
+++ branches/rel-1-7/freevo/src/playlist.py     Sat Mar 22 07:23:38 2008
@@ -502,7 +502,7 @@
                     try:
                         self.current_item.stop()
                     except OSError:
-                        _debug_('ignore playlist event', 1)
+                        _debug_('ignore playlist event', 2)
                         return True
                 pos = (pos-1) % len(self.playlist)
                 self.current_item = self.playlist[pos]

Modified: branches/rel-1-7/freevo/src/tv/plugins/vbi2srt_record.py
==============================================================================
--- branches/rel-1-7/freevo/src/tv/plugins/vbi2srt_record.py    (original)
+++ branches/rel-1-7/freevo/src/tv/plugins/vbi2srt_record.py    Sat Mar 22 
07:23:38 2008
@@ -95,7 +95,7 @@
     """
 
     def __init__(self):
-        _debug_('PluginInterface.__init__()', 1)
+        _debug_('PluginInterface.__init__()', 2)
         plugin.Plugin.__init__(self)
         plugin.register(Recorder(), plugin.RECORD)
 
@@ -107,7 +107,7 @@
     """
     """
     def __init__(self):
-        _debug_('Recorder.__init__()', 1)
+        _debug_('Recorder.__init__()', 2)
         # Disable this plugin if not loaded by record_server.
         if string.find(sys.argv[0], 'recordserver') == -1:
             return
@@ -124,7 +124,7 @@
 
 
     def Record(self, rec_prog):
-        _debug_('Record(rec_prog=%r)' % (rec_prog,), 1)
+        _debug_('Record(rec_prog=%r)' % (rec_prog,), 2)
         frequency = self.fc.chanSet(str(rec_prog.tunerid), False, 'record 
plugin')
 
         rec_prog.filename = tv_util.getProgFilename(rec_prog)
@@ -175,7 +175,7 @@
 
 
     def Stop(self):
-        _debug_('Stop()', 1)
+        _debug_('Stop()', 2)
         self.thread.mode = 'stop'
         self.thread.mode_flag.set()
 
@@ -185,11 +185,11 @@
     Class to 
     """
     def __init__(self, app):
-        _debug_('RecordApp.__init__(app=%r)' % (app), 1)
+        _debug_('RecordApp.__init__(app=%r)' % (app), 2)
         childapp.ChildApp.__init__(self, app, doeslogging=1)
 
     def kill(self):
-        _debug_('kill()', 1)
+        _debug_('kill()', 2)
         childapp.ChildApp.kill(self, signal.SIGINT)
 
 
@@ -198,7 +198,7 @@
     Class to
     """
     def __init__(self):
-        _debug_('Record_Thread.__init__()', 1)
+        _debug_('Record_Thread.__init__()', 2)
         threading.Thread.__init__(self)
 
         self.mode = 'idle'
@@ -209,7 +209,7 @@
         self.app = None
 
     def run(self):
-        _debug_('Record_Thread.run()', 1)
+        _debug_('Record_Thread.run()', 2)
         while 1:
             _debug_('mode=%s' % self.mode)
             if self.mode == 'idle':

Modified: branches/rel-1-7/freevo/src/tv/v4l2.py
==============================================================================
--- branches/rel-1-7/freevo/src/tv/v4l2.py      (original)
+++ branches/rel-1-7/freevo/src/tv/v4l2.py      Sat Mar 22 07:23:38 2008
@@ -248,7 +248,7 @@
 
 class Videodev:
     def __init__(self, device):
-        _debug_('Videodev.__init__(device=%r)' % (device,), 1)
+        _debug_('Videodev.__init__(device=%r)' % (device,), 2)
         self.chanlist = None
         self.device = os.open(device, os.O_TRUNC)
         if self.device < 0:
@@ -271,32 +271,32 @@
 
 
     def getdriver(self):
-        _debug_('getdriver()', 1)
+        _debug_('getdriver()', 2)
         return self.driver.strip('\0')
 
 
     def getversion(self):
-        _debug_('getversion()', 1)
+        _debug_('getversion()', 2)
         return self.version
 
 
     def getdevice(self):
-        _debug_('getdevice()', 1)
+        _debug_('getdevice()', 2)
         return self.device
 
 
     def close(self):
-        _debug_('close()', 1)
+        _debug_('close()', 2)
         os.close(self.device)
 
 
     def setchanlist(self, chanlist):
-        _debug_('setchanlist(chanlist=%r)' % (chanlist,), 1)
+        _debug_('setchanlist(chanlist=%r)' % (chanlist,), 2)
         self.chanlist = freq.CHANLIST[chanlist]
 
 
     def querycap(self):
-        _debug_('querycap()', 1)
+        _debug_('querycap()', 2)
         val = struct.pack(QUERYCAP_ST, "", "", "", 0, 0)
         r = fcntl.ioctl(self.device, i32(QUERYCAP_NO), val)
         res = struct.unpack(QUERYCAP_ST, r)
@@ -305,7 +305,7 @@
 
 
     def getfreq(self):
-        _debug_('getfreq()', 1)
+        _debug_('getfreq()', 2)
         val = struct.pack(FREQUENCY_ST, 0, 0, 0)
         r = fcntl.ioctl(self.device, i32(GETFREQ_NO), val)
         res = struct.unpack(FREQUENCY_ST, r)
@@ -315,7 +315,7 @@
 
 
     def getfreq2(self):
-        _debug_('getfreq2()', 1)
+        _debug_('getfreq2()', 2)
         val = struct.pack(FREQUENCY_ST, 0, 0, 0)
         r = fcntl.ioctl(self.device, i32(GETFREQ_NO), val)
         res = struct.unpack(FREQUENCY_ST, r)
@@ -324,7 +324,7 @@
 
 
     def setchannel(self, channel):
-        _debug_('setchannel(channel=%r)' % (channel,), 1)
+        _debug_('setchannel(channel=%r)' % (channel,), 2)
         freq = config.TV_FREQUENCY_TABLE.get(channel)
         if freq:
             _debug_('Using custom frequency: chan="%s", freq="%s"' % (channel, 
freq))
@@ -348,14 +348,14 @@
 
 
     def setfreq_old(self, freq):
-        _debug_('setfreq_old(freq=%r)' % (freq,), 1)
+        _debug_('setfreq_old(freq=%r)' % (freq,), 2)
         val = struct.pack("L", freq)
         r = fcntl.ioctl(self.device, i32(SETFREQ_NO_V4L), val)
         _debug_('setfreq_old: val=%r, r=%r' % (val, r), 3)
 
 
     def setfreq(self, freq):
-        _debug_('setfreq(freq=%r)' % (freq,), 1)
+        _debug_('setfreq(freq=%r)' % (freq,), 2)
         val = struct.pack(FREQUENCY_ST, long(0), long(2), freq)
         r = fcntl.ioctl(self.device, i32(SETFREQ_NO), val)
         _debug_('setfreq: val=%r, r=%r' % (val, r), 3)
@@ -366,7 +366,7 @@
         Enumerate a video device input
         @param num: is the input number
         """
-        _debug_('enuminput(num=%r)' % (num), 1)
+        _debug_('enuminput(num=%r)' % (num), 2)
         val = struct.pack(ENUMINPUT_ST, num, "", 0, 0, 0, 0, 0)
         r = fcntl.ioctl(self.device, i32(ENUMINPUT_NO), val)
         res = struct.unpack(ENUMINPUT_ST, r)
@@ -378,7 +378,7 @@
         Enumerate all inputs
         @returns: a dict of the inputs index by name
         """
-        _debug_('enuminputs()', 1)
+        _debug_('enuminputs()', 2)
         res = {}
         num = 0
         try:
@@ -392,7 +392,7 @@
         return res
 
     def getinput(self):
-        _debug_('getinput()', 1)
+        _debug_('getinput()', 2)
         val = struct.pack(INPUT_ST, 0)
         r = fcntl.ioctl(self.device, i32(GETINPUT_NO), val)
         res = struct.unpack(INPUT_ST, r)
@@ -401,7 +401,7 @@
 
 
     def setinput(self, value):
-        _debug_('setinput(value=%r)' % (value,), 1)
+        _debug_('setinput(value=%r)' % (value,), 2)
         try:
             r = fcntl.ioctl(self.device, i32(SETINPUT_NO), 
struct.pack(INPUT_ST, value))
             _debug_('setinput: val=%r, res=%r' % (struct.pack(INPUT_ST, 
value), r), 3)
@@ -414,7 +414,7 @@
         """
         Get the TV input by name, eg: TELEVISION, s-video
         """
-        _debug_('getinputbyname(name=%r)' % (name,), 1)
+        _debug_('getinputbyname(name=%r)' % (name,), 2)
         v_input = name.lower()
         return self.inputs[v_input]
 
@@ -423,7 +423,7 @@
         """
         Set the TV input by name, eg: TELEVISION, s-video
         """
-        _debug_('setinputbyname(name=%r)' % (name,), 1)
+        _debug_('setinputbyname(name=%r)' % (name,), 2)
         v_input = name.lower()
         try:
             (index, name, type, audioset, tuner, std, status) = 
self.inputs[v_input]
@@ -436,7 +436,7 @@
 
 
     def enumstd(self, num):
-        _debug_('enumstd(num=%r)' % (num,), 1)
+        _debug_('enumstd(num=%r)' % (num,), 2)
         val = struct.pack(ENUMSTD_ST, num, 0, "", 0, 0, 0)
         r = fcntl.ioctl(self.device, i32(ENUMSTD_NO), val)
         res = struct.unpack(ENUMSTD_ST, r)
@@ -449,7 +449,7 @@
         Enumerate the TV standards
         @returns: a dict of the standards index by name
         """
-        _debug_('enumstds()', 1)
+        _debug_('enumstds()', 2)
         res = {}
         num = 0
         try:
@@ -467,7 +467,7 @@
         """
         Get the current TV standard
         """
-        _debug_('getstd()', 1)
+        _debug_('getstd()', 2)
         val = struct.pack(STANDARD_ST, 0)
         r = fcntl.ioctl(self.device, i32(GETSTD_NO), val)
         res = struct.unpack(STANDARD_ST, r)
@@ -479,7 +479,7 @@
         """
         Set the TV standard by number
         """
-        _debug_('setstd(value=%r)' % (value,), 1)
+        _debug_('setstd(value=%r)' % (value,), 2)
         val = struct.pack(STANDARD_ST, value)
         r = fcntl.ioctl(self.device, i32(SETSTD_NO), val)
         _debug_('setstd: val=%r, r=%r' % (val, r), 3)
@@ -489,7 +489,7 @@
         """
         Get the TV standard by name, eg: PAL-BGH, secam-dk, etc
         """
-        _debug_('getstdbyname(name=%r)' % (name,), 1)
+        _debug_('getstdbyname(name=%r)' % (name,), 2)
         v_norm = name.upper()
         return self.standards[v_norm]
 
@@ -498,7 +498,7 @@
         """
         Set the TV standard by name, eg: PAL-BGH, secam-dk, etc
         """
-        _debug_('setstdbyname(name=%r)' % (name,), 1)
+        _debug_('setstdbyname(name=%r)' % (name,), 2)
         v_norm = name.upper()
         tmp = self.getstd()
         try:
@@ -510,7 +510,7 @@
 
 
     def enuminput(self, num):
-        _debug_('enuminput(num=%r)' % (num,), 1)
+        _debug_('enuminput(num=%r)' % (num,), 2)
         val = struct.pack(ENUMINPUT_ST, num, "", 0, 0, 0, 0, 0)
         r = fcntl.ioctl(self.device, i32(ENUMINPUT_NO), val)
         res = struct.unpack(ENUMINPUT_ST, r)
@@ -519,7 +519,7 @@
 
 
     def getfmt(self):
-        _debug_('getfmt()', 1)
+        _debug_('getfmt()', 2)
         val = struct.pack(FMT_ST, 1, 0, 0, 0, 0, 0, 0, 0)
         r = fcntl.ioctl(self.device, i32(GET_FMT_NO), val)
         res = struct.unpack(FMT_ST, r)
@@ -528,14 +528,14 @@
 
 
     def setfmt(self, width, height):
-        _debug_('setfmt(width=%r, height=%r)' % (width, height), 1)
+        _debug_('setfmt(width=%r, height=%r)' % (width, height), 2)
         val = struct.pack(FMT_ST, 1L, width, height, 0L, 4L, 0L, 131072L, 0L)
         r = fcntl.ioctl(self.device, i32(SET_FMT_NO), val)
         _debug_('setfmt: val=%r, r=%r' % (val, r), 3)
 
 
     def gettuner(self, num):
-        _debug_('gettuner(num=%r)' % (num,), 1)
+        _debug_('gettuner(num=%r)' % (num,), 2)
         val = struct.pack(TUNER_ST, num, "", 0, 0, 0, 0, 0, 0, 0, 0)
         r = fcntl.ioctl(self.device, i32(GET_TUNER_NO), val)
         res = struct.unpack(TUNER_ST, r)
@@ -544,14 +544,14 @@
 
 
     def settuner(self, num, audmode):
-        _debug_('settuner(num=%r, audmode=%r)' % (num, audmode), 1)
+        _debug_('settuner(num=%r, audmode=%r)' % (num, audmode), 2)
         val = struct.pack(TUNER_ST, num, "", 0, 0, 0, 0, 0, audmode, 0, 0)
         r = fcntl.ioctl(self.device, i32(SET_TUNER_NO), val)
         _debug_('settuner: val=%r, r=%r' % (val, r), 3)
 
 
     def getaudio(self, num):
-        _debug_('getaudio(num=%r)' % (num,), 1)
+        _debug_('getaudio(num=%r)' % (num,), 2)
         val = struct.pack(AUDIO_ST, num, "", 0, 0)
         r = fcntl.ioctl(self.device, i32(GET_AUDIO_NO), val)
         res = struct.unpack(AUDIO_ST, r)
@@ -560,7 +560,7 @@
 
 
     def setaudio(self, num, mode):
-        _debug_('setaudio(num=%r, mode=%r)' % (num, mode), 1)
+        _debug_('setaudio(num=%r, mode=%r)' % (num, mode), 2)
         val = struct.pack(AUDIO_ST, num, "", mode, 0)
         r = fcntl.ioctl(self.device, i32(SET_AUDIO_NO), val)
         _debug_('setaudio: val=%r, r=%r' % (val, r), 3)
@@ -570,7 +570,7 @@
         """
         Get the value of a control
         """
-        _debug_('getctrl(id=0x%08x)' % (id,), 1)
+        _debug_('getctrl(id=0x%08x)' % (id,), 2)
         val = struct.pack(CTRL_ST, id, 0)
         r = fcntl.ioctl(self.device, i32(G_CTRL_NO), val)
         res = struct.unpack(CTRL_ST, r)
@@ -582,7 +582,7 @@
         """
         Set the value of a control
         """
-        _debug_('setctrl(id=0x%08x, value=%r)' % (id, value), 1)
+        _debug_('setctrl(id=0x%08x, value=%r)' % (id, value), 2)
         val = struct.pack(CTRL_ST, id, value)
         r = fcntl.ioctl(self.device, i32(S_CTRL_NO), val)
         res = struct.unpack(CTRL_ST, r)
@@ -595,7 +595,7 @@
         EXT_CTRL_type->id, res1, res2, value
         EXT_CTRLS_ST->class, count, error_idx, res1, res2, ptr
         """
-        _debug_('getextctrl(id=0x%08x)' % (id,), 1)
+        _debug_('getextctrl(id=0x%08x)' % (id,), 2)
         extctrl = array.array('B')
         extctrl.fromstring(struct.pack(EXT_CTRL_ST, id, 0, 0, 0))
         extctrl_p = extctrl.buffer_info()[0]
@@ -616,7 +616,7 @@
         """
         Set the value of an external control
         """
-        _debug_('setextctrl(id=0x%08x, value=%r)' % (id, value), 1)
+        _debug_('setextctrl(id=0x%08x, value=%r)' % (id, value), 2)
         extctrl = array.array('B')
         extctrl.fromstring(struct.pack(EXT_CTRL_ST, id, 0, 0, value))
         extctrl_p = extctrl.buffer_info()[0]
@@ -632,7 +632,7 @@
 
 
     def querymenu(self, id, num):
-        _debug_('querymenu(id=0x%08x, num=%r)' % (id, num), 1)
+        _debug_('querymenu(id=0x%08x, num=%r)' % (id, num), 2)
         val = struct.pack(QUERYMENU_ST, id, num, "", 0)
         try:
             r = fcntl.ioctl(self.device, i32(QUERYMENU_NO), val)
@@ -644,7 +644,7 @@
 
 
     def queryctrl(self, id):
-        _debug_('queryctrl(id=0x%08x)' % (id,), 1)
+        _debug_('queryctrl(id=0x%08x)' % (id,), 2)
         val = struct.pack(QUERYCTRL_ST, id, 0, "", 0, 0, 0, 0, 0, 0, 0)
         r = fcntl.ioctl(self.device, i32(QUERYCTRL_NO), val)
         res = struct.unpack(QUERYCTRL_ST, r)
@@ -663,7 +663,7 @@
 
 
     def printcontrol(self, res):
-        _debug_('printcontrol(res=%r)' % (res,), 1)
+        _debug_('printcontrol(res=%r)' % (res,), 2)
         (id, type, name, min, max, step, default, flags, value) = res
         if flags & 0x0001:
             return
@@ -683,7 +683,7 @@
         """
         converts a control to lowercase and replaces spaces with underscore, 
like v4l2-ctl
         """
-        _debug_('ctrlname(name=%r)' % (name,), 1)
+        _debug_('ctrlname(name=%r)' % (name,), 2)
         return name.replace(' ', '_').lower()
 
 
@@ -691,7 +691,7 @@
         """
         prints all the controls
         """
-        _debug_('listcontrols()', 1)
+        _debug_('listcontrols()', 2)
         id = V4L2_CTRL_FLAG_NEXT_CTRL
         while 1:
             try:
@@ -714,7 +714,7 @@
 
 
     def enumcontrols(self):
-        _debug_('enumcontrols()', 1)
+        _debug_('enumcontrols()', 2)
         res = {}
         id = V4L2_CTRL_FLAG_NEXT_CTRL
         while 1:
@@ -748,7 +748,7 @@
         """
         find a control by id
         """
-        _debug_('findcontrol(id=0x%08x)' % (id,), 1)
+        _debug_('findcontrol(id=0x%08x)' % (id,), 2)
         for ctrl in self.controls.keys():
             if self.controls[ctrl][0] == id:
                 return ctrl
@@ -759,7 +759,7 @@
         """
         get the control record by name
         """
-        _debug_('getcontrol(name=%r)' % (name,), 1)
+        _debug_('getcontrol(name=%r)' % (name,), 2)
         key = self.ctrlname(name)
         if not self.controls.has_key(key):
             _debug_('control \"%s\" does not exists' % (name), DWARNING)
@@ -772,7 +772,7 @@
         """
         get the control record by name
         """
-        _debug_('setcontrol(name=%r, value=%r)' % (name, value), 1)
+        _debug_('setcontrol(name=%r, value=%r)' % (name, value), 2)
         key = self.ctrlname(name)
         if not self.controls.has_key(key):
             _debug_('control \"%s\" does not exists' % (name), DWARNING)
@@ -790,7 +790,7 @@
     def updatecontrol(self, name, value):
         """ set the control record by name
         """
-        _debug_('updatecontrol(name=%r, value=%r)' % (name, value), 1)
+        _debug_('updatecontrol(name=%r, value=%r)' % (name, value), 2)
         if self.getcontrol(name) == None:
             return
 
@@ -806,7 +806,7 @@
     def init_settings(self):
         """ initialise the V4L2 setting
         """
-        _debug_('init_settings()', 1)
+        _debug_('init_settings()', 2)
         (v_norm, v_input, v_clist, v_dev) = config.TV_SETTINGS.split()
         self.inputs = self.enuminputs()
         self.standards = self.enumstds()
@@ -819,7 +819,7 @@
 
 
     def print_settings(self):
-        _debug_('print_settings()', 1)
+        _debug_('print_settings()', 2)
         print 'Driver: %s' % self.driver.strip('\0')
         print 'Card: %s' % self.card.strip('\0')
         print 'Version: %02d.%02d' % (self.version / 256, self.version % 256)
@@ -855,7 +855,7 @@
 
 class V4LGroup:
     def __init__(self):
-        _debug_('V4LGroup.__init__()', 1)
+        _debug_('V4LGroup.__init__()', 2)
         # Types:
         #   tv-v4l1 - video capture card with a tv tuner using v4l1
         #   tv-v4l2 - video capture card with a tv tuner using v4l2

Modified: branches/rel-1-7/freevo/src/video/__init__.py
==============================================================================
--- branches/rel-1-7/freevo/src/video/__init__.py       (original)
+++ branches/rel-1-7/freevo/src/video/__init__.py       Sat Mar 22 07:23:38 2008
@@ -215,7 +215,7 @@
             print
             return 0
 
-    _debug_("Building the xml hash database...", 1)
+    _debug_("Building the xml hash database...", 2)
 
     files = []
     if not config.VIDEO_ONLY_SCAN_DATADIR:
@@ -246,5 +246,5 @@
                 for fo in info.__fxd_files_options__:
                     discset_information[fo['file-id']] = fo['mplayer-options']
 
-    _debug_('done', 1)
+    _debug_('done', 2)
     return 1

Modified: branches/rel-1-7/freevo/src/video/fxdhandler.py
==============================================================================
--- branches/rel-1-7/freevo/src/video/fxdhandler.py     (original)
+++ branches/rel-1-7/freevo/src/video/fxdhandler.py     Sat Mar 22 07:23:38 2008
@@ -337,7 +337,7 @@
     @returns: a dictionary of mplayer options
     """
     mplayer_options = {}
-    _debug_('parse_mplayer_mplayer_options(fxd=%r, node=%r)' % (fxd, node), 1)
+    _debug_('parse_mplayer_mplayer_options(fxd=%r, node=%r)' % (fxd, node), 2)
     item = VideoItem('', fxd.getattr(None, 'parent', None), parse=False)
     print 'item=%r' % (item.__dict__)
 

Modified: branches/rel-1-7/freevo/src/video/plugins/reencode.py
==============================================================================
--- branches/rel-1-7/freevo/src/video/plugins/reencode.py       (original)
+++ branches/rel-1-7/freevo/src/video/plugins/reencode.py       Sat Mar 22 
07:23:38 2008
@@ -76,7 +76,7 @@
         '''config is called automatically, for default settings run:
         freevo plugins -i video.reencode
         '''
-        _debug_('config(self)', 1)
+        _debug_('config(self)', 2)
         return [
             ('REENCODE_CONTAINER', 'avi', 'Container type'),
             ('REENCODE_RESOLUTION', 'Optimal', 'Resolution'),
@@ -92,12 +92,12 @@
 
 
     #def eventhandler(self, event, menuw=None, arg=None):
-    #    _debug_('eventhandler(self, event=%r, menuw=%r, arg=%r)' % (event, 
menuw, arg), 1)
+    #    _debug_('eventhandler(self, event=%r, menuw=%r, arg=%r)' % (event, 
menuw, arg), 2)
     #    return self.item.eventhandler(event, menuw=menuw, arg=arg)
 
 
     def actions(self, item):
-        _debug_('actions(self, item)', 1)
+        _debug_('actions(self, item)', 2)
 
         if item.type == 'video' and item.mode == 'file':
             self.item = item
@@ -143,7 +143,7 @@
 
 
     def encoding_profile_menu(self, menuw=None, arg=None):
-        _debug_('encoding_profile_menu(self, menuw=%r, arg=%r)' % (menuw, 
arg), 1)
+        _debug_('encoding_profile_menu(self, menuw=%r, arg=%r)' % (menuw, 
arg), 2)
         menu_items = []
         menu_items += [ menu.MenuItem(_('Start Encoding'), self.create_job, 
self.profile) ]
         menu_items += [ menu.MenuItem(_('Select Encoding Profile'), 
action=self.select_profile) ]
@@ -162,7 +162,7 @@
         menuw.refresh()
 
     def select_profile(self, arg=None, menuw=None):
-        _debug_('select_profile(self, arg=None, menuw=None)', 1)
+        _debug_('select_profile(self, arg=None, menuw=None)', 2)
         menu_items = []
         menu_items += [ menu.MenuItem(_('Xvid Low Quality'), 
action=self.select_encoding_profile, arg='xvid_low') ]
         menu_items += [ menu.MenuItem(_('Xvid High Quality'), 
action=self.select_encoding_profile, arg='xvid_high') ]
@@ -174,7 +174,7 @@
         menuw.refresh()
 
     def mod_container(self, arg=None, menuw=None):
-        _debug_('mod_container(self, arg=%r, menuw=%r)' % (arg, menuw), 1)
+        _debug_('mod_container(self, arg=%r, menuw=%r)' % (arg, menuw), 2)
         items = []
         for container in getContainerCAP()[1]:
             items.append(menu.MenuItem(container, action=self.alter_prop, 
arg=('container', container)))
@@ -184,7 +184,7 @@
         menuw.refresh()
 
     def mod_resolution(self, arg=None, menuw=None):
-        _debug_('mod_resolution(self, arg=%r, menuw=%r)' % (arg, menuw), 1)
+        _debug_('mod_resolution(self, arg=%r, menuw=%r)' % (arg, menuw), 2)
         items = []
         for resolution in ('Optimal', '1920:1080', '1280:720', '852:480', 
'720:576', '720:480', '320:240'):
             items.append(menu.MenuItem(resolution, action=self.alter_prop, 
arg=('resolution', resolution)))
@@ -194,7 +194,7 @@
         menuw.refresh()
 
     def mod_videocodec(self, arg=None, menuw=None):
-        _debug_('mod_videocodec(self, arg=%r, menuw=%r)' % (arg, menuw), 1)
+        _debug_('mod_videocodec(self, arg=%r, menuw=%r)' % (arg, menuw), 2)
         items = []
         for videocodec in getVideoCodecCAP()[1]:
             items.append(menu.MenuItem(videocodec, action=self.alter_prop, 
arg=('videocodec', videocodec)))
@@ -204,7 +204,7 @@
         menuw.refresh()
 
     def mod_videobitrate(self, arg=None, menuw=None):
-        _debug_('mod_videobitrate(self, arg=%r, menuw=%r)' % (arg, menuw), 1)
+        _debug_('mod_videobitrate(self, arg=%r, menuw=%r)' % (arg, menuw), 2)
         items = []
         for videobitrate in range(400, 2001, 200):
             items.append(menu.MenuItem(videobitrate, action=self.alter_prop, 
arg=('videobitrate', videobitrate)))
@@ -214,7 +214,7 @@
         menuw.refresh()
 
     def mod_audiocodec(self, arg=None, menuw=None):
-        _debug_('mod_audiocodec(self, arg=%r, menuw=%r)' % (arg, menuw), 1)
+        _debug_('mod_audiocodec(self, arg=%r, menuw=%r)' % (arg, menuw), 2)
         items = []
         for audiocodec in getAudioCodecCAP()[1]:
             items.append(menu.MenuItem(audiocodec, action=self.alter_prop, 
arg=('audiocodec', audiocodec)))
@@ -224,7 +224,7 @@
         menuw.refresh()
 
     def mod_audiobitrate(self, arg=None, menuw=None):
-        _debug_('mod_audiobitrate(self, arg=%r, menuw=%r)' % (arg, menuw), 1)
+        _debug_('mod_audiobitrate(self, arg=%r, menuw=%r)' % (arg, menuw), 2)
         items = []
         for audiobitrate in (64, 128, 192, 224):
             items.append(menu.MenuItem(audiobitrate, action=self.alter_prop, 
arg=('audiobitrate', audiobitrate)))
@@ -234,7 +234,7 @@
         menuw.refresh()
 
     def mod_numpasses(self, arg=None, menuw=None):
-        _debug_('mod_numpasses(self, arg=%r, menuw=%r)' % (arg, menuw), 1)
+        _debug_('mod_numpasses(self, arg=%r, menuw=%r)' % (arg, menuw), 2)
         items = []
         for numpasses in (1, 2):
             items.append(menu.MenuItem(numpasses, action=self.alter_prop, 
arg=('numpasses', numpasses)))
@@ -244,7 +244,7 @@
         menuw.refresh()
 
     def mod_numthreads(self, arg=None, menuw=None):
-        _debug_('mod_numthreads(self, arg=%r, menuw=%r)' % (arg, menuw), 1)
+        _debug_('mod_numthreads(self, arg=%r, menuw=%r)' % (arg, menuw), 2)
         items = []
         for numthreads in (1, 2, 3, 4, 5, 6, 7, 8):
             items.append(menu.MenuItem(numthreads, action=self.alter_prop, 
arg=('numthreads', numthreads)))
@@ -254,7 +254,7 @@
         menuw.refresh()
 
     def mod_videofilter(self, arg=None, menuw=None):
-        _debug_('mod_videofilter(self, arg=%r, menuw=%r)' % (arg, menuw), 1)
+        _debug_('mod_videofilter(self, arg=%r, menuw=%r)' % (arg, menuw), 2)
         items = []
         for videofilter in getVideoFiltersCAP()[1]:
             items.append(menu.MenuItem(videofilter, action=self.alter_prop, 
arg=('videofilter', videofilter)))
@@ -264,7 +264,7 @@
         menuw.refresh()
 
     def select_encoding_profile(self, arg=None, menuw=None):
-        _debug_('select_encoding_profile(self, arg=%r, menuw=%r)' % (arg, 
menuw), 1)
+        _debug_('select_encoding_profile(self, arg=%r, menuw=%r)' % (arg, 
menuw), 2)
 
         if arg == 'xvid_low':
             self.profile['container'] = 'avi'
@@ -315,7 +315,7 @@
             menuw.back_one_menu(arg='reload')
 
     def alter_prop(self, arg=(None, None), menuw=None):
-        _debug_('alter_prop(self, arg=%r, menuw=%r)' % (arg, menuw), 1)
+        _debug_('alter_prop(self, arg=%r, menuw=%r)' % (arg, menuw), 2)
         (prop, val) = arg
 
         if prop == 'container':
@@ -349,12 +349,12 @@
 
     def alter_name(self, name):
         '''alter_name is not used'''
-        _debug_('alter_name(self, name=%r)' % (name), 1)
+        _debug_('alter_name(self, name=%r)' % (name), 2)
         self.menuw.refresh()
 
 
     def create_job(self, menuw=None, arg=None):
-        _debug_('create_job(self, arg=%r, menuw=%r)' % (arg, menuw), 1)
+        _debug_('create_job(self, arg=%r, menuw=%r)' % (arg, menuw), 2)
 
         profile = arg
 

Modified: branches/rel-1-7/freevo/src/video/videoitem.py
==============================================================================
--- branches/rel-1-7/freevo/src/video/videoitem.py      (original)
+++ branches/rel-1-7/freevo/src/video/videoitem.py      Sat Mar 22 07:23:38 2008
@@ -205,7 +205,7 @@
         if len(self.possible_players) > 0:
             # choose the best player as default player
             self.player_rating, self.player = self.possible_players[0]
-        _debug_("url=%r possible_players=%r" % (self.url, 
self.possible_players,), 1)
+        _debug_("url=%r possible_players=%r" % (self.url, 
self.possible_players,), 2)
 
 
     def id(self):

Modified: branches/rel-1-7/freevo/src/www/htdocs/encoding_web.rpy
==============================================================================
--- branches/rel-1-7/freevo/src/www/htdocs/encoding_web.rpy     (original)
+++ branches/rel-1-7/freevo/src/www/htdocs/encoding_web.rpy     Sat Mar 22 
07:23:38 2008
@@ -61,7 +61,7 @@
     display_style = 'display:none'
     if display_timer:
         display_style = 'display:""'
-    _debug_('addPageRefresh()', 1)
+    _debug_('addPageRefresh()', 2)
     prhtml = '<script type="text/JavaScript" 
src="scripts/encoding_web.js">window.onload=beginrefresh</script>\n'
     prhtml += '<span class="refresh" style=%s id="refresh" >Refresh In : 
??</span>\n' % display_style
     return prhtml
@@ -163,7 +163,7 @@
         self.server    = xmlrpclib.Server(server_string, allow_none=1)
 
     def select_encoding_profile(self, arg=None, menuw=None):
-        _debug_('select_encoding_profile(self, arg=%r, menuw=%r)' % (arg, 
menuw), 1)
+        _debug_('select_encoding_profile(self, arg=%r, menuw=%r)' % (arg, 
menuw), 2)
         if arg == 'xvid_low':
             self.profile['container'] = 'avi'
             self.profile['resolution'] = 'Optimal'
@@ -260,7 +260,7 @@
         return coding_parameters
 
     def create_job(self, menuw=None, arg=None):
-        _debug_('create_job(self, arg=%r, menuw=%r)' % (arg, menuw), 1)
+        _debug_('create_job(self, arg=%r, menuw=%r)' % (arg, menuw), 2)
 
         profile = arg
         job_status = 'Job Status'
@@ -376,7 +376,7 @@
     def _render(self, request):
         '''
         '''
-        _debug_('_render(request)', 1)
+        _debug_('_render(request)', 2)
         fv = HTMLResource()
         form = request.args
 

Modified: branches/rel-1-7/freevo/src/www/htdocs/pluginconfig.rpy
==============================================================================
--- branches/rel-1-7/freevo/src/www/htdocs/pluginconfig.rpy     (original)
+++ branches/rel-1-7/freevo/src/www/htdocs/pluginconfig.rpy     Sat Mar 22 
07:23:38 2008
@@ -335,7 +335,7 @@
     def SortPlugins(self):
         '''
         '''
-        _debug_('SortPlugins(self=%r)' % (self), 1)
+        _debug_('SortPlugins(self=%r)' % (self), 2)
         sorted = []
         for plugin in self.all_plugins:
             pgrp = plugin[0].split('.')[0]

Modified: branches/rel-1-7/freevo/src/www/htdocs/youtube.rpy
==============================================================================
--- branches/rel-1-7/freevo/src/www/htdocs/youtube.rpy  (original)
+++ branches/rel-1-7/freevo/src/www/htdocs/youtube.rpy  Sat Mar 22 07:23:38 2008
@@ -49,7 +49,7 @@
 def xmlStatus(fstatus):
     '''
     '''
-    _debug_('xmlStatus(fstatus)', 1)
+    _debug_('xmlStatus(fstatus)', 2)
     xmlstatus = ''
     xmlstatus += '<PERCENT>%s</PERCENT>' %  fstatus['percent']
     xmlstatus += '<DOWNLOADED>%s</DOWNLOADED>' % fstatus['downloaded']
@@ -63,7 +63,7 @@
 def optimum_k_exp(num_bytes):
     '''
     '''
-    _debug_('optimum_k_exp(num_bytes)', 1)
+    _debug_('optimum_k_exp(num_bytes)', 2)
     const_1k = 1024
     if num_bytes == 0:
         return 0
@@ -74,7 +74,7 @@
 def format_bytes(num_bytes):
     '''
     '''
-    _debug_('format_bytes(num_bytes)', 1)
+    _debug_('format_bytes(num_bytes)', 2)
     const_1k = 1024
     try:
         exp = optimum_k_exp(num_bytes)
@@ -90,7 +90,7 @@
 def getStatus(ytfile):
     '''
     '''
-    _debug_('getStatus(ytfile)', 1)
+    _debug_('getStatus(ytfile)', 2)
     fileStatus = {'percent': '-', 'downloaded': 'done' , 'filesize': 'done' , 
'speed' : '--', 'eta' : '--:--'}
 
     youtube_file = os.path.join(config.YOUTUBE_DIR,ytfile)
@@ -127,7 +127,7 @@
 def getXML():
     '''
     '''
-    _debug_('getXML()', 1)
+    _debug_('getXML()', 2)
     filesXML = '<?xml version="1.0" encoding="ISO-8859-1" ?>'
     filesXML += '<FILELIST>'
 
@@ -150,7 +150,7 @@
 def displaytableheader():
     '''
     '''
-    _debug_('displaytableheader()', 1)
+    _debug_('displaytableheader()', 2)
     fvhtml = HTMLResource()
 
     fvhtml.tableOpen('class="library" id="filelist"')
@@ -169,7 +169,7 @@
 def CleanupLogFiles():
     '''
     '''
-    _debug_('CleanupLogFiles()', 1)
+    _debug_('CleanupLogFiles()', 2)
     logfiles = os.listdir(config.YOUTUBE_DIR + '.tmp/')
     for lfile in logfiles:
         # Check to see if the movie file exists.
@@ -181,7 +181,7 @@
 def startdownload(dlcommand, logfile):
     '''
     '''
-    _debug_('startdownload(dlcommand=%r, logfile=%r)' % (dlcommand, logfile), 
1)
+    _debug_('startdownload(dlcommand=%r, logfile=%r)' % (dlcommand, logfile), 
2)
     print dlcommand
     pwdcur = os.getcwd()
     os.chdir(config.YOUTUBE_DIR)
@@ -192,7 +192,7 @@
 def convert_file_to_flv(convert_file):
     '''
     '''
-    _debug_('convert_file_to_flv(convert_file)', 1)
+    _debug_('convert_file_to_flv(convert_file)', 2)
 
     source_file = config.YOUTUBE_DIR + convert_file
     destin_file = source_file + ".flv"
@@ -203,7 +203,7 @@
     convert_cmd = ' -i "%s" -s 320x240 -ar 44100 -r 12 "%s" '
     convert_cmd = convert_cmd % (source_file , destin_file)
     convert_cmd = ('/usr/bin/ffmpeg', '-i', source_file, '-s', '320x240', 
'-ar', '44100', '-r', '12', destin_file)
-    _debug_(convert_cmd, 1)
+    _debug_(convert_cmd, 2)
 
     pwdcur = os.getcwd()
     os.chdir(config.YOUTUBE_DIR)
@@ -216,7 +216,7 @@
 def download_youtube(yt_url):
     '''
     '''
-    _debug_('download_youtube(yt_url)', 1)
+    _debug_('download_youtube(yt_url)', 2)
     logfile = config.YOUTUBE_DIR + '.tmp/' +  yt_url.split('=')[-1] + '.log'
     startdownload([config.YOUTUBE_DL, '-t', yt_url], logfile)
 
@@ -224,7 +224,7 @@
 def download_url(dl_url):
     '''
     '''
-    _debug_('download_url(dl_url)', 1)
+    _debug_('download_url(dl_url)', 2)
     # get the file name from the url.
     logfile = config.YOUTUBE_DIR + '.tmp/partfile' +  dl_url.split('/')[-1]
     logfile = os.path.splitext(logfile)[0] + '.log'
@@ -234,7 +234,7 @@
 def addPageRefresh():
     '''
     '''
-    _debug_('addPageRefresh()', 1)
+    _debug_('addPageRefresh()', 2)
     prhtml = '<script type="text/JavaScript" 
src="scripts/youtube.js">window.onload=beginrefresh</script>\n'
     prhtml += '<span class="refresh" id="refresh">Refresh In : ??</span>'
     return prhtml
@@ -243,7 +243,7 @@
 def envCheck():
     '''
     '''
-    _debug_('envCheck()', 1)
+    _debug_('envCheck()', 2)
     yterrors = []
     if (not config.__dict__.has_key('YOUTUBE_DIR')):
         yterrors.append('Unable to Find YOUTUDE_DIR setting in local_conf.py')
@@ -265,7 +265,7 @@
 def doFlowPlayer(pfile, flow_player='FlowPlayerThermo.swf'):
     '''
     '''
-    _debug_('doFlowPlayer(pfile, flow_player)', 1)
+    _debug_('doFlowPlayer(pfile, flow_player)', 2)
 
     flash = '\n<script type="text/javascript" 
src="flowplayer/swfobject.js"></script>'
     flash += '\n<div align="center" style= display:"" id="flowplayerholder">'
@@ -290,7 +290,7 @@
     def _render(self, request):
         '''
         '''
-        _debug_('_render(request)', 1)
+        _debug_('_render(request)', 2)
         fv = HTMLResource()
         form = request.args
 

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to