Page 1 of 1

Determining if all my music in on Subsonic...

PostPosted: Thu Jul 29, 2010 6:44 pm
by colli419
Hi all:

I was wondering if it would be possible to determine how many folders might be missing from Subsonic due to strange characters or something of this nature. Meaning that I can list the files that are in the folder if I log in via SSH, but I am not sure how to compare that to the index in the left pane of the web interface. Does anybody have any ideas on this?

Thanks!

PostPosted: Wed Aug 11, 2010 11:22 pm
by Kirk
I'm not sure why you think music would be missing. I have a large collection and have never had that happen. Is there something actually missing or are you just nervous that something might be?

A directory listing of your music source folder should match the sidebar on the left of Subsonic, for starters.

I think if a song was somehow screwed up, there'd be an error in your subsonic log during the search index procedure... Maybe you can look into that as well.

Cheers,
Kirk

Verifying songs necessary, even if no bugs exist

PostPosted: Mon Aug 16, 2010 9:01 pm
by David Svoboda
Well, my instance of subsonic (on Ubuntu 10.04) reports 9,039 songs on the webpage. However, I have 9,043 MP3 files in my music library, as reported by both 'ls' and Rhythmbox. Also, grepping for 'mp3' in /var/subsonic/subsonic10.index yields 9043 hits.

So four songs are getting 'lost' between Subsonic's search and the webpage. So we (I at least) need some way to list all the songs on Subsonic's web page...and see why there are four missing.

PostPosted: Tue Aug 17, 2010 3:29 am
by David Svoboda
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

PostPosted: Tue Aug 17, 2010 4:48 pm
by Kirk
For whatever reason, if you leave the web search box blank it searches for the word "Search". Leaving the box blank yields results for me, and the word "search" is bolded on the results, lol.

Cheers,
Kirk