by cdarbro » Mon Jul 25, 2011 8:07 pm
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.