https://bugs.gpodder.org/show_bug.cgi?id=1661

--- Comment #6 from Thomas Perl <[email protected]> 2012-10-17 16:36:40 BST ---
(In reply to comment #5)
> Can confirm it's very likely a race condition where the next playing track 
> gets
> update with the progress of the previous track.
> 
> Earlier played a long FaiF.us episodes from 1:00:00 till the end ~1:13:00. The
> next queued episode immediately jumped to ~13:00.
> 
> If you can hint me to the right component/.py I'll look into it myself. Race
> conditions are tough, but perhaps I can do a simple fix to ignore that first
> progress update.

The relevant code parts:

in share/gpodder/ui/qml/MediaPlayer.qml:

   onPositionChanged of audioPlayer (updates the episode position from the
audio player during playback - whenever the position changes)

   onStatusChanged of audioPlayer (calls mediaPlayer.nextInQueue() to load the
next item when playback stops)

My idea would be to call "nextInQueue()" not directly, but only after a timeout
to let the signals settle. That's also the race condition (i.e. status gets
changed to stopped, then the episode gets changed from the next playlist
position, then position gets changed once more, and because of that, the wrong
position gets updated).

Another option would be to check if "audioPlayer.source === episode.qsourceurl"
in onPositionChanged, and only update the position then, this *could* also
potentially avoid that problem.

If you have a reliable way of reproducing the error, I'd be glad if you could
share the steps - it seems to me a bit erratic at times.

-- 
Configure bugmail: https://bugs.gpodder.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
_______________________________________________
gPodder-Bugs mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/gpodder-bugs

Reply via email to