Comprehensive method to decide if an event has changed
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.
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: https://github.com/teltek/Galicaster/blob/59de5b68d1d24ccaed100a7db76f55f570ff3c17/galicaster/utils/ical.py#L103
Added https://github.com/opencast/opencast/pull/101 for the Opencast change.