Ticket #13614: silence_py_patch_02.patch
File silence_py_patch_02.patch, 1.7 KB (added by , 4 years ago) |
---|
-
./
old new 1 #!/usr/bin/ env python1 #!/usr/bin/python3 2 2 # Build a skiplist from silence in the audio track. 3 3 # v1.0 Roger Siddons 4 4 # v2.0 Fix progid for job/player messages … … 89 89 self.argdict.update(v for v in validargs if v[1] is not None) 90 90 break 91 91 else: 92 self.logger.log('No preset found for "' + title .encode('utf-8') + '" or "' + callsign.encode('utf-8')+ '"')92 self.logger.log('No preset found for "' + title + '" or "' + callsign + '"') 93 93 except IOError: 94 94 self.logger.log('Presets file "' + filename + '" not found', MYLOG.ERR) 95 95 return self.argdict … … 155 155 rec = MythTV.Recorded((chanid, starttime), db) 156 156 channel = MythTV.Channel(chanid, db) 157 157 158 logger.log('Processing: ' + channel.callsign .encode('utf-8')+ ', ' + str(rec.starttime)159 + ', "' + rec.title .encode('utf-8') + ' - ' + rec.subtitle.encode('utf-8')+ '"')158 logger.log('Processing: ' + channel.callsign + ', ' + str(rec.starttime) 159 + ', "' + rec.title + ' - ' + rec.subtitle + '"') 160 160 161 161 sg = MythTV.findfile(rec.basename, rec.storagegroup, db) 162 162 if sg is None: … … 182 182 stdin=p1.stdout, stdout=subprocess.PIPE) 183 183 # Pipe audio stream to C++ silence which will spit out formatted log lines 184 184 p3 = subprocess.Popen([kExe_Silence, "%d" % p1.pid] + param.getValues(), stdin=p2.stdout, 185 stdout=subprocess.PIPE )185 stdout=subprocess.PIPE, universal_newlines=True) 186 186 187 187 # Purge any existing skip list and flag as in-progress 188 188 rec.commflagged = 2