コード例 #1
0
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
コード例 #2
0
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
コード例 #3
0
ファイル: extract_clips.py プロジェクト: vaginessa/porntool
def ensureProperties(inventory):
    for fp in inventory:
        movie.updateMissingProperties(fp)
        yield fp