Ejemplo n.º 1
0
 def __init__(self, size, base_size, manager, fonts):
     BaseScreen.__init__(self, size, base_size, manager, fonts)
     self.size = size
     self.base_size = base_size
     self.manager = manager
     self.screen_objects = ScreenObjectsManager()
     self.track_view = ListView((0, self.base_size), (
         self.size[0], self.size[1] -
         2*self.base_size), self.base_size, self.fonts['small'], "tracklist")
     self.tracks = []
     self.tracks_strings = []
     self.update_list()
     self.track_started(
         self.manager.core.playback.current_tl_track.get())
     self.top_bar = pygame.Surface(
         (self.size[0], self.base_size),
         pygame.SRCALPHA)
     self.top_bar.fill((0, 0, 0, 128))
     self.current_track = None
     
     text = TouchAndTextItem(self.fonts['base'], "Kommende Titel", (0, 0),
                             (self.size[0], self.base_size), center=True)
     self.screen_objects.set_touch_object("title", text)
     
     print('Tracklist')
Ejemplo n.º 2
0
    def __init__(self, size, base_size, manager, fonts):
        BaseScreen.__init__(self, size, base_size, manager, fonts)
        self.list_view = ListView((0, self.base_size*2), (
            self.size[0], self.size[1] -
            3*self.base_size), self.base_size, manager.fonts['base'])
        self.results_strings = []
        self.results = []
        self.screen_objects = ScreenObjectsManager()
        self.query = ""

        # Search button
        button = TouchAndTextItem(self.fonts['icon'], u" \ue986",
                                  (0, self.base_size),
                                  None, center=True)
        self.screen_objects.set_touch_object(
            "search", button)

        x = button.get_right_pos()

        # Query text
        text = TouchAndTextItem(self.fonts['base'], self.query, (0, 0),
                                (self.size[0], self.base_size), center=True)
        self.screen_objects.set_touch_object("query", text)

        # Mode buttons
        button_size = ((self.size[0]-x)/3, self.base_size)
        self.mode_objects_keys = ["mode_track", "mode_album",
                                  "mode_artist"]

        # Track button
        button = TouchAndTextItem(self.fonts['base'], "Track",
                                  (x, self.base_size),
                                  (button_size[0], self.base_size),
                                  center=True)
        self.screen_objects.set_touch_object(
            self.mode_objects_keys[0], button)

        # Album button
        button = TouchAndTextItem(self.fonts['base'], "Album",
                                  (button_size[0]+x, self.base_size),
                                  button_size, center=True)
        self.screen_objects.set_touch_object(
            self.mode_objects_keys[1], button)

        # Artist button
        button = TouchAndTextItem(self.fonts['base'], "Artist",
                                  (button_size[0]*2+x, self.base_size),
                                  button_size, center=True)
        self.screen_objects.set_touch_object(
            self.mode_objects_keys[2], button)

        # Top Bar
        self.top_bar = pygame.Surface(
            (self.size[0], self.base_size * 2),
            pygame.SRCALPHA)
        self.top_bar.fill((0, 0, 0, 128))
        self.mode = -1
        self.set_mode(mode=mode_track_name)
        self.set_query("Search")
Ejemplo n.º 3
0
 def __init__(self, size, base_size, manager, fonts):
     BaseScreen.__init__(self, size, base_size, manager, fonts)
     self.list_view = ListView(
         (0, 0), (self.size[0], self.size[1] - self.base_size),
         self.base_size, self.fonts['base'])
     self.directory_list = []
     self.current_directory = None
     self.library = None
     self.library_strings = None
     self.browse_uri(None)
Ejemplo n.º 4
0
 def __init__(self, size, base_size, manager, fonts):
     BaseScreen.__init__(self, size, base_size, manager, fonts)
     self.list_view = ListView((0, 0), (
         self.size[0], self.size[1] -
         self.base_size), self.base_size, self.fonts['base'])
     self.directory_list = []
     self.current_directory = None
     self.library = None
     self.library_strings = None
     self.browse_uri(None)
Ejemplo n.º 5
0
    def __init__(self, size, base_size, manager, fonts, core):
        BaseScreen.__init__(self, size, base_size, manager, fonts)
        self.ip = None
        self.core = core
        self.list = ListView((0, 0), (size[0], size[1]-base_size),
                             base_size, fonts['base'])

        self.list_items = ["Random", "Repeat", "Single", "Consume",
                           "Exit Mopidy", "Shutdown", "Restart", "IP: "]

        self.list.set_list(self.list_items)
