Bug Report for Quick Convert script

GO TO ADMIN PANEL > ADD-ONS AND INSTALL VERTIFORO SIDEBAR TO SEE FORUMS AND SIDEBAR

name99

New member
Joined
Aug 4, 2010
Messages
1
Points
0
Hi Doug --- don't know a better way to contact you.

I've used both "Quick Convert" and "MakeBookmarkable" for a while now, but I noticed that using Quick Convert to create a .m4b was not working.
I spent some time comparing the two scripts and doing some debugging, and my ultimate conclusion is that there is some sort, I don't want to say race condition, but that sort of thing, in Quick Convert.

(This is with iTunes 9.2.1(4) and OSX 10.6.4)

Specifically:
(a) The visible problem is that the files simply are not made bookmarkable. They have a .m4b suffix, BUT they live in the music part of the iTunes world, not the audiobooks part; as can be seen by looking at their Media Kind.

(b) In the function make_bookmarkable, if, in the on error m number n block I stick a display dialog, I get
"File Permission Error" -54.

(c) If I stick various display dialogs throughout make_bookmarkable to try to track this down, the error goes away.

(d) In fact, the easiest way to make the error go away is simply, in the main loop
if bm_opt is "Yes" then
ADD THIS LINE delay 1
set newT to my make_bookmarkable(newT)
end if

(e) So what appears to be happening is that at some point between the creation of the file (the actual transcoding operation) and when we want to #### around with trying to set its attributes to make it bookmarkable, the file is locked in use by someone else (spotlight/mds? iTunes claiming it has finished the file although it has not really?)

I'm no AppleScript expert --- my debugging abilities are limited to adding display dialog lines --- so I can't go further than this; but while my quick solution appears to work, it's obviously less than ideal.

I guess the real solution is to
(a) figure out what the issue really is
(b) cope with it in some more robust manner. This might be, for example, encapsulating whatever the offending line of code is that generates the permission error in a try within a loop --- try, if we get an error wait a second and try again, for a maximum of ten seconds, or something like that.

Anyway, thanks for providing both Quick Convert and MakeBookmarkable!
 
Top