Determining if all my music in on Subsonic...

Need help? Post your questions here.

Moderator: moderators

Determining if all my music in on Subsonic...

Postby colli419 » Thu Jul 29, 2010 6:44 pm

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!
colli419
 
Posts: 75
Joined: Thu Aug 27, 2009 8:23 pm

Postby Kirk » Wed Aug 11, 2010 11:22 pm

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
Image
User avatar
Kirk
 
Posts: 310
Joined: Tue Jun 08, 2010 5:45 pm
Location: Illinois, USA

Verifying songs necessary, even if no bugs exist

Postby David Svoboda » Mon Aug 16, 2010 9:01 pm

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.
David Svoboda
 
Posts: 2
Joined: Mon Aug 16, 2010 6:39 pm

Postby 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
David Svoboda
 
Posts: 2
Joined: Mon Aug 16, 2010 6:39 pm

Postby Kirk » Tue Aug 17, 2010 4:48 pm

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
Image
User avatar
Kirk
 
Posts: 310
Joined: Tue Jun 08, 2010 5:45 pm
Location: Illinois, USA


Return to Help

Who is online

Users browsing this forum: No registered users and 16 guests