INNER CODE UNIT · Python
check_unconverted
miztiik/AWS-Demos · how-to-examples/iam-s3-sqs-sns-video-transcoder.py:237
def check_unconverted(self):
"""
Get a list of files that are present in the unconverted directory
but not present in the converted directory. These are the files
that should be uploaded and transcoded.
If no files are present then an empty set is returned.
"""
current_files = set(self.collect_files())
if not current_files:
return set()
# Check the new set against the old, returning only new files not found
# in the old set.
return current_files.difference(self.existing_files)
def start_converting(self, files_found):