[Merge] lp:~phablet-team/qtubuntu-media/fix-removemedia into lp:qtubuntu-media/stable
Andrew Hayzen
ahayzen at gmail.com
Wed Dec 30 17:07:31 UTC 2015
Review: Needs Fixing
When trying out the silo I found that the queue would break or still not work correctly. So I modified what you have added to the onMediaRemoved to match what I was doing in music (set currentIndex to 0 not to -1) and it seem to have resolved the issues :-) My diff is here [0]
One inline comment:
1) Changing this to m_currentIndex = 0; works better for me :-)
0 - http://pastebin.ubuntu.com/14284307/
Diff comments:
> === modified file 'src/aal/aalmediaplaylistcontrol.cpp'
> --- src/aal/aalmediaplaylistcontrol.cpp 2015-11-16 20:21:39 +0000
> +++ src/aal/aalmediaplaylistcontrol.cpp 2015-12-24 16:03:02 +0000
> @@ -277,6 +276,23 @@
> m_currentId = aalMediaPlaylistProvider()->trackOfIndex(m_currentIndex);
> }
>
> +void AalMediaPlaylistControl::onMediaRemoved(int start, int end)
> +{
> + Q_UNUSED(start);
> + Q_UNUSED(end);
> +
> + // If the entire playlist is cleared, we need to reset the currentIndex
> + // to just before the beginning of the list, otherwise if the user selects
> + // a random track in the tracklist for a second time, track 0 is always
> + // selected instead of the desired track index
> + if (aalMediaPlaylistProvider()->mediaCount() == 0)
> + {
> + qDebug() << "Tracklist was cleared, resetting m_currentIndex to -1";
> + m_currentIndex = -1;
Changing this to m_currentIndex = 0; works better for me :-)
> + m_currentId.clear();
> + }
> +}
> +
> void AalMediaPlaylistControl::onCurrentIndexChanged()
> {
> int index = aalMediaPlaylistProvider()->indexOfTrack(m_currentId);
--
https://code.launchpad.net/~phablet-team/qtubuntu-media/fix-removemedia/+merge/281237
Your team Ubuntu Phablet Team is subscribed to branch lp:qtubuntu-media/stable.
More information about the Ubuntu-reviews
mailing list