Skip to content

Add podcasts extension - #1011

Merged
fe9lix merged 1 commit into
raycast:mainfrom
ron-myers:feature/add-podcasts
Mar 15, 2022
Merged

fe9lix merged 1 commit into
raycast:mainfrom
ron-myers:feature/add-podcasts

Conversation

@ron-myers

@ron-myers ron-myers commented Mar 1, 2022 •

Copy link
Copy Markdown
Contributor

Description

Add an initial Podcasts extension.

Commands are:

  • Play
  • Pause
  • Toggle Play/Pause
  • Rewind 15 seconds
  • Skip 30 seconds

Screencast

(I did not include one as all of the commands are no-view and interact with the Podcasts app. If this approach is not helpful, just let me know I can can capture it running.

Checklist

@raycastbot raycastbot added the new extension Label for PRs with new extensions label Mar 1, 2022
@raycastbot

Copy link
Copy Markdown
Collaborator

Congratulation on your new Raycast extension! 🚀

We will review it shortly. Once the PR is approved and merged, the extension will be available on the Store.

@fe9lix
fe9lix self-requested a review March 7, 2022 15:38
@fe9lix fe9lix self-assigned this Mar 7, 2022

@fe9lix fe9lix left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @ron-myers, thanks for your contribution. I've just tested the extension and it seems that the Apple Script for the shortcuts doesn't work for me. Here are the shortcut mappings for the Podcasts app on my machine:
CleanShot 2022-03-07 at 17 35 09@2x

For example, for the Play/Pause Toggle, it's just space, without option down...

Comment thread extensions/podcasts/src/rewind.ts Resolved
Comment thread extensions/podcasts/src/utils.ts Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On my machine, the toggle is just the space key...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hrm - thank you for catching this @fe9lix. Ok - key codes may not work if it is different by keyboard layout or culture.

Does your menu look like:
OnPaste 20220307-181409

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fe9lix - can you confirm your menu looks the same as the image above (with different shortcut keys)?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here's the menu on my machine:
CleanShot 2022-03-09 at 09 05 45@2x

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fe9lix - I have updated to using the menu items.

Is there a way to note in an extension it requires accessibility?

@fe9lix

fe9lix commented Mar 8, 2022

Copy link
Copy Markdown
Contributor

Any other ways to make this more robust? Maybe triggering the menu items or control buttons directly? (Would probably require accessibility permissions, though).

@ron-myers
ron-myers requested a review from fe9lix March 12, 2022 01:38
@fe9lix

fe9lix commented Mar 14, 2022

Copy link
Copy Markdown
Contributor

@ron-myers In the latest version, I get the following error when using the "Play" command:

Error: Command failed with exit code 1: osascript -e 
    set old to (path to frontmost application as text)
    tell application "Podcasts"
      reopen
      activate
    end tell
    tell application "System Events" to tell process "Podcasts"
      
    tell menu bar item 6 of menu bar 1
      click
      click menu item 1 of menu 1
    end tell  

      delay 0.1
      set visible to false
    end tell
    activate application old

245:250: execution error: System Events got an error: Can’t get menu bar 1 of process "Podcasts". Invalid index. (-1719)

		error = new Error(message);
		        ^

Error: Command failed with exit code 1: osascript -e 
    set old to (path to frontmost application as text)
    tell application "Podcasts"
      reopen
      activate
    end tell
    tell application "System Events" to tell process "Podcasts"
      
    tell menu bar item 6 of menu bar 1
      click
      click menu item 1 of menu 1
    end tell  

      delay 0.1
      set visible to false
    end tell
    activate application old

245:250: execution error: System Events got an error: Can’t get menu bar 1 of process "Podcasts". Invalid index. (-1719)
makeError:error.js:60:11

---
57: 		error.originalMessage = error.message;
58: 		error.message = message;
59: 	} else {
60: 		error = new Error(message);
61: 	}
62: 
63: 	error.shortMessage = shortMessage;
---

handlePromise:index.js:118:26
processTicksAndRejections:task_queues:96:5
runAppleScript:index.js:9:19
runAppleScriptAndCloseWindow:utils.ts:6:3
togglePlayPause:utils.ts:37:3
Object.play_default:play.tsx:4:3
async MessagePort.<anonymous>:index.js:1:2278

@ron-myers

Copy link
Copy Markdown
Contributor Author

@ron-myers In the latest version, I get the following error when using the "Play" command:

Well, that is frustrating. I will move to find the element by text.

@fe9lix - so I can better test before review, what are your Language and Region settings? Can you think of any other reason our menu indexes would differ? I am new to AppleScript.

@fe9lix

fe9lix commented Mar 15, 2022

Copy link
Copy Markdown
Contributor

Hey @ron-myers I've tested it again and interestingly, it works now!

@fe9lix
fe9lix merged commit f8fb22d into raycast:main Mar 15, 2022
@raycastbot

Copy link
Copy Markdown
Collaborator

@ron-myers
ron-myers deleted the feature/add-podcasts branch March 15, 2022 13:05
@j3lte j3lte mentioned this pull request Apr 1, 2026
2 of 5 tasks
raycastbot added a commit that referenced this pull request Nov 21, 2026
* Update teak-raycast extension

