| | 2 | |
| | 3 | Edit: no, sorry, I was wrong. It looks like I had already hacked in a workaround for this issue on my instance. When I tried again from master, the file failed to process. Here's the change I'm running in my modified instance. |
| | 4 | |
| | 5 | {{{ |
| | 6 | --- mediagoblin/media_types/video/processing.py |
| | 7 | +++ mediagoblin/media_types/video/processing-modified.py |
| | 8 | @@ -116,10 +116,13 @@ |
| | 9 | # TODO: handle timezone info; gst.get_time_zone_offset + |
| | 10 | # python's tzinfo should help |
| | 11 | dt = tags['datetime'] |
| | 12 | - tags['datetime'] = datetime.datetime( |
| | 13 | - dt.get_year(), dt.get_month(), dt.get_day(), dt.get_hour(), |
| | 14 | - dt.get_minute(), dt.get_second(), |
| | 15 | - dt.get_microsecond()).isoformat() |
| | 16 | + try: |
| | 17 | + tags['datetime'] = datetime.datetime( |
| | 18 | + dt.get_year(), dt.get_month(), dt.get_day(), dt.get_hour(), |
| | 19 | + dt.get_minute(), dt.get_second(), |
| | 20 | + dt.get_microsecond()).isoformat() |
| | 21 | + except: |
| | 22 | + tags['datetime'] = None |
| | 23 | for k, v in tags.copy().items(): |
| | 24 | # types below are accepted by json; others must not present |
| | 25 | if not isinstance(v, (dict, list, six.string_types, int, float, bool, |
| | 26 | }}} |