-
Notifications
You must be signed in to change notification settings - Fork 31
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
Comprehensive method to decide if an event has changed #586
Comments
Alternately, Opencast could add the LAST-MODIFIED field for each event, as from 4.0 on there is a new snapshot when the metadata is changed and the snapshot time is available. https://www.ietf.org/rfc/rfc2445.txt 4.8.7.3 Last Modified That would make the "has it changed" comparison very simple. |
@smarquard Yes to adding the LAST-MODIFIED field from Opencast, as that would fulfill all requirements easily. In the meantime, and for Opencast versions before the future change, we should probably improve the is_event_changed function to check all fields to solve the issue. Note: Relevant function at: Galicaster/galicaster/utils/ical.py Line 103 in 59de5b6
|
Some CAs like Galicaster look to see if an event has changed by comparing a cached copy of the ical with the ical fetched from the server (if a 200 response is received rather than not-modified). The CA then wants to know which events have been modified. As metadata could have changed inside one of the attachments (episode.xml, series.xml, etc.) it is hard for a CA to establish if a previously known event has been updated - see teltek/Galicaster#586 Adding the standard ical LAST-MODIFIED field can help CAs decide this quickly and efficiently. LAST-MODIFIED is defined here: https://www.ietf.org/rfc/rfc2445.txt 4.8.7.3 Last Modified Purpose: The property specifies the date and time that the information associated with the calendar component was last revised in the calendar store. and we can set this exactly by using the ArchivalDate field of the last version (snapshot) of the event in the asset manager when we construct the ical calendar. This is targeted at 4.x rather than 5.0 because it adds a standard iCal field and thus does not change the API in any way that would present any difficulties to current CAs, and helps to resolve an operational issue. The LAST-MODIFIED field is informational for the capture agent, and CAs are not required to use it.
Added opencast/opencast#101 for the Opencast change. |
If an iCal calendar has been modified, Galicaster checks through each event to see if it has changed.
The code to do this checks the ical fields DTSTART, DTEND, ORGANIZER, SUMMARY, RELATED-TO.
However, Opencast 4.x drops the ORGANIZER field because it appeared unnecessary and can cause parsing issues: MH-12631
As a result, if an event has only the presenter name changed on Opencast after initial scheduling, Galicaster fails to recognize that the event has changed.
There could in fact be changes in any of the attachments to the ical event (episode.xml, series.xml, org.opencastproject.capture.agent.properties).
So to reliably decide if an event has changed, Galicaster should compare all of these files as well (e.g. create an md5 for each and check if the signatures match). Or perhaps there's a way that the python ical library can help with the comparison.
The text was updated successfully, but these errors were encountered: