![]() |
It is well known that Spotlight only indexes those files that it recognizes as being textual in nature. For other types of files, it relies on applications providing an "importer".
If a file doesn't have an extension or a creator code or type code, then Spotlight will generally ignore it. It doesn't look inside the file to see if it can guess what type it is from the contents (like the 'file' command does). I think that once it is indexed, however, the index follows it around by using its internal file-id instead of its name. |
PS and my mp3s are still not getting updated. Listened to this in its entirety a few minutes ago with iTunes 6.03 on 10.4.5, not even a 2006 date!:
Code:
stetner 2396 $ mdls /Volumes/G5Repos/iTunes\ Music/Nena/Unknown\ Album/99\ Luft\ Balloons\ -\ German.mp3 |
I ran into this problem with Spotlight in 10.4.4 from time to time.
The only way I seemed to ensure that it always worked was to calculate the number of seconds since midnight 01/01/2001 to the point in time I was interested in separately, and feed that number of seconds into the search. I wrote an Applescript in this thread using this idea. |
Quote:
Still no joy on my mp3s and iTunes! |
Quote:
|
Well, it was an odd intenrion to make files 91-100 but not try to find them then. ;-) it looked to me rather as if you hadn't noticed that you had not yet incremented i yet. Never mind, that's not important.
I have to run now, but I'm going to check later. I'm wondering if maybe using $time somehow constrains mdfind not to look in subdirectories - although it does so for text attributes. That seems to peculiar that it's hard to believe, but it's the only thikng that looks even halfway plausible at the moment. |
Quote:
Code:
#!/bin/bash |
It looks like I was right. The scrip abobe creates the files, but every time it tries to use mdfind to find them, I get this:
Files found by "mdfind -onlyin /Users/berkowit/1140233658 'kMDItemFSCreationDate >= $time.now(-3600)'": -bash: Data/eval: No such file or directory So there we are: OMM, mdfind -onlyin /Users/berkowit/1140233658 can't find any of the 100 files in its subfolder Data when using $time.now(). But on yours it can? |
Quote:
So the script is failing for some reason. I don't think you have really tested mdfind at all here. I've been trying to figure out what might make the script give that error message but I haven't got any ideas yet. It is very strange. Why would it say "Data/eval: No such file or directory" ? I really can't figure out what circumstances would lead to that error message. Could you please try a few things? First off make sure that your script has the correct (Unix style) line endings. There is a section in this Unix FAQ about the line endings issue. That section has a one-line Perl script that will fix the line endings if needed. I mention that since incorrect line endings sometimes result in strange error messages. Secondly, try changing the name of the subdir - e.g. make it be: subdir=Paul instead of subdir=Data This is just to verify that the name in the error message is indeed the name of the subdir. |
Quote:
Code:
sudo mdutil -s /Volumes/* |
Paul Berkowitz:
Any more word on that script - did you figure out what was going wrong with it? (see my suggestions above) stetner: Is the problem perhaps confined to iTunes? What if you manually modify one of the MP3 files on that volume - does the change show up in the results from 'mdls' and/or 'mdfind' ? |
Quote:
Code:
Original today: |
For the songs that I have tried (that are on my internal disk), it seems that playing them in iTunes (by selecting them in the list and pressing the Play button) does not update the LastUsed entry.
But if I use the command-line 'open' to play the file then it does update "Last Used". (And 'open' does play the song in iTunes since that is the app registered for MP3's) I selected "Free Man in Paris" from the list in iTunes and started it playing. I waited until the song ended. Then I went into the Terminal and ran the following commands: Code:
% mdls "iTunes/iTunes Music/Joni Mitchell/Court and Spark/Free Man In Paris.mp3" | grep Used |
Now we are onto something! 'open seems to do a whole lot....
Code:
2461 $ mdls /Volumes/G5Repos/iTunes\ Music/Nena/Unknown\ Album/99\ Red\ Balloons\ \(English\).mp3 Interesting! |
Hmmm, the composer field isn't part of a song's metadata!
Comments are included, but not the composer. That's kinda lame. |
| All times are GMT -5. The time now is 10:20 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.