Bug 3311 - shouldn't be able to rename/delete iTunes: playlists
: shouldn't be able to rename/delete iTunes: playlists
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: iTunes
: 6.2.2
: Macintosh Other
: P2 minor (vote)
: ---
Assigned To: Andy Grundman
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-04-23 14:15 UTC by Blackketter Dean
Modified: 2008-09-15 14:38 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Blackketter Dean 2006-04-23 14:15:20 UTC
Looks like we need to set the noEdit param in Slim::Web::Pages::browsedb() when it's not a file or cue sheet.
Comment 1 KDF 2006-04-25 22:21:23 UTC
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 :)
Comment 2 Blackketter Dean 2006-04-26 07:48:51 UTC
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';
}

Comment 3 Blackketter Dean 2006-04-26 07:49:10 UTC
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.

Comment 4 KDF 2006-05-02 22:48:00 UTC
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
Comment 5 Blackketter Dean 2006-06-05 17:23:18 UTC
Andy, can you take a look at this?
Comment 6 Andy Grundman 2006-06-08 11:05:24 UTC
Fixed in 6.3.  Probably needs a different fix for 6.5.
Comment 7 Andy Grundman 2006-06-08 11:17:04 UTC
Also fixed in 6.5.
Comment 8 KDF 2006-06-18 23:45:18 UTC
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 :)
Comment 9 Andy Grundman 2006-06-20 10:37:02 UTC
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. :)
Comment 10 Andy Grundman 2006-06-20 10:43:46 UTC
Re-fixed in 6.3 and 6.5.
Comment 11 Chris Owens 2006-06-27 14:22:03 UTC
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.