Skip to content

3. Actions

Brian Dashore edited this page Apr 26, 2023 · 2 revisions

3a. Creating an action object

Here is a quick template to what an action entry looks like with all the possible parameters. You can copy/paste this template into your editor of choice. I will go through all the keys one-by-one.

Example

- name: # Usually starts with "Open in"
  version: 3
  minVersion: '0.7'
  about: >-
    # A folded about description
  website: https://mycoolwebsite.com
  tags:
    # YAML sequence of tag blocks
    - name: A cool tag
      color: # A hex value
  requires:
    # YAML string sequence. Accepts "debrid" or "magnet"
    - debrid # Displays as a tag in-app
  deeplink:
    # Add deeplink action blocks here
  exec:
    # Doesn't work for now. Will be added with companion

Fields

name

Required: The action's name.

version

Required Integer: This is the version number of the action. Each update to the source increments the version by 1. Only increment the version when you are sure that the action is ready to be published.

minVersion

Optional String: The minimum app version this action can run on. YAML plugins only run on v0.7 or above by default.

requires

Required Array<String>: This is an array to symbolize what type of link to use when executing the action. The possible values are debrid or magnet

tags

Optional Array<Tag>: Please see Tag documentation. In actions, requires are automatically added as tags.

deeplink

Optional DeeplinkAction: This is the deeplink template to pass into the OS's default brower to open another application. The {link} parameter is replaced with either the debrid or magnet link provided by Ferrite when opening an app.

NOTE: Deeplinks are compatible with all Ferrite applications and are the preferred way to run an action.

exec (Not implemented!)

Optional ExecAction: Planned.

3b. The deeplink action

Deeplink actions are the preferred way of opening external applications in Ferrite. They are safe, support all devices, and use a user's default browser to proxy into an application's URL handler.

Example

- os: # OS string or array of strings
  scheme: # URL scheme to pass to the browser
# or
- scheme: # Universal/fallback link if an OS isn't provided

Fields

os

Optional Array<String> or String: The OS the deeplink can be run on. If an application only runs on specific OSes, include the OS line. If multiple OSes are needed for this action, a string array can be used.

If a deeplink can be run on any OS, do not use this line and add just a scheme instead.

scheme

Required String: The URL scheme to run in the user's browser whenever the action is executed.

Parameters:

  • {link} Var: Replaced with the link (either http or magnet) that the user sends when the action is executed.

OS values

These are the OS values for Ferrite and its companions. They are not case sensitive.

  • ios