Exemplo n.º 1
0
 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()
Exemplo n.º 2
0
	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()
Exemplo n.º 3
0
	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)
Exemplo n.º 4
0
    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)
Exemplo n.º 5
0
	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)
Exemplo n.º 6
0
    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)
Exemplo n.º 7
0
	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()
Exemplo n.º 8
0
	def __init__(self, mpc):
		self.mpc = mpc
		super(CurrentSong, self).__init__('', wrap='clip')
		signals.listen('idle_player', self._player_update)
		self._player_update()
Exemplo n.º 9
0
 def __init__(self, mpc):
     self.mpc = mpc
     super(NowPlayingWalker, self).__init__()
     signals.listen('idle_playlist', self._reload)
Exemplo n.º 10
0
 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()
Exemplo n.º 11
0
 def __init__(self, mpc):
     self.mpc = mpc
     super(CurrentSong, self).__init__('', wrap='clip')
     signals.listen('idle_player', self._player_update)
     self._player_update()
Exemplo n.º 12
0
	def __init__(self, mpc):
		self.mpc = mpc
		super(NowPlayingWalker, self).__init__()
		signals.listen('idle_playlist', self._reload)