Bug 10646 - Playlists with zero or one entry cannot be deleted using Player UI
: Playlists with zero or one entry cannot be deleted using Player UI
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Playlists
: 7.3.2
: PC Debian Linux
: P1 normal (vote)
: 7.4.0
Assigned To: Andy Grundman
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-10 12:53 UTC by Marc Auslander
Modified: 2009-10-05 14:31 UTC (History)
5 users (show)

See Also:
Category: Bug


Attachments
rough patch (2.39 KB, patch)
2009-03-14 23:17 UTC, KDF
Details | Diff
working patch (2.45 KB, patch)
2009-03-15 23:03 UTC, KDF
Details | Diff
working patch with favorites for all (2.60 KB, patch)
2009-03-16 06:38 UTC, KDF
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Auslander 2009-01-10 12:53:38 UTC
A playlist with zero or one entries does not offer a delete option on the controller or SB3.

It can be deleted using the web UI.

(such playlists are sometimes created by plugins like syncoptions).
Comment 1 Mark Miksis 2009-01-10 13:24:10 UTC
What is a playlist with zero entries?
Comment 2 Marc Auslander 2009-01-10 14:15:33 UTC
They happen - I've seen syncoptions make one.

you can make one by creating a playlist (save from the web UI) and then deleting all its entries and saving it again.
Comment 3 KDF 2009-03-14 23:07:47 UTC
I've no recollection of a delete option on the player UI, but I can see the problem in the Controller case.
Comment 4 KDF 2009-03-14 23:17:31 UTC
Created attachment 4929 [details]
rough patch

Here is a rough patch that seems to cover at least the empty playlist.  I'll have to create a single-item playlist to test more.  Also, haven't tested that the delete actually works, or that there are no side-effects from allowing the query processing to continue in the 0 or 1 cases.  There must have been some reason to do the checks currently in place, that I'm partially bypassing in this patch.
Comment 5 KDF 2009-03-15 23:03:01 UTC
Created attachment 4932 [details]
working patch

This patch works by adding delete as an option for empty playlists.  Adding as a favourite is not given.  Single-track playlists still get the favourites option along with the delete option.

The remaining problem is that I've noticed some playlists don't show the "add to favorites" option at the end.  It's in the result, but for some reason, doesn't show on the controller.  Single item lists work, and a VERY long list works.  other lists don't seem to.
Comment 6 KDF 2009-03-16 06:38:56 UTC
Created attachment 4936 [details]
working patch with favorites for all

had to use _fixCount in order to get the favorites item to show up all the time. Not that I understand exactly how that routine works, but it was being used for other playlist queries :)
Comment 7 Chris Owens 2009-03-16 09:48:21 UTC
We are now planning to make a 7.3.3 release.  Please review your bugs (all marked open against 7.3.3) to see if they can be fixed in the next few weeks, or if they should be retargeted for 7.4 or future.

Thanks!
Comment 8 KDF 2009-03-16 19:05:42 UTC
this one works for me, so I'm happy to commit.  I'd be reassured if Ben/Tom/Richard could review and give the go-ahead.
Comment 9 KDF 2009-03-16 21:21:41 UTC
may be related in part to bug 7829
Comment 10 Chris Owens 2009-03-23 09:38:33 UTC
Tom, maybe you could review KDF's change?
Comment 11 Wadzinski Tom 2009-03-27 11:56:07 UTC
punting to Ben to review, since I'm still a SC newbie. Hopefully I won't be that way forever....
Comment 12 Chris Owens 2009-03-30 17:32:01 UTC
Since there's now a planned 7.3.3 release, bugs which won't make the cut-off are being moved to the next target out.  If you feel that this bug needs to be addressed more (or less) urgently than the 7.4 release, please cc chris@slimdevices.com and leave a comment in the bug to that effect so we can review it.

Thanks.
Comment 13 Chris Owens 2009-03-31 08:54:27 UTC
For some reason Bugzilla did not change the target when I did this yesterday.  Or maybe it was me.  In either case, I'm trying it again.
Comment 14 Andy Grundman 2009-07-30 21:56:17 UTC
I will review.
Comment 15 Andy Grundman 2009-08-03 19:12:02 UTC
Patch applied as change 28034.
Comment 16 James Richardson 2009-10-05 14:31:00 UTC
This bug has been marked as fixed in the 7.4.0 release version of SqueezeBox Server!
    * SqueezeCenter: 28672
    * Squeezebox 2 and 3: 130
    * Transporter: 80
    * Receiver: 65
    * Boom: 50
    * Controller: 7790
    * Radio: 7790  

Please see the Release Notes for all the details: http://wiki.slimdevices.com/index.php/Release_Notes

If you haven't already, please download and install the new version from http://www.logitechsqueezebox.com/support/download-squeezebox-server.html

If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.