def process_ep(self, episode): # skip if there is already a cut list # if episode.cut_list_set.count(): # return self.cuts = mk_cuts(episode, start_slop=5, end_slop=11) print("self.cuts", self.cuts)
def get_context_data(self, **kwargs): episode = get_object_or_404(Episode, slug=kwargs.get('episode_slug'), show__slug=kwargs.get('show_slug')) edit_key = self._check_edit_key(episode) cuts = Cut_List.objects.filter(episode=episode ).order_by('raw_file__start', 'sequence', 'start') if not cuts: cuts = mk_cuts(episode) return self._context(episode, edit_key, EpisodeResolutionForm(instance=episode), self._cutlist_formset()(queryset=cuts))
def get_context_data(self, **kwargs): episode = get_object_or_404(Episode, slug=kwargs.get('episode_slug'), show__slug=kwargs.get('show_slug')) edit_key = self._check_edit_key(episode) cuts = Cut_List.objects.filter( episode=episode, raw_file__trash=False, ).order_by('raw_file__start', 'sequence', 'start') if not cuts: cuts = mk_cuts(episode) return self._context(episode, edit_key, EpisodeResolutionForm(instance=episode), self._cutlist_formset()(queryset=cuts))
def process_ep(self, episode): self.cuts = mk_cuts(episode)
def process_ep(self, episode): self.cuts = mk_cuts(episode) print "self.cuts", self.cuts