saving podcasts

Hello all,

I’m trying to automate the update of podcasts.

That’s what I’d like to do: updating is done manually, because (to my understanding) it’s not defined, when updating is finished. After updating, all podcast not yet on the Mac should be downloaded to disk, deselected and then “saved”.


tell application "iTunes"
	
	display notification with title "iTunes" subtitle "updating Podcasts..."
	activate
	
	--	updateAllPodcasts
	
	reveal playlist "Podcasts"
	
	set podcastList to every track of playlist "Podcasts"
	set sizeOfPodcastList to count of podcastList
	
	repeat with i from 1 to sizeOfPodcastList
		set theItem to item i of my podcastList
		if class of theItem is "URL track" then
			download theItem
		end if
		set enabled of theItem to false
                        tell application "System Events"
			get the item   -- select item ???
			click menu item "Folge sichern" of menu "Podcast" of menu bar item "Podcast" of      menu bar 1 of application process "iTunes"
		end tell
	end repeat
end tell

The script works as should, except for the saving. Because I didn’t find anything concerning saving in the dictionary, I tried UI scripting, but with no result. I guess, the problem is, that no track can be selected, which can be saved???

Thanks in advance, Kuulest

Model: MacBook Pro 2019
Browser: Safari 605.1.15
Operating System: macOS 10.14

Try emulating keystrokes.
If there’s a menu item your trying to select you may have to create a keyboard shortcut for it

You can’t find the save command because it’s not in this application. And that’s because every podcast or track is already stored on your local drive - in the app’s global library. I don’t know what you call it because I have a Catalina. You just need to find the location of the file in this global library and duplicate this file using Finder to the destination folder.

This will be the equivalent of the save command, which is missing from the application for the reason stated above.

NOTE: I think, you can find your iTunes’s media folder location in the Advanced tab of iTunes Preferences.

You could maybe check shortcuts app and use AppleScript to do what you want.
At least there is some actions for Podcast app.