Skip to content

Commit

Permalink
Merge pull request #90 from remia/fix/multi_cpl
Browse files Browse the repository at this point in the history
Multi CPLs package completeness check
  • Loading branch information
remia authored Apr 4, 2019
2 parents 7f6b83f + 17ea443 commit 5ba1c76
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 0 additions & 2 deletions clairmeta/dcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,6 @@ def cpl_find_pkl(self):

def cpl_link_assets(self):
""" Link assets for each reel with actual files in the package. """
# TODO : For Multi CPL package, what to choose if there are both
# OV / VF?
self.package_type = 'OV'

for cpl in self._list_cpl:
Expand Down
14 changes: 13 additions & 1 deletion clairmeta/dcp_check_cpl.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,19 @@ def check_assets_cpl_missing_from_vf(self, playlist, asset):
is_relinked_from_ov = 'Probe' in asset

if is_vf_asset and not is_relinked_from_ov:
raise CheckException("Asset reference OV package")
raise CheckException("Asset missing, external reference")

def check_assets_cpl_missing_from_multi_cpl(self, playlist, asset):
""" Multi CPL package must be self contained. """
_, asset = asset
uuid = asset['Id']
is_found = uuid in self.dcp._list_asset

if len(self.dcp.list_cpl) == 1:
return

if not is_found:
raise CheckException("Asset missing, multi CPL must be complete")

def check_assets_cpl_labels(self, playlist, asset):
""" CPL assets labels check. """
Expand Down

0 comments on commit 5ba1c76

Please sign in to comment.