feat: add CRID as Identifikationsnummer #185
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds an "Identifikationsnummer" field that is both required and very loosely defined in Gemeinsamer Tarif S.
The ID we use is based on crid-spec (RABE-CRID) but it adds the
acrid
from ACR Cloud to the media fragment part of the URLs. The actual implementation is based on rabe-cridlib which, under the hood, calls our archive to generate theshow
part of a RABE-CRID.Here are some examples of what it generates for Nov 2022:
The RABE-CRIDs have the following structure:
crid://rabe.ch/v1/<show>#t=clock=<timestamp>&acrid=<id-from-acr>
The
acrid
part is an extension to the RABE-CRID standard and there for our convenience since they tells us where the actual data is from.I tested the implementation against some time ranges that i know contain some
custom_file
metadata as well as the last month and didn't unearth any issues in several runs. The main question that remains is if we need to talk to SUISA before we add this additional field, but i'm tending to answer that with a clear no because the worst they can do is not rebate our bill and they have been doing that this year already while not providing us any specific feedback.FAQ
Q: Bicku, isn't the CRID thing overengineered?
A: For sure
Q: But, why?
A: CRIDs are both in radioplayer and in RadioEPG. Using the same standard allows us to reference several ETSI and RFC standards for great win.