14.0.0B6 CTD when changing target playlist

Issue description:

Normally we can only add one copy of a playlist to the Home page. But since I had you add a way to change the target playlist of an entry…

Selecting “Change playlist” and choosing a playlist which already has an existing entry on the Home page will fully crash the app. But only if the pre-existing entry AND the newly copied entry are both visible on-screen.

Logs:

Upload description: Celorien_CTD

Additional information:

 
 

Reproduction steps:

 
Case 1:
Make two playlists, A and B. Add both to the Home page. By default, they will both be at the bottom of the list.

Edit the Home Page entry for playlist B and select “Change Playlist”, then choose playlist A.

App will crash immediately.


Case 2:

Add A and B to the Home page but rearrange the list of entries such that A is at the top and B is at the bottom. Now edit B and change target to A.

From this point, if you exit the Home page menu, everything works perfectly. But if you instead scroll to the top (so that A is visible), then scroll down again… The app crashes.


Note

Functionally, everything still works. The layout from A is copied correctly. The entry for A is removed and replaced with the entry of B, in the position of A’s entry (rather than the bottom where B was).
 

Media provider:

Local device

Screenshots:

 
20260223_222043

GIF is “Case 2” after changing target of the playlist. If I had backed out before the crash, there would be no issue at all.

You can see the Home page entry race to the position of A when I scroll up. If A & B are not so far apart, it may race back-and-forth before crashing.

    

Yes duplicates are not allowed will filter them to prevent that.