Page 1 of 1
Adding music via Dropbox

Posted:
Fri Jan 29, 2010 3:07 pm
by jessegray
I've created a folder on my Dropbox, so that when I download a song from Amazon mp3, it will get dropped there. I want that to automatically get added to iTunes on every Mac I have.
So, I created a Hazel rule that says...
If size is greater than 0 bytes,
Import into iTunes
Well, when I download an album, only 4 or 5 of the tracks get added to iTunes. It's like the rule runs before all the files have been updated on Dropbox. Then, if I manually run the rule, it creates duplicates of the 4 or 5 that were previously imported.
What am I doing wrong?
Re: Adding music via Dropbox

Posted:
Mon Feb 01, 2010 1:26 pm
by Mr_Noodle
It's an issue with DropBox. The only way for Hazel to know if a file is in use/not finished downloading is for the app that is modifying the file to do locks on the file. There is a standard mechanism on OS X which DropBox is not adhering to so Hazel has no way of knowing.
You can try doing something like:
"Date modified is not in the last 5 minutes"
That will add a buffer where Hazel won't do anything with the file until sometime after it was last changed. It's not foolproof but should cover most cases. You should also bug the DropBox guys and have them implement the proper locks. I'll also drop them a note but the more people that do so, the more likely they'll actually fix it.
Re: Adding music via Dropbox

Posted:
Mon Feb 01, 2010 2:17 pm
by jessegray
I figured it was something like that. Great idea! I'll give that a shot and post back here with the results.
Thanks so much.
Re: Adding music via Dropbox

Posted:
Tue Feb 02, 2010 12:52 pm
by Mr_Noodle
I also sent them a message with a link to an Apple technical note describing the file locking mechanism. We'll see if anything changes.
Re: Adding music via Dropbox

Posted:
Wed Feb 03, 2010 1:23 am
by sjk
I wonder if improper locking is why I couldn't get an EyeTV program guide download to generate a single Growl alert using Hazel when trying that ages ago. Maybe I'll revisit that again using "Date modified is not …".