- Merge branch \'contributions/merge-1795200700919\' into raycast-publish-1.0.95
- Pull contributions
- chore(release): 1.0.95 (#1069)
- chore(auth): point production at the teak.authkit.app issuer (#1068)
- fix(core-worker): move off the Workers AI models retired on 2026-11-20
- chore(convex): remove the search read counter (#1067)
- feat(analytics): add api_request, card limit, upgrade, signup and card events
- fix(analytics): stop server GeoIP, report lockstep versions, price Whisper
- feat(analytics): send catalog events from the iPhone, iPad, Mac and Android apps
- ci(android): fail a release whose R8 mapping PostHog doesn\'t have
- test(e2e): expect a link\'s run to complete when its page can\'t be fetched (#1066)
- fix(web): end placeholders and loading lines with a real ellipsis (#1065)
- chore(release): 1.0.94 (#1064)
- fix(core-worker): archive more pages and say why a copy failed
- fix(analytics): identify every surface with the canonical Teak user id
- fix(search): show the closest cards by meaning when the words match nothing
- fix(core-worker): finish a link\'s run when its page can\'t be fetched
- fix(android): stop the channel-closed crash at sign-in and sign-out, and drop reports from Play\'s test device
- ci(e2e): drop the iPhone and iPad flows from the E2E workflow
- ci(e2e): run the iPhone and iPad flows against a stack without the web app
- test(convex): keep the suite passing when other tests share the CPU
- test(web): hold the clock still in the tag-overlay and context-menu tests
- test(web): wait for the folder dialog\'s code in SidebarFolders tests
- feat(web): mark the Pinned row with a soft panel and pin badge
- fix(web): give every pinned card the same height
- feat(web): fit text cards to their content and show link pictures whole
- fix(extension): save from the right-click menu where the popup can\'t open (#1063)
- fix(apple): fix link hosts, search capitals, iPad sidebar and Revisit sizing
- fix(apple): render Markdown emphasis, code and long notes properly
- feat: use Allo on every Teak surface (#1061)
- test: prune tests that guard no behavior (#1060)
- fix(mcp): count cards, tags and ids in proper English (#1059)
- feat(core-worker): run the last two cleanup crons from the Worker (#1058)
- feat(core-worker): trace every invocation (#1057)
- feat(web): try Allo as the interface font (#1052)
- fix(apple): keep Mark as done in the bar on iPhone link cards (#1056)
- fix(apple,web): iPhone E2E flows pass again, and next 16.4.5 (#1055)
- fix(extension): say why tags or a note didn\'t save, in the popup\'s language (#1054)
- fix(web): offer Clear search when Find a tag matches nothing (#1051)
- test(core-worker): hash a fake R2 object only when its etag is read (#1050)
- fix(convex): name the accepted values for an unknown type, style or hue filter (#1049)
- test(e2e): wait for the saved language in the Language spec (#1048)
- chore(agents): drop references to files and skills the repo doesn\'t have
- test(core-worker): start the rendering tests\' Chrome with a fresh profile (#1046)
- fix(cli): name file cards in listings instead of leaving a blank cell (#1045)
- test(e2e): match the visible Birds search box in the folder rules spec (#1044)
- fix(extension): say why a save failed in the popup\'s language (#1042)
- fix(web): count every card step press while a save check is pending (#1041)
- fix(web): offer the whole library when a search in one view finds nothing (#1040)
- refactor: untangle the backend, Core Worker and web app (#1038)
- test(e2e): wait for the folder page before reading the filed card (#1039)
- test(e2e): allow 90s for the filed-card click on the folder page (#1036)
- test(e2e): wait for card dialog close before restore-me assertions (#1035)
- test(e2e): wait for the cleared search before the keyboard handoff (#1031)
- fix(convex): say what is wrong with an MCP tool argument in plain words (#1037)
- fix(sdk): say you are not signed in when there is no credential at all (#1034)
- test(e2e): reopen the palette until it opens in the Export palette spec (#1033)
- perf(core-worker): batch card-processing calls to Convex (#1030)
- perf(convex): check API keys once and read-only, and send the extension through the edge (#1029)
- perf(convex): read one day of cards in the admin snapshot and slow dev crons (#1028)
- test(e2e): click the filed card by its button name in the folder rules spec (#1027)
- feat(cli): follow the CLI guidelines for safety, errors and help (#1025)
- test(e2e): wait for the hydrated mobile drawer state before toggling the sidebar (#1004)
- fix(web): app links in Settings are named by what they show (#1024)
- docs(mcp): say what cardType: text does on create_card (#1023)
- refactor: untangle the backend, clients, web, Core Worker and tooling (#1022)
- refactor(repo): remove unused and redundant dependencies (#1021)
- fix: name the client behind API saves, Spotify titles, and pins after Undo (#1019)
- refactor(convex): Worker fetchers out of Convex, and one shape for dev seed packs (#1018)
- refactor(repo): one source each for the stack state, CI setup, deployment facts and repeated lists (#1016)
- refactor(card): untangle card-2 (#1017)
- refactor(convex): one way to write a card, and errors that stay errors (#1014)
- refactor(repo): make scripts/ a Turbo workspace so verify runs the cross-workspace checks (#1015)
- refactor(convex): declare each public API operation once and derive REST, MCP, OpenAPI and client constants from it (#1013)
- refactor(web): run card actions, edits and URL state from one place each (#1012)
- refactor(core-worker): one shared Convex ↔ Core Worker boundary and card-processing contract (#1011)
- refactor(native): one constants manifest and shared test rows for the Apple, Android and Raycast ports (#1010)
- feat(android): submit every release to Google Play automatically (#1009)
- test(e2e): fix four specs that drifted from the app so main\'s E2E goes green (#1008)
- chore(release): 1.0.93 (#1007)
- feat(cli): clearer errors, scriptable output and safer commands (#1006)
- fix(web,convex): keep shared text and credentials out of PostHog telemetry (#1005)
- feat(web): card tiles that line up in the grid (#1003)
- fix(convex): refuse an invalid public API limit instead of clamping it (#1002)
- test(e2e): repair Nov 4 journeys failures (MCP tool list, pinning OCC race) (#992)
- test(e2e): repair spec-lag assertions for the reworked search chips, card dialogs and Settings UI (#989)
- feat(convex,web): self-hosted Teak can run without billing (#1001)
- docs: tidy the docs and rewrite the changelog for users (#1000)
- feat(web): self-hosted web apps can opt in to their own analytics (#999)
- feat(core-worker): self-hosted AI calls use the default AI Gateway (#998)
- feat(core-worker): deploy a self-hosted Core Worker without editing its config (#997)
- fix(web): Tags rows and error banners pass accessibility checks (#996)
- fix(web): drop Undo from the undone folder rule run toast (#995)
- docs(android): changelog, runbook and starter card for the Play launch (#994)
- feat(docs,web): link Teak on Google Play and add an Android docs page (#993)
- feat(web): folder rules in the Edit folder dialog (#990)
- feat(convex,sdk,cli): folder rules in the API, MCP, SDK and CLI (#976)
- feat(convex): folder rules that tag and file cards (#975)
- feat(web): pin up to 12 cards to the top of the library (#983)
- fix(docs): Mac App Store links open the Mac listing
- fix(web): narrow-screen layouts, tags shown as typed, and tag errors beside the field (#988)
- feat(web): save a search that found nothing as a note (#987)
- refactor(web): code cleanup from the audit (C1–C5) (#986)
- fix(core-worker): wiki articles open on their text, and table cells keep their spaces (#985)
- feat(core-worker): send each link screenshot\'s size (#984)
- feat: link tiles skip near-blank screenshots (#982)
- fix(deps): bump vite to 8.2.4 and override minimatch to ^11.0.1
- fix(cli): say when a listing is empty instead of printing a blank line (#981)
- perf(web): load less, paint the app\'s frame first, and settle media (#980)
- fix(web): say what failed and keep what people made (#979)
- fix(web): adding cards and card menus on phones, tablets and narrow windows (#978)
- fix(web): keyboard and screen-reader access for cards, saves and Revisit (#977)
- fix(web): clearer copy, tab titles and empty states (#974)
- fix: Mac upgrades open Plan, translated extension limit tooltip, one source for Pro prices (#973)
- feat(web): list-style Settings pages (#972)
- fix(convex): keep a meaning match that holds only some of the words "related by meaning" (#971)
- fix(web,convex,core-worker): bug-bash fixes across capture, cards, search, settings and imports (#968)
- fix(web): stop the collapsed sidebar from widening on hover (#970)
- fix(convex): page signed-in devices with WorkOS\'s bare ULID cursor (#969)
- fix(convex): keep word matches out of "related by meaning" in hybrid search (#967)
- test(core-worker): resume export archives with small parts instead of 33 MiB (#966)
- feat(apple): capture notes and voice memos in their own Mac windows (#965)
- fix(web,sdk): keep an early-opened app open, download trashed files, and refresh sign-in settings past the cache (#964)
- chore: prune comments that restate the code, and plan the refactors for the rest (#963)
- chore(release): wait for npm attestations, start the Mac sooner, and add a release skill (#962)
- feat(extension): show what you save in a calmer popup (#961)
- ci(release): publish the MCP Registry and build Android with its mapping on every version tag (#960)
- fix(raycast): keep trashed cards out after a late save, and cover palette requests (#959)

* Update teak-raycast extension

- Merge remote-tracking branch \'origin/main\' into raycast-publish-1.0.95
- fix(raycast): correct the 1.0.95 changelog and take the store\'s description (#1070)

* Update teak-raycast extension

- Merge remote-tracking branch \'origin/main\' into raycast-publish-1.0.95
- fix(raycast): keep the store\'s current screenshots until new ones pass its check (#1071)

* Update CHANGELOG.md

---------

Co-authored-by: raycastbot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new extension Label for PRs with new extensions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants