Bug 2410 - Missing tracks in Slimserver database when adding new songs to iTunes
: Missing tracks in Slimserver database when adding new songs to iTunes
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: iTunes
: 6.2.1
: Macintosh MacOS X 10.4
: P2 normal (vote)
: ---
Assigned To: Dan Sully
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-10-28 12:50 UTC by Neil Baldwin
Modified: 2008-09-15 14:38 UTC (History)
0 users

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Neil Baldwin 2005-10-28 12:50:10 UTC
I have iTunes set to automatically refresh (60 seconds by default). More often than not, if I rip a new CD 
with iTunes, even thought the whole albume appears correct in the iTunes database, Slimserver will 
only show one or two songs for the album. Sometimes if i rip several albums in one session, whole 
albums will be missing. Doing a rescan does not fix it, I have to manually delete the slimserver 
database and associated files from my Mac and the restart the server to make it do a total rebuild. This 
has been in the last few updates (6.1.x onwards I think).
Comment 1 Blackketter Dean 2005-11-03 16:06:03 UTC
Dan: any idea on this?
Comment 2 Dan Sully 2005-11-03 16:08:51 UTC
Neil - what is your iTunes rescan interval set to?

Comment 3 Neil Baldwin 2005-11-05 07:02:49 UTC
Its set to 60 seconds. I was wondering if the server ends up confused as with 
this kind of interval, the likelyhood of trying to refresh while the disc is 
being ripped is quite high? 
Comment 4 Dan Sully 2005-11-05 10:17:45 UTC
That's the conclusion that I came to as well - please bump it up to 3600. We'll be changing the defaults for 
6.2.1

Let me know if that helps. Thanks.
Comment 5 Neil Baldwin 2005-11-05 11:46:31 UTC
Will do in the next few days, I'm away from home at the moment.
Comment 6 Neil Baldwin 2005-11-07 11:24:39 UTC
Dan, I've set the refresh to 3600 and will do some importing to see if it cures it. Something just struck me though - even though decreasing the refresh rate in this way will *lessen* the likelyhood of the server reloading the iTunes database during ripping of a CD, it won't eliminate it altogether. It can still occur, just less often.

What about an option to stop the refresh (I know, setting it to 0 already does this) and having a button to manually reload the iTunes database? We already have a Rescan button but, in my understanding, I don't think this is the same behaviour? Certainly the iTunes auto reload is extremely fast compared to the manual rescan, even with the Clear Cache option not selected.
Comment 7 KDF 2005-11-07 11:26:34 UTC
selecting "do not use iTunes" then reselecting "use iTunes" will start an new scan on just the iTunes library.
Comment 8 Dan Sully 2005-11-07 11:31:31 UTC
As will the rescan button.
Comment 9 Neil Baldwin 2005-11-07 13:05:21 UTC
Ah, cool. I'll try that then.

As a possible future fix, can you poll iTunes to see what it's doing. That way, if iTunes is ripping a CD or importing songs, Slimserver would know not to bother it that time around?
Comment 10 Dan Sully 2005-11-07 13:07:00 UTC
Determining iTunes' status was something I looked into on Friday - unfortunatley there doesn't appear to be any way to do that. AppleScript exposes that it's either playing or stopped, but nothing about ripping/importing.
Comment 11 Neil Baldwin 2005-11-07 14:06:26 UTC
Hmmmm. I tried the manual rescan and it took just over 35 minutes (23,000 songs). This is not so good if I've just added an album to iTunes and want to listen to it right away on my Squeezeboxes. :(

Does Slimserver do some transformation/conversion of the iTunes database? This seems a long time to just reload a database file.

Also, is there no way you can take adavantage of iTunes built-in dynamic playlist "Recently Added"? Seems like iTunes does the job for you, all Slimserver needs to do is mirror these additions. Perhaps :)

I'll try the iTunes on/off trick next, see if that's any better.
Comment 12 Neil Baldwin 2005-11-07 14:22:44 UTC
Tried the iTunes on/off trick. 10 minutes in and the server is still busy. I'm guessing it's going to take just as long as the rescan.

What about doing this;

- leave the iTunes auto-reload on (set to 60, not really important)
- Stop the server
- Rip the CDs
- restart the server

What would happen then? Would it do a full reload or just find the new songs?


Comment 13 Dan Sully 2005-11-07 15:46:47 UTC
Although it's no consolation now - our future plans include splitting the scanning off from the main server to be much more efficient.

I've checked in a change 5081 which increases the default rescan interval.

With such a large library as you have, using iTunes it's best if you set the interval to 0 and do a nightly scheduled rescan.

Moving to 6.5 now, as it's become an architecture issue.
Comment 14 Neil Baldwin 2005-11-08 04:12:25 UTC
Hmmmm, OK. Guess a fix will be a good while off yet then.

In the meantime, would my suggestion work - stopping the server while I rip new CDs and then restarting it once ripping/importing has finished? Appreciate what you say about the overnight rescan but I don't much like the idea that if I rip a new CD, I can't listen to it until the day after :(

Alternatively, in your opinion, should i NOT be using iTunes? Is performance (in relation to this bug) better without it?
Comment 15 Dan Sully 2005-11-08 09:53:01 UTC
My personal opinion is to not use iTunes - but some want the 'Smart Playlist' functionality or Podcasts.
Comment 16 Dan Sully 2006-04-29 13:35:28 UTC
Neil - this should be fixed / much improved in the official 6.2.2 release found at:

http://slimdevices.com/download

Please reopen if you can reproduce or it's still unbearable.

Thanks