{
 "app_id": "tech.feliciano.pocket-casts",
 "source_url": "https://raw.githubusercontent.com/flathub/tech.feliciano.pocket-casts/master/tech.feliciano.pocket-casts.yml",
 "runtime": "org.freedesktop.Platform",
 "runtime_version": "24.08",
 "sdk": "org.freedesktop.Sdk",
 "finish_args": [
  "--share=network",
  "--share=ipc",
  "--socket=x11",
  "--socket=wayland",
  "--socket=pulseaudio",
  "--socket=fallback-x11",
  "--device=dri",
  "--talk-name=org.kde.StatusNotifierWatcher",
  "--talk-name=com.canonical.AppMenu.Registrar",
  "--own-name=org.mpris.MediaPlayer2.chromium.*"
 ],
 "module_count": 2,
 "fetched_at": "2026-09-17T16:17:30.574924+00:00",
 "manifest": {
  "app-id": "tech.feliciano.pocket-casts",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "24.08",
  "sdk": "org.freedesktop.Sdk",
  "sdk-extensions": [
   "org.freedesktop.Sdk.Extension.node20"
  ],
  "base": "org.electronjs.Electron2.BaseApp",
  "base-version": "24.08",
  "command": "run.sh",
  "separate-locales": false,
  "finish-args": [
   "--share=ipc",
   "--socket=wayland",
   "--socket=fallback-x11",
   "--socket=pulseaudio",
   "--share=network",
   "--device=dri",
   "--talk-name=org.kde.StatusNotifierWatcher",
   "--talk-name=com.canonical.AppMenu.Registrar",
   "--own-name=org.mpris.MediaPlayer2.chromium.*"
  ],
  "modules": [
   {
    "name": "node",
    "buildsystem": "simple",
    "build-commands": [
     "/usr/lib/sdk/node20/install-sdk.sh"
    ]
   },
   {
    "name": "pocket-casts",
    "buildsystem": "simple",
    "build-options": {
     "append-path": "/usr/lib/sdk/node20/bin",
     "env": {
      "XDG_CACHE_HOME": "/run/build/pocket-casts/flatpak-node/cache",
      "npm_config_cache": "/run/build/pocket-casts/flatpak-node/npm-cache",
      "npm_config_nodedir": "/usr/lib/sdk/node20",
      "DEBUG": "@electron/get:*,electron-forge:*,@electron/packager,get-package-info"
     }
    },
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/felicianotech/pocket-casts-desktop-app",
      "tag": "v0.10.3",
      "commit": "6e8597bcee3ef952ba1c0da0036c84ff6091ed56",
      "x-checker-data": {
       "type": "git",
       "tag-pattern": "^v([\\d.]+)$"
      }
     },
     {
      "type": "patch",
      "path": "0001-Avoid-network-access-to-get-Electron-runtime-checksu.patch"
     },
     {
      "type": "patch",
      "path": "0001-Disable-Global-Shortcuts.patch"
     },
     "generated-sources.json",
     {
      "type": "script",
      "dest-filename": "run.sh",
      "commands": [
       "export TMPDIR=$XDG_RUNTIME_DIR/app/$FLATPAK_ID",
       "WAYLAND_SOCKET=${WAYLAND_DISPLAY:-\"wayland-0\"}",
       "FLAGS=\"\"",
       "if [[ -e \"$XDG_RUNTIME_DIR/${WAYLAND_SOCKET}\" || -e \"${WAYLAND_DISPLAY}\" ]]; then",
       "FLAGS=\"$FLAGS --enable-features=WaylandWindowDecorations --ozone-platform-hint=auto\"",
       "fi",
       "FLATPAK_HOST=1 zypak-wrapper.sh /app/lib/pocket-casts/pocket-casts $FLAGS \"$@\""
      ]
     }
    ],
    "build-commands": [
     "npm install --offline",
     "npx electron-forge package -- --arch=x64,arm64",
     "mkdir -p ${FLATPAK_DEST}/lib/pocket-casts",
     "cp -r out/pocket-casts-linux-*/* ${FLATPAK_DEST}/lib/pocket-casts",
     "install -Dm644 img/icon-x512.png ${FLATPAK_DEST}/share/icons/hicolor/512x512/apps/${FLATPAK_ID}.png",
     "install -Dm644 flatpak/tech.feliciano.pocket-casts.desktop /app/share/applications/${FLATPAK_ID}.desktop",
     "install -Dm644 flatpak/tech.feliciano.pocket-casts.appdata.xml ${FLATPAK_DEST}/share/metainfo/${FLATPAK_ID}.metainfo.xml",
     "install -Dm755 run.sh ${FLATPAK_DEST}/bin/run.sh"
    ]
   }
  ]
 }
}