def updateAllClients(self): if SongsQueue.queue: current_song = Song(SongsQueue.queue[0]) msg = "CURRENT_" + current_song.getTitle( ) + "_" + current_song.getArtist() + "\r\n" print("Sending message: " + msg) for client in self.clients: client.send(msg.encode('utf-8'))
def getSongInfo(songInfo): song=Song() artist=input('Artist Name: ') song.setArtist(artist) title=input('Song Title: ') song.setTitle(title) time=int(input('Song Time in seconds: ')) song.setTime(time) year=input('Year: ') song.setYear(year) # retrieve data from Song class to store in songInfo list songInfo.append(song.getArtist()) songInfo.append(song.getTitle()) songInfo.append(song.getTime()) songInfo.append(song.getYear()) return songInfo