(May-17-2018, 03:53 PM)ThiefOfTime Wrote: Hmmmm, I would suggest, that you make a counter and a timer that runs each second. Let's say you know your song is 1 minute and 20 seconds long, then you know that when your counter reaches 80 (or 0 depending which way you prefere) you play the next song. Each second the timer times out and modifies the counter.
what exacly is the problem with phonon? what you are currently trying is a huge workaround.
I can't remember but installation went fine and then it gave errors when I tried to use it I think. And, nice idea I guess. We'll see how it goes in the coming days :D Something like this?
self.timerCounter = 0 self.songFileToGetLengthFrom = MP3(self.playlist[self.playlistCurrentSongIndex].path) self.songFileLength = self.songFileToGetLengthFrom.info.length self.nextSongTimer = QTimer() self.nextSongTimer.timeout.connect(self.playNextSongInPlaylist) self.nextSongTimer.start(1000) def playNextSongInPlaylist(self): self.timerCounter += 1 if self.timerCounter == self.songFileLength: if self.playlistCurrentSongIndex + 1 < (len(self.playlist) - 1): self.playlistCurrentSongIndex += 1 playAudioFromSelectedFile(self.playlist[self.playlistCurrentSongIndex].path)And then I just add an additional if to check if isPlaying is true, if it is to increment the counter - otherwise no. This may work, I hope it does :)