-
Notifications
You must be signed in to change notification settings - Fork 31
Description
Opencast 4.x introduces a split between dublin-core temporal metadata and scheduling metadata.
The rationale for this is to have descriptive metadata for the time of an event (say 6pm to 7pm), which could be different from the actual recording times (say 5:50pm to 7:30pm).
The descriptive metadata appears in the episode.xml as DC terms created and temporal:
<dcterms:created>2017-12-15T14:00:00.000Z</dcterms:created>
dcterms:temporal xsi:type="dcterms:Period">start=2017-12-15T14:00:00Z; end=2017-12-15T14:05:00Z; scheme=W3C-DTF;</dcterms:temporal>
The scheduling metadata appears in the iCal feed as DTSTART and DTEND
DTSTART:20171215T090000Z
DTEND:20171215T090500Z
Galicaster should only ever use the DTSTART and DTEND fields. It should ignore the dcterms:created and temporal fields.
In ./galicaster/mediapackage/mediapackage.py, the temporal data is parsed and used to update scheduling info:
# Parse temporal metadatum
if self.metadata_episode.has_key('temporal') and self.metadata_episode['temporal'] and not self.hasTracks():
try:
g = re.search('start=(.*); end=(.*); ', self.metadata_episode['temporal'])
start = parser.parse(g.group(1)).astimezone(tz.tzutc()).replace(tzinfo=None)
stop = parser.parse(g.group(2)).astimezone(tz.tzutc()).replace(tzinfo=None)
diff = stop - start
self.setDuration(diff.seconds*1000)
self.setDate(start)
except:
pass
This code should be removed as it can lead to Galicaster recording at the wrong times when the temporal and scheduling metadata are different.