def inventoryFilter(inventory): # a function for filters specific to this script # that aren't worth adding to filter module for fp in inventory: # if fp.path.find('empornium') >= 0: # continue logger.debug('Checking %s', fp) # if os.path.splitext(fp.path)[1] != '.mp4': # logger.debug('Skipping %s: not an mp4 file', fp) # continue # if is1080(fp): # logger.debug('Skipping %s: too high def', fp) # continue # a bit of a hack, sorry try: movie.updateMissingProperties(fp) except: logger.exception('Skipping %s. Failed to update properties.', fp) continue yield fp
def ensureProperties(inventory): for fp in inventory: movie.updateMissingProperties(fp) yield fp