Skip to content

Commit

Permalink
Revert "OPENCAST-1931 UCT fix for Galicaster issue teltek#567"
Browse files Browse the repository at this point in the history
This reverts commit 18098c9.
  • Loading branch information
smarquard committed Jan 11, 2018
1 parent 18098c9 commit 7ff6273
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions galicaster/mediapackage/mediapackage.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -1484,6 +1484,18 @@ def marshalDublincore(self):
for name in SERIES_TERMS:
self.metadata_series[name] = _checknget(dom, "dcterms:" + name)

# 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

#FIXME merge with add
def addAttachmentAsString(self, content, name=None, identifier=None):
"""Adds the information of an attachment in a file.
Expand Down

0 comments on commit 7ff6273

Please sign in to comment.