Thursday, December 1, 2022

#1 2022-09-14 11:26:56 am

Registered: 2021-01-14
Posts: 6

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..."
   --    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

Last edited by Kuulest (2022-09-14 11:28:03 am)



#2 2022-09-15 10:30:18 pm

Registered: 2017-12-14
Posts: 302

Re: saving podcasts

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



#3 2022-09-15 11:43:36 pm

From:: Greece
Registered: 2019-03-03
Posts: 2588

Re: saving podcasts

Kuulest wrote:

Because I didn't find anything concerning saving in the dictionary, I tried UI scripting, but with no result.

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.

Last edited by KniazidisR (2022-09-16 12:12:22 am)

Model: MacBook Pro
OS X: Catalina 10.15.7
Web Browser: Safari 15.6.1
Ram: 4 GB



#4 2022-09-25 04:27:28 pm

Registered: 2019-10-23
Posts: 1089

Re: saving podcasts

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

Node-RED makes it easy to automate IoT



Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)