def __init__(self, mpc): self.mpc = mpc super(DaemonFlags, self).__init__('') signals.listen('idle_options', self._options_update) signals.listen('idle_update', self._options_update) self._flags = self._get_flags() self._render_flags()
def __init__(self, mpc): self.mpc = mpc ignore_leading_the = config.format.library.ignore_leading_the if configuration.truthiness(ignore_leading_the): def sort(artist): artist = artist.lower() if artist.startswith('the '): return artist[4:] return artist self._sort = sort else: self._sort = lambda artist: artist.lower() super(ArtistWalker, self).__init__() signals.listen('idle_database', self._reload)
def __init__(self, mpc): self.mpc = mpc notifications = urwid.Text('') progress = CurrentSongProgress(mpc, 'footer.progress', 'footer.progress.elapsed', satt='footer.progress.smoothed') search_bar = SearchInput() widgets = {'progress_bar': progress, 'notification_bar': notifications, 'search_bar': search_bar} super(MainFooter, self).__init__(widgets, 'progress_bar') signals.listen('user_notification', self.notify) signals.listen('idle_update', self._notify_update) signals.listen('idle_playlist', self._playlist_update) signals.listen('search_begin', self._search_begin)
def __init__(self, mpc): self.mpc = mpc notifications = urwid.Text('') progress = CurrentSongProgress(mpc, 'footer.progress', 'footer.progress.elapsed', satt='footer.progress.smoothed') search_bar = SearchInput() widgets = { 'progress_bar': progress, 'notification_bar': notifications, 'search_bar': search_bar } super(MainFooter, self).__init__(widgets, 'progress_bar') signals.listen('user_notification', self.notify) signals.listen('idle_update', self._notify_update) signals.listen('idle_playlist', self._playlist_update) signals.listen('search_begin', self._search_begin)
def __init__(self, mpc, *args, **kwargs): super(CurrentSongProgress, self).__init__(*args, **kwargs) self.mpc = mpc signals.listen('idle_player', self._player_update) self._player_update()
def __init__(self, mpc): self.mpc = mpc super(CurrentSong, self).__init__('', wrap='clip') signals.listen('idle_player', self._player_update) self._player_update()
def __init__(self, mpc): self.mpc = mpc super(NowPlayingWalker, self).__init__() signals.listen('idle_playlist', self._reload)