Bugzilla – Bug 3311
shouldn't be able to rename/delete iTunes: playlists
Last modified: 2008-09-15 14:38:25 UTC
Looks like we need to set the noEdit param in Slim::Web::Pages::browsedb() when it's not a file or cue sheet.
would we not want to still be able to edit m3u and pls files? perhaps something like: if ($item->isPlaylist && !$item->isCUE && !$item->isM3U && !$item->isPLS) { $list_form{'noEdit'} = '&noEdit=1'; } erk..bit yukky maybe also just isPlaylist && !isType('ssp')) or some such :)
Subject: Re: shouldn't be able to rename/delete iTunes: playlists we should only enable edit for the playlists that we know how to edit, right? if (!$item->isM3U && !$item->isPLS) { $list_form{'noEdit'} = '&noEdit=1'; }
Subject: Re: shouldn't be able to rename/delete iTunes: playlists But also from browsedb. I couldn't find how to add it for that page too.
ok, so which paths can possibly end up wrongly able to edit the playlist? browsetree is the isPlaylist edit at line 1529 and at line 1144, browsedb is setting the noEdit if it passed in via url, so we could always set it there based on the same test as above. we'll have to do this for 6.5 as well, making the adjustment for the module relocations
Andy, can you take a look at this?
Fixed in 6.3. Probably needs a different fix for 6.5.
Also fixed in 6.5.
I just put in a fix for bug 3601, which was around the lines of code used for this fix. I have a question about it: This particular bit deals with checking if the playlist belongs to iTunes, therefore preventing an edit. As the "title" of an itunes playlist uses a server preference for prefix, checking the 'title' for 'iTunes' may not be valid if the user has changed this pref. I'm thinking the url might be a safer comparison, checking for the fixed 'itunesplaylist' used for the url prefix. That, or the content type of 'itp' Also, I think musicmagic and moodlogic playlists should be included in this too? of course, the pref IS basically a touch silly, so maybe it could go away instead :)
You're right, I didn't notice that the prefix/suffix were configurable. I'm not familiar with how MM/ML playlists work but if you think they should be blocked from editing I'm all for it. :)
Re-fixed in 6.3 and 6.5.
This bug fix is now part of a released version, and so has been marked closed. If you are still experiencing this problem, please reopen the bug.