Now record artist / album / song according to their indices.
Added `echo 'var data=' before json dumping.