Bug 331820

Summary: [Playlist] Deleting items when searching removes the wrong items
Product: [Plasma] plasma-mediacenter Reporter: Shantanu Tushar <shantanu>
Component: PlaylistAssignee: Sinny Kumari <ksinny>
Status: RESOLVED FIXED    
Severity: major CC: ashishmadeti
Priority: NOR Keywords: junior-jobs
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Shantanu Tushar 2014-03-06 14:41:07 UTC
If you are searching for something and in the filtered view you delete an item, some other item will get deleted.

Reproducible: Always

Steps to Reproduce:
1. Add some media to playlist
2. Search so that some media are filtered
3. Try to delete a media
Actual Results:  
Some other media gets deleted

Expected Results:  
The media, whose corresponding delete button was pressed, should have been deleted

This is mostly because the deletion happens in the playlistModel on an integer index but the Nth item in the filtered list isn't really the Nth item in the complete playlistModel.
Comment 1 Ashish Madeti 2014-03-08 17:37:51 UTC
Similar Issue,
If you are searching for something and in the filtered view you play a media, some other media gets played.

Should I open another bug for the issue?
Comment 2 Shantanu Tushar 2014-03-08 19:25:22 UTC
(In reply to comment #1)
> Similar Issue,
> If you are searching for something and in the filtered view you play a
> media, some other media gets played.
> 
> Should I open another bug for the issue?

Yes, this is a recent regression due to playlist changes, go ahead and report one.
Comment 3 Ashish Madeti 2014-03-08 19:39:17 UTC
Ok, I will report it.. In the meanwhile please review
https://git.reviewboard.kde.org/r/116656/ , I have made modifications to
FilterPlaylistModel but have not moved the removeFromPlaylist() method to
it. I rather added a function to FilterPlaylistModel which will also help
me in solving the other bug (the bug not reported yet).


On Sun, Mar 9, 2014 at 12:55 AM, Shantanu Tushar <shantanu@kde.org> wrote:

> https://bugs.kde.org/show_bug.cgi?id=331820
>
> --- Comment #2 from Shantanu Tushar <shantanu@kde.org> ---
> (In reply to comment #1)
> > Similar Issue,
> > If you are searching for something and in the filtered view you play a
> > media, some other media gets played.
> >
> > Should I open another bug for the issue?
>
> Yes, this is a recent regression due to playlist changes, go ahead and
> report
> one.
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
>
Comment 4 Ashish Madeti 2014-03-09 15:50:39 UTC
Git commit 8567b0cf2db7e86eba07653fdbba7e52452f9b26 by Ashish Madeti.
Committed on 09/03/2014 at 15:24.
Pushed by madeti into branch 'master'.

Fixed the removal of wrong items, while searching.
REVIEW: 116656

M  +6    -0    libs/mediacenter/filterplaylistmodel.cpp
M  +1    -0    libs/mediacenter/filterplaylistmodel.h
M  +10   -4    mediaelements/playlist/Playlist.qml
M  +2    -3    mediaelements/playlist/PlaylistDelegate.qml

http://commits.kde.org/plasma-mediacenter/8567b0cf2db7e86eba07653fdbba7e52452f9b26