Page 1 of 1

ITunes Import Failed -- NOT?

PostPosted: Thu Apr 28, 2016 2:41 pm
by jmvenable
I've been experimenting with a watch folder for an iTunes import rule (yeah I know one exists in iTunes already) in Hazel. The rule is simple: if kind is music

System notification: Importing file.xxx
Import into iTune Playlist Jazz
Move to Trash

Here are my questions and discoveries:
1. As I have found out, one has to check "Share iTunes library XML" in iTunes' Prefs. PLEASE put those kinds of hard requirements into your help verbiage. Cost me 15 minutes.
2. Once checked, Hazel presented the following "playlists": Library, ####.####, iTunesU, Podcast, Apps, Purchased, and Books. Not the "playlists" i was expecting. Missing were all of my Smart Playlists including one called "Jazz". I then created a dumb Playlist called Jazz and selected it (I thought). Importing then worked, but the song only appeared in the smartlist Jazz.
3. Success ended on the second album. This time I put a folder of mp3s into the watch folder. Not surprisingly, nothing happened, I imagine because its kind is Folder, not Music. So, I pulled two cuts from the subfolder into the main level of the watch folder. I get a notification: "iTunes import failed; could not add file xxx to iTunes." This turns out to be untrue; it has been successfully copied into the iTunes Music folder. However, the file was not trashed.

So, sorry for the length: my specific questions are:
1. Why require a playlist at all? Make it optional. And make it work with smart playlists.
2. Why am I getting a failed notice for a successful import?
3. Is there syntax around to allow a folder of tunes to be processed? Could you point me to it or something similar?
4. If its knowable, what is the ####.#### playlist?

Thanks, JV

Re: ITunes Import Failed -- NOT?

PostPosted: Fri Apr 29, 2016 9:56 am
by Mr_Noodle
Hazel 4 will no longer require it as it will fall back to another method should the XML file not be available. Unfortunately, it can be much slower if the library is large. Playlists aren't required. You can add to the Library as a whole.

As for Smartlists, you cannot add things to one as it doesn't make sense. The nature of Smartlists is that it has condition which determines what is in it. If anything matches those conditions, then it is automatically included. If they don't match, then they shouldn't be in there and you can't force the item in there.

If Hazel reports failure, it's because (a) iTunes reported failure or (b) Hazel timed out (i.e. iTunes took too long). You'll need to check the logs to see what happened there.

Folders can be imported like files.

Don't know anything about a ####.#### playlist. Hazel just shows what iTunes gives to it.

Re: ITunes Import Failed -- NOT?

PostPosted: Fri Apr 29, 2016 12:16 pm
by jmvenable
If iTunes gives its user "playlists" named iTunesU, Podcast, Apps, Purchased, ####.#### and Books, I suggest that Hazel not display those as valid import choices. Looks like a bug. Similarly, its odd that Hazel would report an import error that didn't occur. But it did. I may send the log if it happens again.

Good to hear folders get processed as well as folders. That's why I was surprised when I dropped a folder into the watch folder and nothing happened. And then that's why I asked the question, "what is the syntax or process that allows a folder to be processed?" Merely dropping it into the watch folder isn't enough.

Re: ITunes Import Failed -- NOT?

PostPosted: Fri Apr 29, 2016 1:15 pm
by Mr_Noodle
Actually, checking it here it does seem like a change in El Capitan (or maybe a more recent version of iTunes). I'll look into that.

Except for a timeout, Hazel reports what iTunes tells it. Hazel doesn't know anything about what iTunes is doing internally and has to trust that iTunes is reporting things accurately. Again, the logs would shed more light on thing.

If something isn't being processed, it may be because of a myriad of factors possibly unrelated to the iTunes import action. I suggest going through the stickied troubleshooting guide to help narrow it down.

Re: ITunes Import Failed -- NOT?

PostPosted: Fri Apr 29, 2016 3:12 pm
by Mr_Noodle
Ok, poking at it a bit more, it seems this is already fixed in the 4.0 branch but not in the current versions. I've been using version 4 almost exclusively recently but happened to downgrade to version 3 for something else and that's when I saw the issue.

So, if you are upgrading to version 4, it shouldn't be an issue there. Depending, I may consider back-porting the fix to the version 3 series.

Re: ITunes Import Failed -- NOT?

PostPosted: Sun May 08, 2016 5:12 am
by Leon van Bokhorst
jmvenable wrote:1. As I have found out, one has to check "Share iTunes library XML" in iTunes' Prefs. PLEASE put those kinds of hard requirements into your help verbiage. Cost me 15 minutes. [..]


I second that. Thanks for mentioning it 8)