implemented playlist sorting, closes #337