Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement protocol checks #70

Closed
criadoperez opened this issue Nov 13, 2024 · 9 comments
Closed

Implement protocol checks #70

criadoperez opened this issue Nov 13, 2024 · 9 comments

Comments

@criadoperez
Copy link
Contributor

criadoperez commented Nov 13, 2024

As defined on issue #37

Rewriting the checklist for ERN messages stated above (with the updates of current code):

The protocol should accept as a valid unique Record: an entry that consists of these fields in a unique combination of the following requirements:

XML file checks

CHECK 1. Message must comply with DDEX 4.3.

JSON file checks

CHECK 2. PartyID is whitelisted. // MOVED TO SLI LOGIC
CHECK 3. Check RightSharePercentage is between 0 an 100. Never negative or above 100. (Schema verifies only its a decimal value).
CHECK 4. Validate the following affiliation is specified PartyList:Party:Affiliation:Type:MusicLicensingCompany
CHECK 5. Validate the following rights type is specified: PartyList:Party:Affiliation:RightsType:MakeAvailableRight
CHECK 6 . Validate the ISRC is specified for each SoundRecording - SoundRecording:SoundRecordingEdition:ResourceId:{ISRC}. Also checks the format: ^[A-Za-z]{2}\w{3}\d{7}$ (see this comment for further details)
CHECK 7. SoundRecording must specify the Party which is specified as the MusicLicensingCompany as the rights controller
ResourceList:SoundRecording:ResourceRightsController:RightsControllerPartyReference
CHECK 8. Validate the type of rights controller for the SoundRecording: ResourceList:SoundRecording:ResourceRightsController:RightsControlType:RoyaltyAdministrator
CHECK 9 Ensure the territory is declared: ResourceList:SoundRecording:ResourceRightsController:TerritoryOfRightsDelegation
CHECK 10 Validate SoundRecording specifies at least one of the following usage types - ResourceList:SoundRecording:ResourceRightsController:DelegatedUsageRights:UseType:Stream
ResourceList:SoundRecording:ResourceRightsController:DelegatedUsageRights:UseType:PermanentDownload
ResourceList:SoundRecording:ResourceRightsController:DelegatedUsageRights:UseType:ConditionalDownload
ResourceList:SoundRecording:ResourceRightsController:DelegatedUsageRights:UseType:TetheredDownload
CHECK 11 . Verify that DealList:ReleaseDeal:Deal:DealTerms:TerritoryCode is same or minor (compatible) to PartyList:Affiliation:TerritoryCode of the ParyID of the Sender // DELAYED FOR LATER STAGE
CHECK 12 . DealList:ReleaseDeal:Deal:ValidityPeriod:EndDate can only exists if its equal or older than the date of tomorrow// DELAYED FOR LATER STAGE

Once all checkes passed:

  • All fields that are not specified in the ERN example will be removed.
@criadoperez criadoperez moved this to In Progress in Original Works Project Nov 13, 2024
@criadoperez criadoperez changed the title Implement PROTOCOL CHECKs Implement protocol checks Nov 13, 2024
@revelator-labs
Copy link
Collaborator

revelator-labs commented Dec 23, 2024

Check number 2 will be removed from this scope and added to the CLI tool business logic. - The requirement for whitelist validation has been moved to issue #76

@denciu
Copy link
Collaborator

denciu commented Dec 30, 2024

CHECK 6 . Validate the ISRC is specified for each SoundRecording - SoundRecording:SoundRecordingEdition:ResourceId:{ISRC}. Also checks its a 12 digit string

I believe that this validation is wrong. It should be CCXXXYYNNNNN where:
CC - 2 characters
XXX - 3 alphanumeric
YY - 2 digits
NNNNN - 5 digits

So validation would look like: ^[A-Za-z]{2}\w{3}\d{7}$

@revelator-labs
Copy link
Collaborator

Correct. The method @denciu suggests looks like the accurate check - https://isrc.ifpi.org/en/isrc-standard/structure
I am updating the description accordingly

@criadoperez
Copy link
Contributor Author

I also agree. This validation is more precise.

@revelator-labs
Copy link
Collaborator

revelator-labs commented Jan 9, 2025

Add fingerprint parameter check. If source is "OWEN*" then reject.

@denciu

@denciu
Copy link
Collaborator

denciu commented Jan 9, 2025

@revelator-labs @criadoperez Please review additional protocol checks:

  • ReleaseList::Release is required
  • ResourceList::SoundRecording[] has to contain at least one item
  • ReleaseId at least one of GRID/ICPN/PrioprietaryId needs to be specified. If ICPN is present, it needs to contain 8/12/13 digits

Regarding Fingerprint validation - let's implement it after we got ISCC generator implemented.

@revelator-labs
Copy link
Collaborator

revelator-labs commented Feb 17, 2025

Proposed updates after first batch from Revelator Pro

REMOVE CHECK 7. SoundRecording must specify the Party which is specified as the MusicLicensingCompany as the rights controller
ResourceList:SoundRecording:ResourceRightsController:RightsControllerPartyReference

UPDATE CHECK 8. Validate the type of rights controller for the SoundRecording of every soundRecording included in the message (i.e. if some are missing the check fails): ResourceList:SoundRecording:ResourceRightsController:RightsControlType: + RightsAdministrator or RightsController

@criadoperez
Copy link
Contributor Author

Rewriting the checklist for ERN messages stated above (with the updates of current code):

The protocol should accept as a valid unique Record: an entry that consists of these fields in a unique combination of the following requirements:

XML file checks

CHECK 1. Message must comply with DDEX 4.3.

JSON file checks

CHECK 2. PartyID is whitelisted. // MOVED TO SLI LOGIC
CHECK 3. Check RightSharePercentage is between 0 an 100. Never negative or above 100. (Schema verifies only its a decimal value).
CHECK 4. Validate the following affiliation is specified PartyList:Party:Affiliation:Type:MusicLicensingCompany
CHECK 5. Validate the following rights type is specified: PartyList:Party:Affiliation:RightsType:MakeAvailableRight
CHECK 6 . Validate the ISRC is specified for each SoundRecording - SoundRecording:SoundRecordingEdition:ResourceId:{ISRC}. Also checks the format: ^[A-Za-z]{2}\w{3}\d{7}$ (see this comment for further details)
CHECK 8. Validate the type of rights controller for the SoundRecording: ResourceList:SoundRecording:ResourceRightsController:RightsControlType: has to be either RightsAdministrator or RightsController
CHECK 9 Ensure the territory is declared: ResourceList:SoundRecording:ResourceRightsController:TerritoryOfRightsDelegation
CHECK 10 Validate SoundRecording specifies at least one of the following usage types - ResourceList:SoundRecording:ResourceRightsController:DelegatedUsageRights:UseType:Stream
ResourceList:SoundRecording:ResourceRightsController:DelegatedUsageRights:UseType:PermanentDownload
ResourceList:SoundRecording:ResourceRightsController:DelegatedUsageRights:UseType:ConditionalDownload
ResourceList:SoundRecording:ResourceRightsController:DelegatedUsageRights:UseType:TetheredDownload
CHECK 11 . Verify that DealList:ReleaseDeal:Deal:DealTerms:TerritoryCode is same or minor (compatible) to PartyList:Affiliation:TerritoryCode of the ParyID of the Sender // DELAYED FOR LATER STAGE
CHECK 12 . DealList:ReleaseDeal:Deal:ValidityPeriod:EndDate can only exists if its equal or older than the date of tomorrow// DELAYED FOR LATER STAGE

Once all checkes passed:

  • All fields that are not specified in the ERN example will be removed.

@criadoperez
Copy link
Contributor Author

Closing this issue as completed. Any new changes on added checks should be on different issues.
Pending to keep this list updated on the official documentation docs.original.works

@criadoperez criadoperez moved this from In Progress to Done in Original Works Project Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

3 participants