removeSource and insertSource needs to maintain currentIndex correctly

Bug #1511073 reported by Andrew Hayzen on 2015-10-28
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Critical
John McAleely
media-hub (Ubuntu)
Critical
Alfonso Sanchez-Beato
media-hub (Ubuntu RTM)
Critical
Alfonso Sanchez-Beato
qtubuntu-media (Ubuntu)
Critical
Alfonso Sanchez-Beato
qtubuntu-media (Ubuntu RTM)
Critical
Alfonso Sanchez-Beato

Bug Description

The currentIndex needs to be maintained correctly when performing {remove,insert}Source, I believe there are the following cases that need to be taken into account:
- If removeSource is for an index less than the currentIndex then the currentIndex needs to be decremented.
- If removeSource is for the same index as currentIndex then next() should be called
- If insertSource is for an index less than or equal to the currentIndex then the currentIndex needs to be incremented

Related branches

Andrew Hayzen (ahayzen) on 2015-10-28
summary: - removeSource and insertSource need to maintain currentIndex correctly
+ removeSource and insertSource needs to maintain currentIndex correctly
Andrew Hayzen (ahayzen) on 2015-10-28
tags: added: bgplaylist
Jim Hodapp (jhodapp) on 2015-11-02
Changed in qtubuntu-media (Ubuntu):
status: New → Triaged
Changed in qtubuntu-media (Ubuntu RTM):
status: New → Triaged
Changed in canonical-devices-system-image:
status: New → Confirmed
Jim Hodapp (jhodapp) on 2015-11-02
Changed in qtubuntu-media (Ubuntu):
importance: Undecided → Critical
Changed in qtubuntu-media (Ubuntu RTM):
importance: Undecided → Critical
Changed in canonical-devices-system-image:
assignee: nobody → John McAleely (john.mcaleely)
importance: Undecided → Critical
milestone: none → ww46-2015
Jim Hodapp (jhodapp) on 2015-11-10
Changed in qtubuntu-media (Ubuntu):
status: Triaged → In Progress
Changed in qtubuntu-media (Ubuntu RTM):
status: Triaged → In Progress
Changed in qtubuntu-media (Ubuntu):
status: In Progress → Triaged
Changed in canonical-devices-system-image:
status: Confirmed → In Progress
Jim Hodapp (jhodapp) on 2015-11-10
Changed in qtubuntu-media (Ubuntu RTM):
assignee: nobody → Alfonso Sanchez-Beato (alfonsosanchezbeato)
Changed in media-hub (Ubuntu):
status: New → Confirmed
assignee: nobody → Alfonso Sanchez-Beato (alfonsosanchezbeato)
Changed in canonical-devices-system-image:
milestone: ww46-2015 → ww02-2016
Changed in canonical-devices-system-image:
milestone: ww02-2016 → ww46-2015
Changed in canonical-devices-system-image:
milestone: ww46-2015 → ww02-2016
Jim Hodapp (jhodapp) on 2015-11-13
Changed in media-hub (Ubuntu RTM):
status: New → Triaged
Changed in media-hub (Ubuntu):
status: Confirmed → Triaged
Changed in media-hub (Ubuntu RTM):
status: Triaged → In Progress
importance: Undecided → Critical
Changed in media-hub (Ubuntu):
importance: Undecided → Critical
Changed in media-hub (Ubuntu RTM):
assignee: nobody → Alfonso Sanchez-Beato (alfonsosanchezbeato)
Changed in qtubuntu-media (Ubuntu):
assignee: nobody → Alfonso Sanchez-Beato (alfonsosanchezbeato)
Jim Hodapp (jhodapp) on 2015-11-17
Changed in qtubuntu-media (Ubuntu RTM):
status: In Progress → Fix Committed
Changed in media-hub (Ubuntu RTM):
status: In Progress → Fix Committed
Łukasz Zemczak (sil2100) wrote :

This bug was fixed in the package qtubuntu-media 0.8.0+15.04.20151118-0ubuntu1 in https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/stable-phone-overlay

---------------

qtubuntu-media (0.8.0+15.04.20151118-0ubuntu1) vivid; urgency=medium

  [ phablet ]
  * Bump version for new TrackList related API changes.

  [ Alfonso Sanchez-Beato ]
  * Emit onPlaybackModeChanged (LP: #1510219). Implements insertTrack()
    so that a client can move a track into a new position by first
    calling removeTrack(). Do proper clean-up when switching between
    playlist and playing a single URI (LP: #1511029). (LP: #1511073,
    #1511034, #1510219, #1511029)

  [ CI Train Bot ]
  * New rebuild forced.

  [ Jim Hodapp ]
  * Emit onPlaybackModeChanged (LP: #1510219). Implements insertTrack()
    so that a client can move a track into a new position by first
    calling removeTrack(). Do proper clean-up when switching between
    playlist and playing a single URI (LP: #1511029). (LP: #1511073,
    #1511034, #1510219, #1511029)

 -- Jim Hodapp <email address hidden> Wed, 18 Nov 2015 16:32:22 +0000

Changed in qtubuntu-media (Ubuntu RTM):
status: Fix Committed → Fix Released
Łukasz Zemczak (sil2100) wrote :

This bug was fixed in the package media-hub 4.0.0+15.04.20151118.1-0ubuntu1 in https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/stable-phone-overlay

---------------

media-hub (4.0.0+15.04.20151118.1-0ubuntu1) vivid; urgency=medium

  [ Jim Hodapp ]
  * Added move_track and various fixes for TrackList.
  * Major bump for new TrackList API changes.

  [ Alfonso Sanchez-Beato ]
  * Make sure our iterator for the current track points to the right
    place when (un)shuffling (LP #1510219). Fix crash when client tries
    to set the player for a non-existing key. Do not add empty URIs to
    the list (LP: #1511029). (LP: #1511073, #1511385, #1510219,
    #1510227, #1511029)

 -- Jim Hodapp <email address hidden> Wed, 18 Nov 2015 18:36:18 +0000

Changed in media-hub (Ubuntu RTM):
status: Fix Committed → Fix Released
Changed in canonical-devices-system-image:
status: In Progress → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qtubuntu-media - 0.8.0+16.04.20160105-0ubuntu1

---------------
qtubuntu-media (0.8.0+16.04.20160105-0ubuntu1) xenial; urgency=medium

  [ CI Train Bot ]
  * No-change rebuild.

qtubuntu-media (0.8.0+15.04.20151118-0ubuntu1) vivid; urgency=medium

  [ phablet ]
  * Bump version for new TrackList related API changes.

  [ Alfonso Sanchez-Beato ]
  * Emit onPlaybackModeChanged (LP: #1510219). Implements insertTrack()
    so that a client can move a track into a new position by first
    calling removeTrack(). Do proper clean-up when switching between
    playlist and playing a single URI (LP: #1511029). (LP: #1511073,
    #1511034, #1510219, #1511029)

  [ CI Train Bot ]
  * New rebuild forced.

  [ Jim Hodapp ]
  * Emit onPlaybackModeChanged (LP: #1510219). Implements insertTrack()
    so that a client can move a track into a new position by first
    calling removeTrack(). Do proper clean-up when switching between
    playlist and playing a single URI (LP: #1511029). (LP: #1511073,
    #1511034, #1510219, #1511029)

 -- Thomas Voß <email address hidden> Tue, 05 Jan 2016 13:07:12 +0000

Changed in qtubuntu-media (Ubuntu):
status: Triaged → Fix Released
Changed in canonical-devices-system-image:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers