Fix playlists management in master

It's based on @holman fix for 4.1.