def index(self):
        """ controller for the playlist frame """

        try:
            self.m = g.p.connect()
        except NoMPDConnection:            
            return render('/null.html')
        status = self.m.status()
        c.playlistid = status['playlist']
        c.playlist = self.m.playlistinfo()
        info = self.m.lsinfo()
        c.available_playlists = [playlist['playlist'] for playlist in info if playlist in 'playlist']
        c.available_playlists.insert(0,'')
        c.g = g

        return render('/playlist.html')
dataset/ETHPy150Open ralfonso/theory/theory/controllers/playlist.py/PlaylistController.index/swapped operands of `in`