def __init__(self, song, oneLine=False): QListWidgetItem.__init__(self) self.icon = False self.song = song if oneLine: self.setText(mpdlibrary.songArtist(song) + ' - ' + mpdlibrary.songTitle(song)) else: self.setText(mpdlibrary.songTitle(song) + '\n' + mpdlibrary.songArtist(song)) self.setToolTip("Album:\t %s\nTime:\t %s\nFile:\t %s" % (mpdlibrary.songAlbum(song), str(mpdlibrary.songTime(song)) , song['file']))
def __init__(self, song, pos): QTreeWidgetItem.__init__(self) self.song = song self.pos = pos self.setText(0,mpdlibrary.songArtist(song)) self.setText(1,mpdlibrary.songTitle(song)) self.setText(2,mpdlibrary.songAlbum(song))
def __init__(self, song, pos): QTreeWidgetItem.__init__(self) self.song = song self.pos = pos self.setText(0, mpdlibrary.songArtist(song)) self.setText(1, mpdlibrary.songTitle(song)) self.setText(2, mpdlibrary.songAlbum(song))
def __init__(self, song): QTreeWidgetItem.__init__(self) self.song = song self.setText(0,mpdlibrary.songTrack(song)) self.setText(1,mpdlibrary.songTitle(song)) self.setText(2,mpdlibrary.songTime(song)) self.setToolTip(1, "Artist:\t %s\nAlbum:\t %s\nFile:\t %s"\ % (mpdlibrary.songArtist(song), mpdlibrary.songAlbum(song), song['file']))
def __init__(self, song): QTreeWidgetItem.__init__(self) self.song = song self.setText(0, mpdlibrary.songTrack(song)) self.setText(1, mpdlibrary.songTitle(song)) self.setText(2, mpdlibrary.songTime(song)) self.setToolTip(1, "Artist:\t %s\nAlbum:\t %s\nFile:\t %s"\ % (mpdlibrary.songArtist(song), mpdlibrary.songAlbum(song), song['file']))
def _updateText(self): if not self._playing and mpdlibrary.isStream(self.song): title = mpdlibrary.songStation(self.song) artist = '' else: artist = mpdlibrary.songArtist(self.song) title = mpdlibrary.songTitle(self.song) if self.oneLine: self.setText(artist + ' - ' + title) else: self.setText(title + '\n' + artist) if mpdlibrary.isStream(self.song): self.setToolTip("Station:\t %s\nurl:\t %s" % (mpdlibrary.songStation(self.song), self.song['file'])) else: self.setToolTip("Album:\t %s\nTime:\t %s\nFile:\t %s" % (mpdlibrary.songAlbum(self.song), str(mpdlibrary.songTime(self.song)) , self.song['file']))
def _updateText(self): if not self._playing and mpdlibrary.isStream(self.song): title = mpdlibrary.songStation(self.song) artist = '' else: artist = mpdlibrary.songArtist(self.song) title = mpdlibrary.songTitle(self.song) if self.oneLine: self.setText(artist + ' - ' + title) else: self.setText(title + '\n' + artist) if mpdlibrary.isStream(self.song): self.setToolTip( "Station:\t %s\nurl:\t %s" % (mpdlibrary.songStation(self.song), self.song['file'])) else: self.setToolTip( "Album:\t %s\nTime:\t %s\nFile:\t %s" % (mpdlibrary.songAlbum(self.song), str(mpdlibrary.songTime(self.song)), self.song['file']))