From: Duncan W. <du...@fr...> - 2010-02-01 18:44:33
|
Author: duncan Date: Mon Feb 1 13:44:33 2010 New Revision: 11654 Log: do not print (in encodingcore) (B#2943181) Fix inspired by Andrea Mennucc applied Modified: branches/rel-1/freevo/ChangeLog branches/rel-1/freevo/freevo_config.py branches/rel-1/freevo/local_conf.py.example branches/rel-1/freevo/src/encodingcore.py tags/REL-1_9_1/freevo/ChangeLog tags/REL-1_9_1/freevo/freevo_config.py tags/REL-1_9_1/freevo/src/encodingcore.py Modified: branches/rel-1/freevo/ChangeLog ============================================================================== --- branches/rel-1/freevo/ChangeLog (original) +++ branches/rel-1/freevo/ChangeLog Mon Feb 1 13:44:33 2010 @@ -19,8 +19,10 @@ * New improvements to the rc.app() interface (F#2772598) * New iplayer plug-in for BBC IPlayer/ITV Player/Hulu Player (F#2809981) * Updated autoshutdown plug-in with improved configuration and bug fixes (B#2808009) + * Updated media folders to follow symbolic links if enabled in configuration (F#) * Updated OSD to allow items to be renamed (F#2796072) * Updated web interface to allow a TV favourite to be manually added (F#2804991) + * Fixed encoding core not to print messages in debug mode (B#2943181) * Fixed extended metadata dates to use the userdate (B#2871806) * Fixed removable media status not updating (B#2830317) * Fixed FilmAffinity plug-in crashing on some movies (B#2835447) @@ -29,7 +31,7 @@ * Fixed freevo script for Gentoo eselect nonsense (B#2904361) * Fixed imdb for page changes and parser errors (B#2924872) * Fixed ivtv control name changes (B#2801870) - * Fixed livepause back-end when the buffer overflows freevo stops respond (B#2830288) + * Fixed livepause back-end when the buffer overflows Freevo stops respond (B#2830288) * Fixed livepause incorrect function (B#2808038) * Fixed livepause not working with live recording (B#2888365) * Fixed livepause plug-in when the TV_CHANNELS have varying number of items (B#2808035) Modified: branches/rel-1/freevo/freevo_config.py ============================================================================== --- branches/rel-1/freevo/freevo_config.py (original) +++ branches/rel-1/freevo/freevo_config.py Mon Feb 1 13:44:33 2010 @@ -409,6 +409,7 @@ """), (5.28, """ Added MPLAYER_PROPERTY_TIMEOUT to control how long freevo waits for mplayer property calls + Added SYS_FOLLOW_SYMLINKS to follow symlinks, default is false """), ] @@ -616,6 +617,10 @@ # HOST_ALIVE_CHECK = 'ping -c 1 -W 1 %s > /dev/null 2>&1' +# Follow symlinks in media directories +# +SYS_FOLLOW_SYMLINKS = False + # # Directory to store temporary files # @@ -1531,8 +1536,8 @@ # Number (or fraction) of seconds before mplayer property calls time out. # Property calls are used to retrive information from mplayer from the # slave interface. Mostly for the OSD display. If you experience problems -# with the OSD make this number higher. -# +# with the OSD make this number higher. +# MPLAYER_PROPERTY_TIMEOUT = 0.1 # @@ -2190,6 +2195,9 @@ # enable the pdb (python debugger), don't set this unless you know how to use the debugger DEBUG_DEBUGGER = 0 +# Like debug but print to stdout, the console +DEBUG_CONSOLE = 0 + # # Activate blending between different menu screens # Modified: branches/rel-1/freevo/local_conf.py.example ============================================================================== --- branches/rel-1/freevo/local_conf.py.example (original) +++ branches/rel-1/freevo/local_conf.py.example Mon Feb 1 13:44:33 2010 @@ -237,6 +237,10 @@ # # SYS_USE_NETWORK = True +# Follow symlinks in media directories +# +# SYS_FOLLOW_SYMLINKS = False + # # Directory to store temporary files # @@ -1505,7 +1509,7 @@ # ====================================================================== # ENCODINGSERVER_UID = 0 # ENCODINGSERVER_GID = 0 -# +# # ENCODINGSERVER_IP = 'localhost' # ENCODINGSERVER_PORT = 18002 # ENCODINGSERVER_SECRET = 'secret2' Modified: branches/rel-1/freevo/src/encodingcore.py ============================================================================== --- branches/rel-1/freevo/src/encodingcore.py (original) +++ branches/rel-1/freevo/src/encodingcore.py Mon Feb 1 13:44:33 2010 @@ -37,7 +37,7 @@ from time import sleep import sys, os, re #, ConfigParser, copy from subprocess import Popen, PIPE -from pprint import pprint +from pprint import pprint, pformat from copy import copy from string import split, join from util.misc import uniquify_filename @@ -447,8 +447,8 @@ if id_match: id_info[id_match.groups()[0]] = id_match.groups()[1] - if config.DEBUG >= 2: - print 'id_info:',; pprint(id_info) + if config.DEBUG_CONSOLE: + print 'id_info: '+ pformat(id_info) self.id_info = id_info @@ -500,9 +500,7 @@ shutil.copy(capture, vfs.getoverlay(self.output)) _debug_('copied %r to %r' % (capture, vfs.getoverlay(self.output))) except Exception, why: - print why - _debug_('%s' % why, DINFO) - _debug_('unable to write file %r' % self.output, DWARNING) + _debug_('unable to write file %r: %s' % (self.output, why), DWARNING) else: _debug_('error creating capture for "%s"' % self.source, DWARNING) @@ -567,7 +565,7 @@ Parses Mplayer output to obtain ideal cropping parameters, and do PAL/NTSC detection from QuickRip, heavily adapted, new algo. """ - #print '_cropdetect_parse(self, lines=%r, data=%r)' % (lines, data) + #_debug_('_cropdetect_parse(self, lines=%r, data=%r)' % (lines, data)) re_crop = re.compile('.*-vf crop=(\d*:\d*:\d*:\d*).*') re_ntscprog = re.compile('24fps progressive NTSC content detected') @@ -1065,12 +1063,13 @@ #get the first queued object self.currentjob = self.qlist[0] - if config.DEBUG >= 2: + if config.DEBUG_CONSOLE: #print 'self.currentjob:',; pprint(self.currentjob.__dict__) #print 'self.currentjob.thread:',; pprint(self.currentjob.thread.__dict__) - print 'self.currentjob.idnr:', self.currentjob.idnr - print 'self.currentjob.status:', self.currentjob.status - print 'self.currentjob.thread.returncode:', self.currentjob.thread.returncode + print 'self.currentjob.idnr: ' + repr(self.currentjob.idnr) + print 'self.currentjob.status: ' + repr(self.currentjob.status) + if hasattr(self.currentjob, 'thread'): + print 'self.currentjob.thread.returncode: ' + repr(self.currentjob.thread.returncode) _debug_('PID %s' % self.currentjob.pid) Modified: tags/REL-1_9_1/freevo/ChangeLog ============================================================================== --- tags/REL-1_9_1/freevo/ChangeLog (original) +++ tags/REL-1_9_1/freevo/ChangeLog Mon Feb 1 13:44:33 2010 @@ -22,6 +22,7 @@ * Updated autoshutdown plug-in with improved configuration and bug fixes (B#2808009) * Updated OSD to allow items to be renamed (F#2796072) * Updated web interface to allow a TV favourite to be manually added (F#2804991) + * Fixed encoding core not to print messages in debug mode (B#2943181) * Fixed extended metadata dates to use the userdate (B#2871806) * Fixed FilmAffinity plug-in crashing on some movies (B#2835447) * Fixed FilmAffinity web page layout change (B#2872627) Modified: tags/REL-1_9_1/freevo/freevo_config.py ============================================================================== --- tags/REL-1_9_1/freevo/freevo_config.py (original) +++ tags/REL-1_9_1/freevo/freevo_config.py Mon Feb 1 13:44:33 2010 @@ -2179,6 +2179,9 @@ # enable the pdb (python debugger), don't set this unless you know how to use the debugger DEBUG_DEBUGGER = 0 +# Like debug but print to stdout, the console +DEBUG_CONSOLE = 0 + # # Activate blending between different menu screens # Modified: tags/REL-1_9_1/freevo/src/encodingcore.py ============================================================================== --- tags/REL-1_9_1/freevo/src/encodingcore.py (original) +++ tags/REL-1_9_1/freevo/src/encodingcore.py Mon Feb 1 13:44:33 2010 @@ -37,7 +37,7 @@ from time import sleep import sys, os, re #, ConfigParser, copy from subprocess import Popen, PIPE -from pprint import pprint +from pprint import pprint, pformat from copy import copy from string import split, join from util.misc import uniquify_filename @@ -447,8 +447,8 @@ if id_match: id_info[id_match.groups()[0]] = id_match.groups()[1] - if config.DEBUG >= 2: - print 'id_info:',; pprint(id_info) + if config.DEBUG_CONSOLE: + print 'id_info: '+ pformat(id_info) self.id_info = id_info @@ -500,9 +500,7 @@ shutil.copy(capture, vfs.getoverlay(self.output)) _debug_('copied %r to %r' % (capture, vfs.getoverlay(self.output))) except Exception, why: - print why - _debug_('%s' % why, DINFO) - _debug_('unable to write file %r' % self.output, DWARNING) + _debug_('unable to write file %r: %s' % (self.output, why), DWARNING) else: _debug_('error creating capture for "%s"' % self.source, DWARNING) @@ -567,7 +565,7 @@ Parses Mplayer output to obtain ideal cropping parameters, and do PAL/NTSC detection from QuickRip, heavily adapted, new algo. """ - #print '_cropdetect_parse(self, lines=%r, data=%r)' % (lines, data) + #_debug_('_cropdetect_parse(self, lines=%r, data=%r)' % (lines, data)) re_crop = re.compile('.*-vf crop=(\d*:\d*:\d*:\d*).*') re_ntscprog = re.compile('24fps progressive NTSC content detected') @@ -680,8 +678,7 @@ self.cropres = ( int(adjustedcrop[0]), int(adjustedcrop[1]) ) self.crop = join(adjustedcrop, ':') - - _debug_('Selected crop setting: %s' % self.crop) + _debug_('Selected crop option: %s' % self.crop) #end analysing self.finishedanalyze = True @@ -1065,12 +1062,13 @@ #get the first queued object self.currentjob = self.qlist[0] - if config.DEBUG >= 2: + if config.DEBUG_CONSOLE: #print 'self.currentjob:',; pprint(self.currentjob.__dict__) #print 'self.currentjob.thread:',; pprint(self.currentjob.thread.__dict__) - print 'self.currentjob.idnr:', self.currentjob.idnr - print 'self.currentjob.status:', self.currentjob.status - print 'self.currentjob.thread.returncode:', self.currentjob.thread.returncode + print 'self.currentjob.idnr: ' + repr(self.currentjob.idnr) + print 'self.currentjob.status: ' + repr(self.currentjob.status) + if hasattr(self.currentjob, 'thread'): + print 'self.currentjob.thread.returncode: ' + repr(self.currentjob.thread.returncode) _debug_('PID %s' % self.currentjob.pid) |