def _process_postponed(self, processor, path, video, ignore_subs): if not ignore_subs: if self.subtitles_enabled(path, self.resource_name): embedded_subs = set() if app.IGNORE_EMBEDDED_SUBS else get_embedded_subtitles(path) # We want to ignore embedded subtitles and video has at least one if accept_unknown(embedded_subs): self.log_and_output("Found embedded unknown subtitles and we don't want to ignore them. " 'Continuing the post-processing of this file: {video}', **{'video': video}) elif accept_any(embedded_subs): self.log_and_output('Found wanted embedded subtitles. ' 'Continuing the post-processing of this file: {video}', **{'video': video}) else: associated_subs = processor.list_associated_files(path, subtitles_only=True) if not associated_subs: self.log_and_output('No subtitles associated. Postponing the post-processing of this file: {video}', level=logging.DEBUG, **{'video': video}) self.postpone_processing = True self.postpone_any = True return False else: self.log_and_output('Found associated subtitles. ' 'Continuing the post-processing of this file: {video}', **{'video': video}) else: self.log_and_output('Subtitles disabled for this show. ' 'Continuing the post-processing of this file: {video}', **{'video': video}) else: self.log_and_output('Subtitles check was disabled for this episode in manual post-processing. ' 'Continuing the post-processing of this file: {video}', **{'video': video}) return True
def _process_postponed(self, processor, path, video, ignore_subs): if not ignore_subs: if self.subtitles_enabled(path, self.resource_name): embedded_subs = set() if app.IGNORE_EMBEDDED_SUBS else get_embedded_subtitles(path) # We want to ignore embedded subtitles and video has at least one if accept_unknown(embedded_subs): self.log("Found embedded unknown subtitles and we don't want to ignore them. " 'Continuing the post-processing of this file: {0}'.format(video)) elif accept_any(embedded_subs): self.log('Found wanted embedded subtitles. ' 'Continuing the post-processing of this file: {0}'.format(video)) else: associated_subs = processor.list_associated_files(path, subtitles_only=True) if not associated_subs: self.log('No subtitles associated. Postponing the post-processing of this file: ' '{0}'.format(video), logger.DEBUG) self.postpone_processing = True return False else: self.log('Found associated subtitles. ' 'Continuing the post-processing of this file: {0}'.format(video)) else: self.log('Subtitles disabled for this show. ' 'Continuing the post-processing of this file: {0}'.format(video)) else: self.log('Subtitles check was disabled for this episode in manual post-processing. ' 'Continuing the post-processing of this file: {0}'.format(video)) return True