Ejemplo n.º 6
0
 def __init__(self, size, base_size, manager, fonts):
     BaseScreen.__init__(self, size, base_size, manager, fonts)
     self.list_view = ListView((0, 0), (
         self.size[0], self.size[1] -
         self.base_size), self.base_size, self.fonts['icon'], "list")
     self.directory_list = []
     self.current_directory = 'local:directory'
     self.library = None
     self.library_strings = None
     self.browse_uri('local:directory')
     print('Library Screen')
Ejemplo n.º 7
0
 def __init__(self, size, base_size, manager, fonts):
     BaseScreen.__init__(self, size, base_size, manager, fonts)
     self.list_view = ListView((0, 0), (
         self.size[0], self.size[1] -
         self.base_size), self.base_size,
         self.fonts['base'])
     self.playlists_strings = []
     self.playlists = []
     self.selected_playlist = None
     self.playlist_tracks = []
     self.playlist_tracks_strings = []
     self.playlists_loaded()
Ejemplo n.º 8
0
 def __init__(self, size, base_size, manager, fonts):
     BaseScreen.__init__(self, size, base_size, manager, fonts)
     self.size = size
     self.base_size = base_size
     self.manager = manager
     self.list_view = ListView(
         (0, 0), (self.size[0], self.size[1] - self.base_size),
         self.base_size, self.fonts['base'])
     self.tracks = []
     self.tracks_strings = []
     self.update_list()
     self.track_started(self.manager.core.playback.current_tl_track.get())
Ejemplo n.º 9
0
    def __init__(self, size, base_size, manager, fonts, core):
        BaseScreen.__init__(self, size, base_size, manager, fonts)
        self.ip = None
        self.core = core
        self.list = ListView((0, 0), (size[0], size[1] - base_size), base_size,
                             fonts['base'])

        self.list_items = [
            "Random", "Repeat", "Single", "Consume", "Exit Mopidy", "Shutdown",
            "Restart", "IP: "
        ]

        self.list.set_list(self.list_items)
Ejemplo n.º 10
0
 def __init__(self, size, base_size, manager, fonts):
     BaseScreen.__init__(self, size, base_size, manager, fonts)
     self.size = size
     self.base_size = base_size
     self.manager = manager
     self.list_view = ListView((0, 0), (
         self.size[0], self.size[1] -
         self.base_size), self.base_size, self.fonts['base'])
     self.tracks = []
     self.tracks_strings = []
     self.update_list()
     self.track_started(
         self.manager.core.playback.current_tl_track.get())
Ejemplo n.º 11
0
    def __init__(self, size, base_size, manager, fonts, core):
        BaseScreen.__init__(self, size, base_size, manager, fonts)
        self.ip = None
        self.core = core
        self.image = None
        self.size = size
        self.base_size = base_size
        
        #self.list = ListView((0, 0), (size[0], size[1]-base_size),
                            # base_size, fonts['base'], "list")

        #self.list_items = [u"Zuf\xe4llige Wiedergabe", "Titel wiederholen", "Einzelne Titel spilene", "Gespielte Titel entfernen",
                          # "Musikbox schliessen", "Ausschalten", "Neustart", "IP: "]

        #self.list.set_list(self.list_items)
        self.core.tracklist.set_consume(True)
        self.core.tracklist.set_repeat(True)
        self.load_image()
        print('Menu Screen')
Ejemplo n.º 12
0
    def __init__(self, size, base_size, manager, fonts, cache, core,
                 background):
        BaseScreen.__init__(self, size, base_size, manager, fonts)
        self.core = core
        self.track = None
        self.cache = cache
        self.image = None
        self.artists = None
        self.update_next_frame = True
        self.background = background
        self.update_keys = []
        self.current_track_pos = 0
        self.track_duration = "00:00"
        self.touch_text_manager = ScreenObjectsManager()
        current_track = self.core.playback.current_track.get()
        if current_track is None:
            self.track_playback_ended(None, None)
        else:
            self.track_started(current_track)

        # Top bar
        self.top_bar = pygame.Surface((self.size[0], self.base_size),
                                      pygame.SRCALPHA)
        self.top_bar.fill((0, 0, 0, 128))

        # Play/pause
        button = TouchAndTextItem(self.fonts['icon'], u"\ue615 ",
                                  (0, 0), None)
        self.touch_text_manager.set_touch_object("pause_play", button)
        x = button.get_right_pos()

        # Mute
        button = TouchAndTextItem(self.fonts['icon'], u"\ue61f ",
                                  (x, 0), None)
        self.touch_text_manager.set_touch_object("mute", button)
        x = button.get_right_pos()

        # Volume
        progress = Progressbar(self.fonts['base'], "100", (x, 0),
                               (self.size[0] - x, self.base_size),
                               100, True)
        self.touch_text_manager.set_touch_object("volume", progress)
        progress.set_value(self.core.playback.volume.get())
