Optimized playlist db insert by combining multiple rows
added exception handler