by David Svoboda » Tue Aug 17, 2010 3:29 am
I was able to answer my own question. Specifically, the SubSonic API provides a 'search' command, which lets you query the server, and it will let you provide no search parameters, and thereby list every song (up to a max count which you can specify). Strangely, the Web interface has the same search item, but returns nothing if you leave all search terms blank. I suppose this is easier on the server and a browser, but it is surprising; not a good thing in an end-user interface.
These commands worked for me; the first commandit took about 2 minutes to retrieve about 9000 songs. I've only blanked out the password.
wget 'http://localhost:4040/rest/search.view?u=admin&p=********&v=1.1.0&c=myapp&count=10000'
mv search.view?u=admin\&p=********\&v=1.1.0\&c=myapp\&count=10000 subsonic_library.xml
grep ".mp3" subsonic_library.xml | perl -p -e 's/.*path="//g; s|"/>||;' > subsonic_songs