-
Notifications
You must be signed in to change notification settings - Fork 154
Plugins
BiglyBT supports various plugins to extend its features. Some are actually built into BiglyBT and don't need installing. Others have separate repositories and documentation, see https://github.com/BiglySoftware/
For example, the 'Command Runner' plugin can be found at https://github.com/BiglySoftware/BiglyBT-plugin-azexec
External plugins can be installed by going to the Tools menu and selecting Plugins->Get Plugins
This was added in 2801_B20 to initially support a the adding of a tag or category to a download but can easily be extended. The intent is that it would be called from a local script - the external plugin "BiglyBT Web Remote" has a very extensive API for interacting with BiglyBT but is more complicated to use, hence the addition of this plugin.
An 'apikey' is required for all operations as a security measure, this can be found in the plugin configuration under Plugins->Simple API. You can set this to whatever you want or use the suggested value.
Operations are performed via a simple URL and currently the response is via HTTP code - 200 indicates success.
Typically the plugin will accept connections to local host on the (default) port of 6906:
http://127.0.0.1:6906/?apikey=<key>&...
To add a tag to a download the remainder of the URL is
method=addtag&hash=<download hash>&tag=<tag name>
To remove a tag from a download:
method=removetag&hash=<download hash>&tag=<tag name>
To set a download's category: (Use "" for uncategorized):
method=setcategory&hash=<download hash>&category=<category name>
To set a download's networks (valid networks are "Public", "I2P" and "Tor"): (Since 2801_B25)
method=setnetworks&hash=<download hash>&networks=<comma separated network list>
For simple attributes this method can be used: (Since 2801_B29)
method=setdownloadattribute&hash=<download hash>&name=<attribute_name>&value=<attribute_value>[&name=<...>&value=<...>]*
Supported attributes:
- completedon: value=seconds since January 1st 1970
- displayname: download's display name
- savepath: download save path - rename the download name/folder only, can't be used to generally move the download location
- torrentname: name of the torrent
- usercomment: user comment
- ipfilterenable: whether or not the download's IP filter is enabled; value=true/false (since 2901_B11)
Since 3101 you can list downloads with the result being returned as a JSON array:
method=listdownloads
Since 3101 you can list a download's files with the result being returned as a JSON array:
method=listfiles&hash=<download hash>[&calc_root_hashes=<0|1>]
The optional parameter "calc_root_hashes" can be supplied to force a V2 root file hash to be computed for V1 torrents.
Since 3101 you can set a download's file attributes:
method=setdownloadfileattribute&hash=<download hash>&index=<index>&name=<attribute_name>&value=<attribute_value>[&index=<...>&name=<...>&value=<...>]*
Supported attributes:
- datapath: value=absolute file path for the file's data
- skipped: whether the file is downloaded or not; value true/false
To raise an alert against a download: (details is optional)
method=alert&caption=<caption>&type=<info|error>&details=<extra information>
Rather than continually extending the 'execute on assign' Tag function with more and more features it made sense to enhance the existing 'script' option to invoke SimpleAPI features directly. Given that this is an internal invocation the 'apikey' is not required. Also as it applies to a specific download the 'hash' is implicit. For example, to invoke the 'setnetworks' method to set the download's networks to 'I2P you would use the following script
plugin( simpleapi, "method=setnetworks&networks=I2P" )
or, since 3201_B34, to play a sound when a download is assigned to a Tag:
plugin( simpleapi, "method=playsound&file=C:\Sounds\Checking.wav" )
Multiple commands can be executed by semi-colon separating them.
Since 3101_B01 the plugin also supports some subscription methods
method=markresultsread&subscription_id=<subscription id>&subscription_result_id=<result_id>
method=markresultsread&subscription_id=<subscription id>&subscription_result_ids=<comma separated list of result_ids>
This is identical to the above method but with the name set to 'markresultsreadinall'
Subscriptions have an "execute on new result" item allowing a script to be specified via a right-click menu item. In this case the 'subscription_id' and 'subscription_result_id(s)' are supplied automatically. To mark a new result as read you would use the following script
plugin( simpleapi, "method=markresultsread" )
One of our users, Droo, has created an HTML page that uses the SimpleAPI to list your downloads and allow you to make various modifications to it:
Save the file as a local HTML file and then open it in your browser. Enter your API key and experiment.
bigly help