Exemple #1
0
    def getArtistTop(self):
        if self.track_list != None:
            while self.country_id == None: #TODO: Ensure Valid Country Country Code
                curses.curs_set(2)

                self.input_prompt.addstr(0, 0, "Country:")
                self.input_prompt.refresh()
                self.search_window.clear()
                self.country_id = self.input_buffer.edit().split()[0]


                self.input_prompt.clear() #TODO: Bundle all these clear and refreshes into methods
                self.input_prompt.refresh()
                self.search_window.clear()
                self.search_window.refresh()

                curses.curs_set(0)

            track = self.track_list[self.curr_position - self.track_start]
            artist_name = track[2]
            artist_id = track[7]
            artist_uri = track[6]

            self.track_list = requester.get_artist_top(artist_name, artist_id, artist_uri, self.country_id)
            self.curr_position = self.track_start
            self.drawTrackList()
Exemple #2
0
    def get_artist_top(self):
        if self.track_list != None:
            track = self.track_list[self.curr_position - self.track_start]
            artist_name = track[2]
            artist_id = track[7]
            artist_uri = track[6]

            if not self.track_history or self.track_list != self.track_history[-1] and self.track_list:
                self.track_history.append(self.track_list)

            self.track_list = requester.get_artist_top(artist_name, artist_id, artist_uri, self.country_id)
            self.curr_position = self.track_start
            self.draw_track_list()
Exemple #3
0
    def get_artist_top(self):
        """Display the top tracks (according to Spotify) by the artist of the currently selected track."""
        if self.track_list != None:
            track = self.track_list[self.curr_position - self.track_start]
            artist_name = track[2]
            artist_id = track[7]
            artist_uri = track[6]

            if not self.back_track_history or self.track_list != self.back_track_history[-1] and self.track_list:
                self.forward_track_history = []
                self.back_track_history.append(self.track_list)

            self.track_list = requester.get_artist_top(artist_name, artist_id, artist_uri, self.country_id)
            self.curr_position = self.track_start
            self.draw_track_list()
Exemple #4
0
    def get_artist_top(self):
        if self.track_list != None:
            track = self.track_list[self.curr_position - self.track_start]
            artist_name = track[2]
            artist_id = track[7]
            artist_uri = track[6]

            if not self.back_track_history or self.track_list != self.back_track_history[
                    -1] and self.track_list:
                self.forward_track_history = []
                self.back_track_history.append(self.track_list)

            self.track_list = requester.get_artist_top(artist_name, artist_id,
                                                       artist_uri,
                                                       self.country_id)
            self.curr_position = self.track_start
            self.draw_track_list()
Exemple #5
0
    def get_artist_top(self):
        """Display the top tracks (according to Spotify) by the artist of the currently selected track."""
        if self.track_list != None:
            track = self.track_list[self.curr_position - self.track_start]
            artist_name = track[2]
            artist_id = track[7]
            artist_uri = track[6]

            if not self.back_track_history or self.track_list != self.back_track_history[
                    -1] and self.track_list:
                self.forward_track_history = []
                self.back_track_history.append(self.track_list)

            self.track_list = requester.get_artist_top(artist_name, artist_id,
                                                       artist_uri,
                                                       self.country_id)
            self.curr_position = self.track_start
            self.draw_track_list()