Searching iTunes databfase freezing v2.1.31

Hi Torban,

First, congratulations with your 30th Birthday (I think you didn’t receive my e-card…)?

I have found a problem with the iTunes database after installing the latest version of mAirList. When searching the database mAirList, and the computer, are freezing and a long time nothing is happening till mAirList founds what I was looking for. With older versions searching goes fast.

You wrote that you changed something to search in ALL otf databases what is really perfect, but didn’t try it for now.

Vincent

Hm, yes, there is a little problem here. Let me explain.

Previously, the database backends (iTunes, eldoDB, radioDB, OTF) used a special data format to pass the search result to the browser. That format didn’t allow to query more than one database at a time. Since v2.1.30, each database creates a (hidden) IPlaylist object in which the matching items are inserted. That playlist is then displayed by the browser. In case you choose to query all databases at the same time, the result playlists are concatenated using the AppendPlaylist method of the IPlaylist interface.

The problem is that iTunes does store any mAirList metadata. This means that, when “importing” an item from iTunes, the file needs to be opened and scanned for a mAirList ID3 tag, as well as auto position scanning (cue in, fade out, cue out) is applied in case you enabled it in the config. The latter causes a significant delay. Previously, it would only be done if you finally added the item to the main playlist, but now it’s done for any file matching the search criteria. This is certainly not desirable.

Unfortunately, there is no way to delay the scanning. It needs to be done in the moment the file is first added to an IPlaylist object. So the only solution I see is to disable it completely for files imported from iTunes through the database search function. However, this would mean that you only get the artist and title from iTunes, but no other mAirList metadata found in the ID3 tags, mmd files or determined through the auto position functions :frowning:

Torben

HI Torben,

I think I understand what you mean… First of all, I dislike iTunes to use. So for me it isn’t a problem if the iTunes database isn’t working correct anymore with mAirList. The new “search All OTF databases” is working great and I decided to use that function from now on!

Is a scheduled rescan of the OTF databases in the background possible? Not only true or ‘not true’ in the config?

Vincent

Try this script:

[code]var i: integer;

begin
for i := 0 to Engine.GetDatabases.GetCount - 1 do
Engine.GetDatabases.GetItem(i).Connect;
end.[/code]

It causes a reconnect of all databases. For OTF, it means that the directory will be scanned/updated again, just like at program startup.

Try this script:

[code]var i: integer;

begin
for i := 0 to Engine.GetDatabases.GetCount - 1 do
Engine.GetDatabases.GetItem(i).Connect;
end.[/code]

It causes a reconnect of all databases. For OTF, it means that the directory will be scanned/updated again, just like at program startup.

Hmmmm nothing happened. Do I need to put auto rescan is ‘true’ in the config?

Vincent.

Yes, you have to enable it.

And I did receive your card, yes. Thank you for that! And sorry that I haven’t replied yet, I have been rather busy since the weekend.

Torben