def process_media(processPath, videoFiles, nzbName, process_method, force, is_priority, result):
 processor = None
 for cur_video_file in videoFiles:
  cur_video_file_path = os.path.join(processPath, cur_video_file)
  if already_postprocessed(processPath, cur_video_file, force, result):
   result.output += logHelper(((u'Already Processed ' + cur_video_file_path) + u' : Skipping'), sickrage.srCore.srLogger.DEBUG)
   continue
  try:
   processor = post_processor.PostProcessor(cur_video_file_path, nzbName, process_method, is_priority)
   result.result = processor.process
   process_fail_message = u''
  except EpisodePostProcessingFailedException as e:
   result.result = False
   process_fail_message = e.message
  if processor:
   result.output += processor.log
  if result.result:
   result.output += logHelper((u'Processing succeeded for ' + cur_video_file_path))
  else:
   result.output += logHelper((((u'Processing failed for ' + cur_video_file_path) + u': ') + process_fail_message), sickrage.srCore.srLogger.WARNING)
   result.missedfiles.append(((cur_video_file_path + u' : Processing failed: ') + process_fail_message))
   result.aggresult = False

def process_media ( processPath , videoFiles , nzbName , process_method , force , is_priority , result ) : processor = None for cur_video_file in videoFiles : cur_video_file_path = os . path . join ( processPath , cur_video_file ) if already_postprocessed ( processPath , cur_video_file , force , result ) : result . output += logHelper ( ( ( u'Already Processed ' + cur_video_file_path ) + u' : Skipping' ) , sickrage . srCore . srLogger . DEBUG ) continue try : processor = post_processor . PostProcessor ( cur_video_file_path , nzbName , process_method , is_priority ) result . result = processor . process process_fail_message = u'' except EpisodePostProcessingFailedException as e : result . result = False process_fail_message = e . message if processor : result . output += processor . log if result . result : result . output += logHelper ( ( u'Processing succeeded for ' + cur_video_file_path ) ) else : result . output += logHelper ( ( ( ( u'Processing failed for ' + cur_video_file_path ) + u': ' ) + process_fail_message ) , sickrage . srCore . srLogger . WARNING ) result . missedfiles . append ( ( ( cur_video_file_path + u' : Processing failed: ' ) + process_fail_message ) ) result . aggresult = False
postprocess mediafiles .