[ted] Fix playlist extraction and add a test
[ted] Style fixes