(self, tracks: typing.List[Track])
Associate the set of tracks with this poster.

        In addition to setting self.tracks, also compute the necessary attributes for the Poster
        based on this set of tracks.
Associate the set of tracks with this poster.
Associate the set of tracks with this poster .
def set_tracks(self, tracks: typing.List[Track]) -> None:
        """Associate the set of tracks with this poster.

        In addition to setting self.tracks, also compute the necessary attributes for the Poster
        based on this set of tracks.
        """
        self.tracks = tracks
        self.tracks_by_date.clear()
        self.length_range.clear()
        self.length_range_by_date.clear()
        self.year_tracks_date_count_dict.clear()
        self._compute_years(tracks)
        for track in tracks:
            if not self.years.contains(track.start_time()):
                continue
            text_date = track.start_time().strftime("%Y-%m-%d")
            year = track.start_time().year
            if text_date not in self.tracks_by_date:
                self.year_tracks_date_count_dict[year] += 1
            self.tracks_by_date[text_date].append(track)
            self.length_range.extend(track.length())
        for date_tracks in self.tracks_by_date.values():
            length = pint.quantity.Quantity(sum([t.length() for t in date_tracks]))
            self.length_range_by_date.extend(length)
def set_tracks ( self , tracks : typing . List [ Track ] ) -> None : self . tracks = tracks self . tracks_by_date . clear ( ) self . length_range . clear ( ) self . length_range_by_date . clear ( ) self . year_tracks_date_count_dict . clear ( ) self . _compute_years ( tracks ) for track in tracks : if not self . years . contains ( track . start_time ( ) ) : continue text_date = track . start_time ( ) . strftime ( "%Y-%m-%d" ) year = track . start_time ( ) . year if text_date not in self . tracks_by_date : self . year_tracks_date_count_dict [ year ] += 1 self . tracks_by_date [ text_date ] . append ( track ) self . length_range . extend ( track . length ( ) ) for date_tracks in self . tracks_by_date . values ( ) : length = pint . quantity . Quantity ( sum ( [ t . length ( ) for t in date_tracks ] ) ) self . length_range_by_date . extend ( length )