This page looks plain and unstyled because you're using a non-standard compliant browser. To see it in its best form, please upgrade to a browser that supports web standards. It's free and painless.
| « | June 2005 | » | ||||
|---|---|---|---|---|---|---|
| Su | Mo | Tu | We | Th | Fr | Sa |
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 | ||
Digitial Commercial Transition Video
Audio mixing with VMWare on Linux host
24 hours of Google Reader Shared Items
links for October 2, 2008
NuevaSync
Virtual Machines
Moving to Windows
Vista on Mac mini
Insecure wifi
links for September 7, 2008
I have been getting frustrated that the podcasts that were being put into iTunes from Shrook were not being put into a single playlist. So I have been looking for some solutions. I first tried to create a smart playlist, but you can not create rules based upon the location of the files.
I have been working on an AppleScript that would automatically copy the tracks from Shrook into a playlist. Below is what I have come up with so far.
The problem with this implementation is that it iterates over every item in the iTunes Library, so it takes a long time. I am going to change it so it only iterates over the files that have been downloaded by Shrook
-- Path to the Shrook attachment folder
property pathToShrookAttachments : ""
-- name of the playlist
property podcastPlaylist : ""
if pathToShrookAttachments is "" then
set pathToShrookAttachments to choose folder with prompt "Choose your Shrook Attachments folder" default location ((((path to application support from user domain) as string) & ":Shrook2:Attachments") as alias)
end if
if podcastPlaylist is "" then
set dialogResult to display dialog "What playlist should podcasts be added to?" default answer "Podcast"
if button returned of dialogResult is "OK" then
set podcastPlaylist to text returned of dialogResult
end if
end if
tell application "iTunes"
if not (exists (some playlist whose name is podcastPlaylist)) then
set new_playlist_id to (make new playlist with properties {name:podcastPlaylist})
else
set mySource to container of view of front window
set new_playlist_id to playlist podcastPlaylist of mySource
end if
set trackList to {}
if duration of new_playlist_id is greater than 0 then
set trackList to (get database ID of (every file track of new_playlist_id))
end if
display dialog "Checking tracks..." buttons {""} giving up after 2
repeat with t from 1 to count of every file track of library playlist 1
with timeout of 300000 seconds
try
set aTr to (file track t of library playlist 1)
set trackLoc to location of aTr as string
if ((offset of (pathToShrookAttachments as string) in trackLoc) is 1) then
-- This track came from Shrook
if trackList does not contain aTr's database ID then
-- the track has not been added to playlist
duplicate aTr to new_playlist
end if
end if
end try
end timeout
end repeat
end tell
Technorati Tags: AppleScript
This
work is licensed under a
Creative Commons License.
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
January 2004
Computer [766]

Electronics [206]

Blogging [112]

Links [71]

Cars [64]

General [134]

Gadgets [62]

Phone [46]

Family [13]

Games [26]

moblog [4]

Hardware [19]

Third Time Dad
Engadget
Autoblog
Geek News Central
Jessica's Blog
atmaspheric | endeavors
Paint the Tiger • Carve the Swan
TiVoBlog
SuperJason's Personal Blog
Forever Geek
sprocket i/o
Slacy's Blog