[Merge] lp:~morphis/media-hub/previous-to-same-after-four-secs into lp:media-hub/stable
Jim Hodapp
jim.hodapp at canonical.com
Mon Nov 2 22:34:20 UTC 2015
Review: Needs Fixing code
A few minor suggestions inline.
Diff comments:
>
> === modified file 'src/core/media/track_list_skeleton.cpp'
> --- src/core/media/track_list_skeleton.cpp 2015-10-23 15:30:47 +0000
> +++ src/core/media/track_list_skeleton.cpp 2015-10-27 15:54:53 +0000
> @@ -423,9 +425,18 @@
> }
>
> bool do_go_to_previous_track = false;
> + bool repeat_current_track = false;
> + const uint64_t max_position = 4 * 1000;
>
> + // If we're playing the current already for some time we will
Reword to be "If we're playing the current track for > max_position time then repeat it from the beginning"
> + // repeat it from the beginning
> + if (d->current_position > max_position)
> + {
> + std::cout << "Repeating current track..." << std::endl;
> + repeat_current_track = true;
> + }
> // Loop on the current track forever
> - if (d->loop_status == media::Player::LoopStatus::track)
> + else if (d->loop_status == media::Player::LoopStatus::track)
> {
> std::cout << "Looping on the current track..." << std::endl;
> do_go_to_previous_track = true;
> @@ -514,6 +525,12 @@
> return *d->skeleton.properties.tracks;
> }
>
> +void media::TrackListSkeleton::on_position_changed(uint64_t position)
> +{
> + std::cout << "TrackListSkeleton::on_position_changed: position = " << position << std::endl;
We will want to remove this debug statement since it'll occur quite frequently.
> + d->current_position = position;
> +}
> +
> void media::TrackListSkeleton::on_loop_status_changed(const media::Player::LoopStatus& loop_status)
> {
> d->loop_status = loop_status;
--
https://code.launchpad.net/~morphis/media-hub/previous-to-same-after-four-secs/+merge/275872
Your team Ubuntu Phablet Team is subscribed to branch lp:media-hub/stable.
More information about the Ubuntu-reviews
mailing list