[ted] Fix playlist extraction and add a test