Example #1
0
 def show_musics(self, searchByType, keyword, page):
     self.searchTable.clear_search_table()
     songs, hit = SearchOnline.search_songs(searchByType, keyword, page)
     if hit == Configures.UrlError:
         return Configures.UrlError
     if not songs or hit == 0:
         return hit
     for song in songs:
         music = song[0]
         artist = song[1]
         album = song[2]
         if not album:
             album = '未知专辑'
         music_id = song[3]
         #            artistId = song['ARTISTID']
         score = song[4]
         self.searchTable.add_record(score, music, artist, album, music_id)
         self.searchTable.sortItems(0, Qt.DescendingOrder)
     return hit
Example #2
0
    def show_musics(self, searchByType, keyword, page):    
        self.searchTable.clear_search_table()
        songs, hit = SearchOnline.search_songs(searchByType, keyword, page)
        if hit == Configures.UrlError:
            return Configures.UrlError
        if not songs or hit == 0:
            return hit
        for song in songs:
            music = song[0]
            artist = song[1]
            album = song[2] 
            if not album:
                album = '未知专辑'
            music_id = song[3]
#            artistId = song['ARTISTID']
            score = song[4]
            self.searchTable.add_record(score, music, artist, album, music_id)
            self.searchTable.sortItems(0, Qt.DescendingOrder)
        return hit