Handle errors better and more refactoring
Handle errors better and more refactoring

Refactor into getContainingPlaylist. It takes strange arguments, but it
reduces the length of main so it must be good.

drkitty/edopaffy