Beispiel #1
0
 def run(self):
     i = 0
     cnt = len(self.list)
     while i < cnt and self.runPermit:
         title = self.list[i][0]
         print('开始下载及歌手信息:%s' % title)
         try:
             artist = title.split(Configures.Hyphen)[0].strip()
             SearchOnline.get_artist_image_path(artist)
         except:
             pass
         musicId = self.list[i][1]
         lrcPath = composite_lyric_path_use_title(title)
         if not os.path.exists(lrcPath):
             SearchOnline.get_lrc_contents(title, musicId)
         i += 1
Beispiel #2
0
 def run(self):
     i = 0
     cnt = len(self.list)
     while i < cnt and self.runPermit:
         title = self.list[i][0]
         print('开始下载及歌手信息:%s'%title)
         try:
             artist = title.split(Configures.Hyphen)[0].strip()
             SearchOnline.get_artist_image_path(artist)
         except:
             pass
         musicId = self.list[i][1]
         lrcPath = composite_lyric_path_use_title(title)
         if not os.path.exists(lrcPath):
             SearchOnline.get_lrc_contents(title, musicId)
         i  += 1
 def update_parameters(self):
     self.currentSourceRow = self.playlist.get_current_row()
     self.musicTitleLabel.setText(self.title)
     self.playAction.setText(self.musicName)
     imagePath = SearchOnline.get_artist_image_path(self.artistName)
     if imagePath:
         pixmap = QPixmap(imagePath)
     else:
         pixmap = QPixmap(IconsHub.Anonymous)
     self.artistHeadLabel.setPixmap(pixmap)
     musicId = self.playlist.get_music_id_at(self.currentSourceRow)
     self.update_window_lyric_signal.emit(self.title, musicId)
 def update_parameters(self):
     self.currentSourceRow = self.playlist.get_current_row()
     self.musicTitleLabel.setText(self.title)
     self.playAction.setText(self.musicName)
     imagePath = SearchOnline.get_artist_image_path(self.artistName)
     if imagePath:
         pixmap = QPixmap(imagePath)
     else:
         pixmap = QPixmap(IconsHub.Anonymous)
     self.artistHeadLabel.setPixmap(pixmap)
     musicId = self.playlist.get_music_id_at(self.currentSourceRow)
     self.update_window_lyric_signal.emit(self.title, musicId)
 def set_artist_info(self, artist):
     if artist == 'Zheng-Yejian':
         self.ui_initial()
     elif artist != self.artistName.text():
         infoPath = SearchOnline.get_artist_info_path(artist)
         infoDict = parse_artist_info(infoPath)
         self.artistName.setText(artist)
         self.artistBirthday.setText('生日:%s'%infoDict['birthday'])
         self.artistBirthplace.setText('出生地:%s'%infoDict['birthplace'])
         self.artistLanguage.setText('语言:%s'%infoDict['language'])
         self.artistGender.setText('性别:%s'%infoDict['gender'])
         self.artistConstellation.setText('星座:%s'%infoDict['constellation'])
         self.artistDetail.clear()
         self.artistDetail.setAlignment(Qt.AlignHCenter)
         self.artistDetail.setHtml(self.get_artist_detail_style_text(infoDict['info']))
         imagePath = SearchOnline.get_artist_image_path(artist)
         if imagePath:
             pixmap = QPixmap(imagePath)
         else:
             pixmap = QPixmap(IconsHub.Anonymous)
         self.artistHeadLabel.setPixmap(pixmap)
Beispiel #6
0
 def set_artist_info(self, artist):
     if artist == 'Zheng-Yejian':
         self.ui_initial()
     elif artist != self.artistName.text():
         infoPath = SearchOnline.get_artist_info_path(artist)
         infoDict = parse_artist_info(infoPath)
         self.artistName.setText(artist)
         self.artistBirthday.setText('生日:%s' % infoDict['birthday'])
         self.artistBirthplace.setText('出生地:%s' % infoDict['birthplace'])
         self.artistLanguage.setText('语言:%s' % infoDict['language'])
         self.artistGender.setText('性别:%s' % infoDict['gender'])
         self.artistConstellation.setText('星座:%s' %
                                          infoDict['constellation'])
         self.artistDetail.clear()
         self.artistDetail.setAlignment(Qt.AlignHCenter)
         self.artistDetail.setHtml(
             self.get_artist_detail_style_text(infoDict['info']))
         imagePath = SearchOnline.get_artist_image_path(artist)
         if imagePath:
             pixmap = QPixmap(imagePath)
         else:
             pixmap = QPixmap(IconsHub.Anonymous)
         self.artistHeadLabel.setPixmap(pixmap)