I am listening to a few podcast, and in order to get through more in a shorte time, I convert them to AAC bookmarkable (I have been using QuickConvert or Make Bookmarkable for this). This have been working fine, but I would like to automate the process a little more than these tools make possible.
I have been trying to make an AppleScript that will convert the podcasts for me, and automatically adding them to the right playlist. This is my first attempt on AppleScripts, so I am sure things could have been done differently, but it seems to do the job to some extent. Below is my current version of the function. I have a loop that calls this with all my podcasts.
The trouble is that the resulting file does not end up as something I can play faster (in the Audiobook section). It ends up in the Music category of iTunes. If I just run the script “Make Bookmarkable”, it works fine, so I guess there is some “secret” thing this scripts does that I don’t (or it does it in a different way). Are there anyone who has any idea of what I am doing wrong?
on convertTrack(orgTrack, curPlaylist)
with timeout of (30 * 60) seconds
tell application "iTunes"
set convertedTrack to convert orgTrack
set bookmarkable of item 1 of convertedTrack to true
set orgFilePath to (get location of orgTrack)
delete orgTrack
set convertedFilePath to (get location of item 1 of convertedTrack)
delete item 1 of convertedTrack
end tell
tell application "Finder"
set (name extension of convertedFilePath) to "m4b"
end tell
tell application "iTunes"
set addedTrack to add (convertedFilePath as alias) to (playlist curPlaylist)
end tell
tell application "Finder"
move file orgFilePath to the trash
end tell
end timeout
end convertTrack