Extract iTunes Config from iPod
There are a Bunch of iPod music recovery softwares you can search on Google, Some even give an option to export to iTunes library, hence maintaining the user ratings etc. I generally use iPod Access for recovery of music or video if I accidentally delete something.