(self)
Merges the episodes according to the groups
Merges the episodes according to the groups
Merges the episodes according to the groups
def merge_episodes(self):
        """Merges the episodes according to the groups"""

        for n, episodes in self.groups:
            if not episodes:
                continue

            episode_id = episodes.pop(0)
            episode = Episode.objects.get(pk=episode_id)
            logger.info("Merging %d episodes", len(episodes))

            eps = [Episode.objects.get(pk=eid) for eid in episodes]
            merge_model_objects(episode, eps)
def merge_episodes ( self ) : for n , episodes in self . groups : if not episodes : continue episode_id = episodes . pop ( 0 ) episode = Episode . objects . get ( pk = episode_id ) logger . info ( "Merging %d episodes" , len ( episodes ) ) eps = [ Episode . objects . get ( pk = eid ) for eid in episodes ] merge_model_objects ( episode , eps )