Page 1 of 1

Manually Update Index

PostPosted: Fri Jul 16, 2010 1:59 pm
by balto
Is there a way to trigger subsonic to run an update on the audio index so that new files that were added to the music directory show up in the program rather than waiting until 3am the next day?

I guess I am wondering if there is a trigger to run the update or if I can change the update interval from once a day to like every hour.

Thanks

PostPosted: Fri Jul 16, 2010 3:26 pm
by mgrant
Login as admin, then:

Settings -> Search -> Update search index now.

-mg

PostPosted: Wed Jun 22, 2011 9:34 pm
by cdarbro
same question. Id actually like to update the index every 5-10 minutes, and definitely have the resources on the machine where it shouldnt be an issue to do so.

PostPosted: Fri Jun 24, 2011 1:35 am
by cdarbro
anyone know what code I could modify and where to set it to do updates every 5-10-30 mins?

PostPosted: Fri Jun 24, 2011 1:30 pm
by cxc4u
If this helps get visibility, i'd like to know what kind of script to run as well. I've got Subsonic set up on a QNAP TS459Pro+.

PostPosted: Fri Jun 24, 2011 11:54 pm
by cdarbro
If it'd be easier, id even be fine with a bash script that will trigger the manual update, that way I can just set up a cron job to accomplish the same

PostPosted: Sat Jun 25, 2011 12:09 am
by cdarbro
not sure the right way to do it but if there was a way to hit
http://subsonicserver/login.view?user=u ... d=password
and then hit
http://subsonicserver/searchSettings.view?update
or to trigger that in one fell swoop from the command line that could be scripted, that work too.

PostPosted: Tue Jun 28, 2011 12:24 am
by cdarbro
*bump*

PostPosted: Mon Jul 25, 2011 8:07 pm
by cdarbro
Not sure if anyone still had interest in this, but I figured out a solution, and wanted to share it, as well as some background on my setup to put it in perspective.

When something is uploaded here, we like to have the latest uploaded thing show first so that everyone on the network can just open the home page and see the latest uploaded album/etc minutes after it's uploaded.

To accomplish this, we've done 2 things.
[1] We've modified the home page code (using a related post on this forum) so that the home page always shows the 'recently added' section upon login.

Because recently added only shows whats current as of the last database update, it wont show new albums added an hour or 2 after the last database update. To address that I did:

[2] created a bash script that runs every 5 minutes which uses the login string from my above post, and saves the session cookie to file. It then hits the search update url in my above post using that same cookie, which kicks off the manual update.

This allows anyone logging in or viewing the front page to always see the most recent additions.

For those wondering additional details, current collection is roughly 400GB of music, database updates usually take 10-15 seconds, subsonic installation and database currently resides on a 60gb SSD. Media is on a 4TB raid.