def skip_itunes_files(files): """ Skip files that were bought on iTunes. """ files_to_process = [] for f in files: fileinfo = get_info(f) if fileinfo is None: exit("AtomicParsley is not able read the metadata of '%s'. Is this a valid .m4a file?" % f) if 'Atom "flvr" contains:' in fileinfo or 'Atom "xid " contains:' in fileinfo: print_file_result(f, 'iTunes purchased song -> skip') else: files_to_process.append(f) return files_to_process
def print_file_infos(files): for f in files: print_file_result(f, get_info(f))