Library scanner wastes time on iTunes "Album Artwork" folder

Bug #637488 reported by RAFFI TEA
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
Low
RAFFI TEA

Bug Description

I am a Windows user and all my audio files are in the standard music folder.

Unfortunately, the iTunes folder is located within that folder. Within the iTunes folder there is a folder called "Album Artwork" containing hundreds of sub directories for album arts but no audio files.

My attached patch puts "Album Artwork" on a black list. The library scanner won't scan the folder and saves a lot of time.

Related branches

Revision history for this message
RAFFI TEA (raffitea) wrote :
Revision history for this message
RAFFI TEA (raffitea) wrote :

The patch also deletes the TIOs from the 'tracksToAdd' list after bulk inserts have taken place.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Nice catch on the lack of deletion of the tracksToAdd. Oops!

Albert and I agree that skipping the art folder is probably never going to get us into trouble.

In the future, if we have even more files to blacklist, we may want to switch to a QSet of QStrings for checking if things are on the blacklist. For one test I think its probably slightly faster to just compare it to the art folder path, since it can early-exit if the two strings are of unequal length (Qt does this in its QString implementation, I checked).

Thanks!

Changed in mixxx:
milestone: none → 1.8.0
assignee: nobody → RAFFI TEA (raffitea)
importance: Undecided → Low
status: New → Fix Released
status: Fix Released → Fix Committed
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

One last comment, when iTunes is in a different language, will this still work? I think the path 'iTunes/Album Artwork' will probably be different in (for example) the Japanese version of iTunes. The English version is probably 90% of our users but maybe there's a better way around this? Does iTunes store any registry keys that provide this?

Revision history for this message
RAFFI TEA (raffitea) wrote :

Of course, I assume a standard installation of iTunes. On Windows my patch should work regardless of the language. From registry, I read the path from the music folder and append "iTunes/Album Arts". This is similar to what I did in iTunesTrackModel::getItunesMusicPath() a long time ago.

On OSX we have probably similar issues. My patch should work as well. But I don't have OSX and don't know if different languages affect file and folder names.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Yea, I see how you get the My Music folder correctly in a language-independent way. I meant does iTunes always call the Album Art folder "iTunes/Album Art" I guess my first question should be, does Apple provide localized version of iTunes for different languages? A quick scan of their download page seems to suggest no (they have an En Espanol page, but it looks to download the same binary), so maybe this isn't an issue.

Revision history for this message
RAFFI TEA (raffitea) wrote :

Just googled around on some French pages. Although my French isn't the best, it seems like the iTunes folder is same for any language

But I observed that on OSX the music folder is called "Musique". Is there's a way to find out the music folder dynamically?

Revision history for this message
Albert Santoni (gamegod) wrote : Re: [Bug 637488] Re: Library scanner wastes time on iTunes "Album Artwork" folder

http://doc.qt.nokia.com/4.6/qdesktopservices.html
see:
QDesktopServices::MusicLocation

Albert

On Tue, Sep 14, 2010 at 1:35 AM, RAFFI TEA <email address hidden> wrote:
> Just googled around on some French pages. Although my French isn't the
> best, it seems like the iTunes folder is same for any language
>
> But I observed that on OSX the music folder is called "Musique". Is
> there's a way to find out the music folder dynamically?
>
> --
> Library scanner wastes time on iTunes "Album Artwork" folder
> https://bugs.launchpad.net/bugs/637488
> You received this bug notification because you are a member of Mixxx
> Development Team, which is subscribed to Mixxx.
>

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Tobias, Albert, and anybody on OSX or Windows, can you try this patch to make sure that

a) Your iTunes library still loads
b) It skips the album artwork folder

http://pastebin.com/YgmkR12f

Thanks,
RJ

Revision history for this message
RAFFI TEA (raffitea) wrote :

All good on Windows but note that the variable 'musicfolder' is written 'musicFolder'.

Revision history for this message
Albert Santoni (gamegod) wrote :

Here's an updated version of the patch that fixes the typos Tobias
pointed out, and makes refactors the code in the library scanner to be
a blacklist, which now includes the _Serato_ directory on Windows.

Tested on OS X and my iTunes library still loads fine. I couldn't tell
if it was skipping my iTunes art directory, the scanner went too fast.
:)

Albert

On Tue, Sep 14, 2010 at 3:37 PM, RAFFI TEA <email address hidden> wrote:
> All good on Windows but note that the variable 'musicfolder' is written
> 'musicFolder'.
>
> --
> Library scanner wastes time on iTunes "Album Artwork" folder
> https://bugs.launchpad.net/bugs/637488
> You received this bug notification because you are a member of Mixxx
> Development Team, which is subscribed to Mixxx.
>

Revision history for this message
Albert Santoni (gamegod) wrote :

The latest version of this patch is in 1.8 now...

RJ Skerry-Ryan (rryan)
Changed in mixxx:
status: Fix Committed → Fix Released
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/5515

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.