Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Organize podcasts automatically via AppleScript Apps
When using iPodder to download podcasts to iTunes, iPodder will put the podcasts into their own playlists. If you're downloading a lot of podcasts, this will make you source list very messy. By running this AppleScript after each download (which iPodder can do automatically), all the podcasts will be put into the "Podcasts" playlist instead, and their genre will all be changed to Podcast, keeping everything neat and tidy.

In iPodder's preferences, use this line to run this script after each download:
osascript -l 'AppleScript' path/to/script.scpt
The listofpl variable at the start of the script needs to be set to the name of the playlists that are created for the podcasts you download. The first time you download a certain podcast, you won't know which playlist it will create, so you can add it to the list afterwards, and run the script an extra time.

[robg adds: I haven't tested this script...]
    •    
  • Currently 1.75 / 5
  You rated: 2 / 5 (4 votes cast)
 
[9,519 views]  

Organize podcasts automatically via AppleScript | 3 comments | Create New Account
Click here to return to the 'Organize podcasts automatically via AppleScript' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Organize podcasts automatically via AppleScript
Authored by: raysl on Mar 03, '05 10:54:20AM

in iPodderX you can specify a custom playlist for all your podcasts to go into, helps keep down the clutter.



[ Reply to This | # ]
Organize podcasts automatically via AppleScript
Authored by: jstripli on Mar 03, '05 03:09:05PM
If you want it to grab your list automatically, or if you have a lot of pod casts you can change the first line from
 set listofpl to {"In Our Time", "Inside Mac Radio", "Adam Curry Daily Source Code"} 
to having listpl grab the results of a shell script like:
 grep \# ~/iPodderData/favorites.txt | tr -d "#"| cut -c 2-100 |  awk '{print "\""$0"\","} ; NR = 0 {++count} END'  
Unfortunately, this needs a little bit more work, such as strip out all special characters as well as the "," at the end of the line.

But this should be enough to get some resourceful scripter started :-)

[ Reply to This | # ]

Organize podcasts automatically via AppleScript
Authored by: Scott Windsor on Mar 23, '05 12:18:48PM
Here's an improved version that uses the suggested grep (with a few tweaks), and then organizes your podcasts. Unlike the first applescript, this doesn't add to a "Podcast" playlist. You can set up smart playlists in iTunes that are conditional on Genre. I have a really useful "New Podcasts" playlist where the Genre is "Podcast", and it's limited to the last 15 most recently added. the script...

set raw_favs to do shell script "grep \\# ~/iPodderData/favorites.txt | tr -d '#' | tr -d ':' | tr -d '/' | cut -c 2-100"

set favorites_list to {}
repeat with x from 1 to (count paragraphs in raw_favs)
	copy (paragraph x of raw_favs) to end of favorites_list
end repeat

tell application "iTunes"
	set playlist_list to (get every user playlist whose smart is false)
	
	--check for a playlist whose name that matches one in favorites_list
	repeat with j from 1 to count of playlist_list
		repeat with i from 1 to count of favorites_list
			if item i of favorites_list = name of item j of playlist_list then
				--for each song in this playlist
				repeat with t from 1 to ((count of every file track) of item j of playlist_list)
					--change genre
					tell file track t of item j of playlist_list
						set genre to "Podcast"
					end tell
				end repeat
				--erase playlist
				delete item j of playlist_list
				return
			end if
		end repeat
	end repeat
end tell
I wasn't quite able to get iPodder to run this after it imports songs, but if you add it to ~/Library/iTunes/Scripts it will show up on your iTunes applescript dropdown.

[ Reply to This | # ]