'Set random mode.
:class:`True`
Tracks are selected at random from the tracklist.
:class:`False`
Tracks are played in the order of the tracklist.'

def set_random(self, value):

    validation.check_boolean(value)
    if (self.get_random() != value):
        self._trigger_options_changed()
    if value:
        self._shuffled = self.get_tl_tracks()
        random.shuffle(self._shuffled)
    return setattr(self, u'_random', value)
