General rewriting, made it one size fits all, added sql statement to update basename
Improvements to SQL query
Various fixes
further tuning
Merge pull request #1 from beilber/encoding/mythbrake

Encoding/mythbrake