Page 1 of 1
Rescan Content Directories Vs Rebuild Databases
Posted: Wed Nov 25, 2009 8:49 pm
by Dwill
I have searched and not found an answer. What is the difference between 'Rescan Content Directories' and 'Rebuild Databases'? also if I set the rescan interval to -1 (monitor content directories) should TwonkyMedia Server empty the database and rescan when it is restarted?
Sorry if this is a bit elementary but I have looked.

Re: Rescan Content Directories Vs Rebuild Databases
Posted: Thu Nov 26, 2009 5:46 pm
by Briain
Hi
I've just written a wee bit about Twonky 5.0.68 on the Linn forum. As it covers some of the issues you are asking about, below is an updated version of I typed with a few additional paragraphs to cover what you have asked:
Rebuild or Rescan:
A full database rebuild is only really required if you either have a problem with a corrupt database, or if you have changed a significant quantity of 'tags' and the rescan hasn't picked them up. Many folks use Twonky on a NAS and the tag editors don't change the timestamps on the files; you can either update these all yourself, or if there are a lot, simply go for a rebuild. A full Twonky 5.0.68 rebuild on my ReadyNAS (18,000 FLAC files) takes about 90 minutes (not including the 20 minutes to delete the previous database). A rescan of the content directories is what you do after adding a new album. As opposed to deleting the database and starting from nothing, the rescan finds the additional album and augments the existing database to add the new information. On my ReadyNAS, the rescan takes only about 10 minutes and I can then play the new album.
Playlist bug (Twonky 5.0.xx):
Twonky 5.0 (all versions) has a bug where you can only pick up the playlists by setting the rescan to -1 (which sets Twonky to continuously monitor for new music additions). When you do that (and restart Twonky via the Twonky web interface 'restart server' button) it automatically rescans the content directory and picks up the playlists okay. You can either leave it at -1 (note the info below about how to upload music to your NAS with rescan at -1) or change it back again to 0 once it's finished the rescan. The playlists will still be there when you change it back to 0, but to pick up any new ones, you'll need to repeat the process. I've raised this with PV and believe it's been fixed in 5.1. I'm waiting until 5.1 is properly released before designing custom trees for it so it might be a wee while before a suitable version appears here.
Rescan setting of -1:
If leaving rescan at -1, If you try to upload new media directly to the monitored directories, Twonky starts scanning part way through the upload and this causes a problem. To get round this, when uploading new albums to the NAS, first upload to a folder outside the Music one monitored by Twonky (so if you have Music, Pictures and Videos, create a fourth folder called Uploads) then once it's on the NAS, drag and drop it from 'Uploads' to it's final resting place within the 'Music' folder and it will show up on your control point for playing a few seconds later. This second move from 'Uploads' to 'Music' is instantaneous; it's not moving the actual data, just changing the 'pointer' to where the data is.
The best rescan options are either 0 (and you can use the rescan button to pick up new music or create a desktop shortcut to: http://your.nas.ip.address:port/rpc/rescan ) or -1 with the above precautions about uploading new media. Setting it to something like 60 minutes (which many folks do) is totally pointless as this will simply kick off a rescan every 60 minutes which just causes stacks of disk thrashing and uses up resources unnecessarily.
Hope that makes sense but ask if you are unsure about anything above.
Bri
Note that leaving rescan at -1 is fine (that's how I have it) but if you switch your NAS off when not in use, Twonky has to rescan every time you start the NAS up. That's not a problem, but it does mean the NAS is 'busy' for about 15 minutes after each boot (which can be a serious pain in the ass if you need an urgent document from it). If you switch the NAS off every night, maybe better to leave rescan set to 0; that's up to yourself and depends on how you use it, what you use it for and how irritating (or not) any post boot delays could be.
Re: Rescan Content Directories Vs Rebuild Databases
Posted: Thu Nov 26, 2009 6:27 pm
by Dwill
Many thanks for your excellent and thorough reply. You answered all my questions.
Being a new registered user I went straight to version 5 and have spent quite a lot of frustrating time trying to get V5.0 and even 5.1 RC3 to work reliably. (I also run Squeezecenter on the same server) I have just tried V4 and now everything appears to be working perfectly as well as a much faster database build.
Thanks again for your help.
Re: Rescan Content Directories Vs Rebuild Databases
Posted: Thu Nov 26, 2009 6:35 pm
by Briain
Hi
I'm using a custom version of 5.0.68 on the ReadyNAS and it works pretty well; I've posted a long post with lots of info which might (or indeed might not) be of interest, here:
http://forums.linn.co.uk/bb/showthread. ... 0#pid38260
Bri
