summary, duration
This commit is contained in:
parent
d314ceb7ae
commit
fd26a15db8
3 changed files with 4 additions and 1 deletions
|
@ -26,6 +26,7 @@
|
|||
</div>
|
||||
<video src="{{ settings.TIMELINE_PREFIX }}{{ film.padma_id }}/loop.mp4" autoplay loop muted></video>
|
||||
<p>{{ film.data.summary|safe }}</p>
|
||||
<p>{{ film.data.summary_zh|safe }}</p>
|
||||
<div class="bio">
|
||||
<div class="en">
|
||||
{{film.data.director.0}}: {{ film.data.bio|safe }}
|
||||
|
|
|
@ -29,6 +29,8 @@ class Command(BaseCommand):
|
|||
for key, value in item.items():
|
||||
if key == 'title':
|
||||
f.data['title'], f.data['title_zh'] = value.split(' / ', 1)
|
||||
elif key == 'summary':
|
||||
f.data['summary'], f.data['summary_zh'] = value.split('<br><br>', 1)
|
||||
elif key == 'sourcedescription':
|
||||
if '<br><br>' in value:
|
||||
f.data['bio'], f.data['bio_zh'] = value.split('<br><br>', 1)
|
||||
|
|
|
@ -35,7 +35,7 @@ class Film(models.Model):
|
|||
return Text.objects.filter(data__item=self.padma_id)
|
||||
|
||||
def duration(self):
|
||||
return ox.format_timecode(self.data['duration'])[:-4]
|
||||
return ox.format_duration(self.data['duration'] * 1000, verbosity=1, milliseconds=False)
|
||||
|
||||
def color_1(self):
|
||||
hue = self.data['hue']
|
||||
|
|
Loading…
Reference in a new issue