Example #1
0
    def cpl_find_pkl(self):
        """ Find PKL that reference the CPL. """
        for cpl in self._list_cpl:
            cpl_node = cpl['Info']['CompositionPlaylist']
            cpl_id = cpl_node['Id']

            for pkl in self._list_pkl:
                assets = list(list_pkl_assets(pkl))
                uuids = [asset_id for asset_id, _, _ in assets]

                if cpl_id in uuids:
                    cpl_node['PKLId'] = pkl['Info']['PackingList']['Id']
Example #2
0
    def run_checks(self):
        # Accumulate hash by UUID, useful for multi PKL package
        self.hash_map = {}

        for source in self.dcp._list_pkl:
            checks = self.find_check('pkl')
            [self.run_check(check, source, message=source['FileName'])
             for check in checks]

            asset_checks = self.find_check('assets_pkl')
            [self.run_check(
                check, source, asset, message="{} (Asset {})".format(
                    source['FileName'], asset[2].get('Path', asset[2]['Id'])))
             for asset in list_pkl_assets(source)
             for check in asset_checks]

        return self.check_executions
Example #3
0
    def run_checks(self):
        # Accumulate hash by UUID, useful for multi PKL package
        self.hash_map = {}

        for source in self.dcp._list_pkl:
            asset_stack = [source['FileName']]

            checks = self.find_check('pkl')
            [self.run_check(check, source, stack=asset_stack)
             for check in checks]

            asset_checks = self.find_check('assets_pkl')
            [self.run_check(check, source, asset,
             stack=asset_stack + [asset[2].get('Path', asset[2]['Id'])])
             for asset in list_pkl_assets(source)
             for check in asset_checks]

        return self.check_executions