Skip to content

Commit

Permalink
Updated readme to fix #20
Browse files Browse the repository at this point in the history
  • Loading branch information
Anders Jensen committed Sep 17, 2018
1 parent 7cfdfc7 commit de54ed0
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,44 @@ The _allow remote_ option is to allow remote add and stream of torrents.
* [ ] Better feedback when using API
* [x] Reverse proxy improvement (e.g. port different than bind port)

# HTTP API Usage

# Prerequisite

Install and enable the plugin. Afterwards, head into Streaming settings and enable "Allow remote control".
The URL found in the "Remote control url" field is where the API can be reached. The auth used is Basic Auth.

# Usage

There is only one end-point and that is where a torrent stream can be requested.

Both return the same responses and all responses are JSON encoded.
All successfully authenticated responses have status code 200.

## POST /streaming/stream

POST body must be the raw torrent you want to stream. No form formatting or anything can be used.

List of URL GET Arguments

* path: Path inside the torrent file to either a folder or a file you want to stream. The plugin will try to guess the best one. Optional. Default: '' (i.e. find the best file in the whole torrent)
* infohash: Infohash of the torrent you want to stream, can make it a bit faster as it can avoid reading POST body. Optional.
* label: If label plugin is enabled and the torrent is actually added then give the torrent this label. Optional. Default: ''
* wait_for_end_pieces: Wait for the first and last piece in the streamed file to be fully downloaded. Can be necessary for some video players. It also enforces that the torrent can be actually downloaded. If the key exist with any (even empty) value, the feature is enabled. Optional. Default: false

## GET /streaming/stream

* infohash: Does the same as when POSTed. Mandatory.
* path: Does the same as when POSTed.
* wait_for_end_pieces: Does the same as when POSTed.

## Success Response

{
"status": "success"
}


# Version Info

## Version Unreleased
Expand Down

0 comments on commit de54ed0

Please sign in to comment.