Exemple #1
0
 def duration(self):
     return minsec(ytapi(self.video_id))
Exemple #2
0
 def duration(self):
     obj = Module.objects.get(id=self.id)
     videos = [ytapi(i.video_id) for i in obj.lesson_set.all()]
     return minsec(list(itertools.accumulate(videos))[-1])