This logic is repeated in readPlaylist(). I think you can change readPlaylist to:
    ```readAttrsList(firstKey string) (alist []Attrs, err error)```
Then, replace all usage of readPlaylist to readAttrsList("file") and also use it here as readAttrsList("playlist")