Ejemplo n.º 13
0
    def __init__(self, size, base_size, manager, fonts, cache, core,
                 background):
        BaseScreen.__init__(self, size, base_size, manager, fonts)
        self.core = core
        self.track = None
        self.cache = cache
        self.image = None
        self.artists = None
        self.update_next_frame = True
        self.background = background
        self.update_keys = []
        self.current_track_pos = 0
        self.track_duration = "00:00"
        self.touch_text_manager = ScreenObjectsManager()
        current_track = self.core.playback.current_track.get()
        if current_track is None:
            self.track_playback_ended(None, None)
        else:
            self.track_started(current_track)

        # Top bar
        self.top_bar = pygame.Surface((self.size[0], self.base_size),
                                      pygame.SRCALPHA)
        self.top_bar.fill((0, 0, 0, 128))

        # Play/pause
        button = TouchAndTextItem(self.fonts['icon'], u"\ue615 ", (0, 0), None)
        self.touch_text_manager.set_touch_object("pause_play", button)
        x = button.get_right_pos()

        # Mute
        button = TouchAndTextItem(self.fonts['icon'], u"\ue61f ", (x, 0), None)
        self.touch_text_manager.set_touch_object("mute", button)
        x = button.get_right_pos()

        # Volume
        progress = Progressbar(self.fonts['base'], "100", (x, 0),
                               (self.size[0] - x, self.base_size), 100, True)
        self.touch_text_manager.set_touch_object("volume", progress)
        progress.set_value(self.core.playback.volume.get())
Ejemplo n.º 14
0
    def __init__(self, root_console):
        BaseScreen.__init__(self, root_console)

        logging.debug("%s initialized" % self.__class__.__name__) 
Ejemplo n.º 15
0
    def __init__(self, size, base_size, manager, fonts):
        BaseScreen.__init__(self, size, base_size, manager, fonts)
        self.list_view = ListView(
            (0, self.base_size * 2),
            (self.size[0], self.size[1] - 3 * self.base_size), self.base_size,
            manager.fonts['base'])
        self.results_strings = []
        self.results = []
        self.screen_objects = ScreenObjectsManager()
        self.query = ""

        # Search button
        button = TouchAndTextItem(self.fonts['icon'],
                                  u" \ue986", (0, self.base_size),
                                  None,
                                  center=True)
        self.screen_objects.set_touch_object("search", button)

        x = button.get_right_pos()

        # Query text
        text = TouchAndTextItem(self.fonts['base'],
                                self.query, (0, 0),
                                (self.size[0], self.base_size),
                                center=True)
        self.screen_objects.set_touch_object("query", text)

        # Mode buttons
        button_size = ((self.size[0] - x) / 3, self.base_size)
        self.mode_objects_keys = ["mode_track", "mode_album", "mode_artist"]

        # Track button
        button = TouchAndTextItem(self.fonts['base'],
                                  "Track", (x, self.base_size),
                                  (button_size[0], self.base_size),
                                  center=True)
        self.screen_objects.set_touch_object(self.mode_objects_keys[0], button)

        # Album button
        button = TouchAndTextItem(self.fonts['base'],
                                  "Album",
                                  (button_size[0] + x, self.base_size),
                                  button_size,
                                  center=True)
        self.screen_objects.set_touch_object(self.mode_objects_keys[1], button)

        # Artist button
        button = TouchAndTextItem(self.fonts['base'],
                                  "Artist",
                                  (button_size[0] * 2 + x, self.base_size),
                                  button_size,
                                  center=True)
        self.screen_objects.set_touch_object(self.mode_objects_keys[2], button)

        # Top Bar
        self.top_bar = pygame.Surface((self.size[0], self.base_size * 2),
                                      pygame.SRCALPHA)
        self.top_bar.fill((0, 0, 0, 128))
        self.mode = -1
        self.set_mode(mode=mode_track_name)
        self.set_query("Search")