[Merge] lp:~phablet-team/media-hub/add_move_track into lp:media-hub/stable
Alfonso Sanchez-Beato
alfonso.sanchez-beato at canonical.com
Tue Nov 17 17:43:47 UTC 2015
Review: Needs Fixing
See comment below
Diff comments:
>
> === modified file 'src/core/media/track_list_skeleton.cpp'
> --- src/core/media/track_list_skeleton.cpp 2015-11-17 16:37:06 +0000
> +++ src/core/media/track_list_skeleton.cpp 2015-11-17 16:37:06 +0000
> @@ -197,23 +243,38 @@
> media::Track::Id next;
> bool deleting_current = false;
>
> - if (id_it == impl->current_iterator()) {
> + if (id_it == impl->current_iterator())
> + {
> cout << "Removing current track" << endl;
> deleting_current = true;
>
> - if (current_track != empty_iterator) {
> + if (current_track != empty_iterator)
> + {
> ++current_track;
>
> if (current_track == impl->tracks().get().end()
> && loop_status == media::Player::LoopStatus::playlist)
> - current_track = impl->tracks().get().begin();
> + {
> + // Removed the last track, current is the first track and make sure that
> + // the player starts playing it
> + current_track = impl->tracks().get().begin();
> + impl->go_to(*current_track);
This go_to() is not actually needed, as will be performed later after testing that next.empty() is false.
> + }
>
> if (current_track == impl->tracks().get().end())
> + {
> current_track = empty_iterator;
> + // Nothing else to play, stop playback
> + impl->emit_on_end_of_tracklist();
> + }
> else
> + {
> next = *current_track;
> + }
> }
> - } else if (current_track != empty_iterator) {
> + }
> + else if (current_track != empty_iterator)
> + {
> next = *current_track;
> }
>
--
https://code.launchpad.net/~phablet-team/media-hub/add_move_track/+merge/276560
Your team Ubuntu Phablet Team is subscribed to branch lp:~phablet-team/media-hub/bg-playlist-fixes.
More information about the Ubuntu-reviews
mailing list