GNOME Bugzilla – Bug 743884
Protect smart playlists
Last modified: 2015-02-28 15:34:14 UTC
Smart playlists should be "protected" from renaming and deletion. Additional thought: should names of smart playlists be 'reserved' (so user can't name a second playlist, say, "Recently Played")?
(In reply to comment #0) > Smart playlists should be "protected" from renaming and deletion. Agreed on that, that should be pretty easy since we store playlist id for smart playlists. > Additional > thought: should names of smart playlists be 'reserved' (so user can't name a > second playlist, say, "Recently Played")? Not sure about that, I don't mind the duplicates there. Although we should make sure that smart playlists are on top of the list
Created attachment 297455 [details] [review] disable deletion of smart playlists
Review of attachment 297455 [details] [review]: LGTM, will update the patch with comment below and push it to master ::: gnomemusic/view.py @@ +1185,3 @@ + def current_playlist_is_protected(self): + current_playlist_id = self.current_playlist.get_id() + if current_playlist_id in StaticPlaylists.get_protected_ids(): Nitpick: simplier way would be "return current_playlist_id in StaticPlaylists.get_protected_ids()"
(In reply to Vadim Rutkovsky from comment #3) > Review of attachment 297455 [details] [review] [review]: > > LGTM, will update the patch with comment below and push it to master Actually we can't push it now - we're in Strings Freeze, so adding new strings is prohibited (unless we really want to). How about we simply set 'Delete' menu as disabled and push this change for 3.18?
Created attachment 297692 [details] [review] disable deletion of smart playlists (revised -- disables delete button rather than popping up a "can't delete this playlist" notification")
Created attachment 297694 [details] [review] disable deletion of smart playlists (revised -- disables delete button rather than popping up a "can't delete this playlist" notification")
Created attachment 297695 [details] [review] disable deletion of smart playlists (revised -- disables delete button rather than popping up a "can't delete this playlist" notification")
Created attachment 297783 [details] [review] disable deletion of smart playlists (revised -- disables delete button rather than popping up a "can't delete this playlist" notification")
Created attachment 297784 [details] [review] disable deletion of smart playlists (revised -- disables delete button rather than popping up a "can't delete this playlist" notification")
Thanks, pushed as https://git.gnome.org/browse/gnome-music/commit/?id=910eaad