I've had a problem that may or may not be identical to what others are having. I also have some workarounds, and some additional info that might help Apple debug the problem.
Ever since I upgraded to iTunes 10.0, it occasionally gets into a state where new songs that I add don't appear. Here are the exact details:
* The track is not visible in the main list view.
* The track can't be found by any smart playlists that I create.
* The file
does get successfully moved or copied to the right place in my filesystem ("/Volumes/Titled/iTunes/iTunes Media/Music/$artist/$album/$track $title.ext").
* Using Applescript to search for the track in "first library playlist" works.
* Using Applescript to search for the track in "first playlist whose special kind is Music" turns up nothing.
* Refreshing the track via Applescript has no effect.
* Adding the same file again via Applescript returns the same ID every time (so iTunes already knows it has the file, and isn't adding duplicate tracks or anything).
In other words, the problem is that the files aren't being added to the Music playlist. A bit of snooping with Applescript and by grepping the XML library file verifies this.
Generally, once this starts happening, it happens for every file that I add. It doesn't matter whether I add them through drag&drop, the menu, the "Automatically Add to iTunes" directory, or Applescript. It doesn't matter whether they're within my media folder or outside of it. It doesn't matter whether I add a file at a time or a whole directory. It doesn't matter whether I add music or videos (which likewise fail to appear in the Movies playlist). Quitting and relaunching iTunes has no effect. Neither does rebooting. Neither does adding additional files.
Removing files from the library sometimes fixes it. So does opening files instead of adding them (e.g., by double-clicking an MP3 in the Finder, which causes it to be added and then played). So does converting existing library files into a new format. None of these are reliable, but if you do any of them over and over it seems like eventually the problem goes away. I have no idea
why any of these should work when adding more files doesn't, of course.
Once the problem goes away, it seems like all missing files suddenly appear, or at least more than one does. Then, everything is fine, until it breaks again. (I have no idea what causes it go into this state.)
So, my first workaround is an Applescript that removes the last-added file from the library and then adds it back. I switch to the List view sorted by Date Added and run this script over and over until a new file suddenly appears.
Then I found out how to make the Library playlist visible. I did this by "defaults write com.apple.iTunes show-library-playlist -bool TRUE; defaults write com.apple.iTunes hide-library-playlist -bool FALSE", but most users would probably prefer the GUI at
http://dougscripts.com/itunes/scripts/ss.php?sp=changehiddenprefs for this. Then you can forget about the fact that your Music playlist is broken, because Library works fine. Except that some things (like smart playlists, iPod sync, etc.) will still be broken.
I tried all of the other ideas in this thread, to no avail. Needless to say, the "iTunes Media Folder Location" setting in Prefs has been correct all along, and the permissions in that directory are fine; otherwise, iTunes wouldn't have been able to move/copy files there, etc.
I sent feedback with all of these details to Apple, including the specific Applescripts I ran to test the problem. Maybe if we're lucky, they'll be able to repro it, and fix it for iTunes 10.2.