• Stars
    star
    138
  • Rank 263,048 (Top 6 %)
  • Language
    Python
  • License
    Other
  • Created almost 10 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Streaming plugin for deluge, making it possible to read torrents and download required parts on-demand.

Streaming Plugin

https://github.com/JohnDoee/deluge-streaming

(c)2020 by Anders Jensen [email protected]

Description

This plugin adds a new entry to the file list context menu that enables the user to stream a file using HTTP.

Technically, it tries to download the part of a file the user requests and downloads ahead, this enables seeking in video files.

Where to download

You can download this release on Github. Look for the "releases" tab on the repository page. Under that tab, eggs for Python 2.6 and 2.7 should exist.

How to use

  • Install plugin
  • Select a torrent
  • Select files tab
  • Right-click a file.
  • Click Stream this file
  • Select the link, open it in a media player, e.g. VLC or MPC

If you want to stream from a non-local computer, e.g. your seedbox, you will need to change the IP in option to the external server ip.

Open directly in your video player

By using a small tool it is possible to it's possible to open streams directly in VLC or another media player.

  • Download and install StreamProtocol
  • Go into Deluge Streaming options and enable "Use stream protocol urls"
  • Optional, if you want to skip the popup and open streams directly when ready, enable "Auto-open stream protocol urls"

Motivation

The plugin is not meant to be used as a right-click to stream thing. The idea is to make Deluge an abstraction layer for the Tidalstream project, i.e. torrents to http on demand.

The allow remote option is to allow remote add and stream of torrents.

Todo

  • Better feedback in interface about streams
  • Better feedback when using API
  • Fix problems when removing torrent from Deluge (sea of errors)

Important Deluge 2 information

While developing the Deluge 2 version of this plugin I hit a few problems that might be visible for you too.

  • When shutting down Deluge an exception / error happens every time, this bug is reported.
  • Sometimes the Web UI does not load plugins correctly, try restarting Deluge and refresh your browser if this happens.

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. Optional.
  • wait_for_end_pieces: Does the same as when POSTed. Optional.

Success Response

{
    "status": "success", # Always equals this
    "filename" "horse.mkv", # Filename of the streamed torrent
    "url": "http://example.com/" # URL where the file can be reached by e.g. a media player
}

Error Response

{
    "status": "error", # Always equals this
    "message" "Torrent failed" # description for why it failed
}

Version Info

Version 0.12.2

  • Added support for TLS 1.2

Version 0.12.1

  • Fixed small breaking bug

Version 0.12.0

  • Moved to reading pieces through Deluge to avoid unflushed data
  • Fixed Deluge 2 / libtorrent related bug

Version 0.11.0

  • Initial support for Deluge 2 / Python 3
  • Added support for aggressive piece prioritization when it should not be necessary.
  • Fixed bug related to paused torrent with no data downloaded.

Version 0.10.5

  • Added support for serving files inline

Version 0.10.4

  • Trying to set max priority less as it destroys performance

Version 0.10.3

  • Added label support
  • Reverse proxy config / replace URL config
  • Ensure internal Deluge state is updated before trying to use it

Version 0.10.2

  • Busting cache when waiting for piece
  • Math error in calculating size of readable bytes

Version 0.10.1

  • Small bugfixes related to priorities, should actually make sequential download work.

Version 0.10.0

  • Rewrote large parts of the code
  • Now using thomas as file-reading core - this adds support for multi-rar streaming.
  • Faster streaming by reading directly from disk
  • Reverse proxy mode

Version 0.9.0

  • Few bugfixes
  • Added support for Deluge 2

Version 0.8.1

  • Fixed some small problems and bugs
  • better URL execution with GTKUI

Version 0.8.0

  • Improved remote control of streaming to make it work as originally intended.

Version 0.7.1

  • Trying to fix bug where piece buffer went empty
  • Added support for SSL.

Version 0.7.0

  • Shrinked code by redoing queue algorithm. This should prevent more stalled downloads and allow it to act bittorrenty if necessary.
  • Added support for waiting for end pieces to satisfy some video players (KODI)

Version 0.6.1

  • Should not have been in changelog: Fixed "resume on complete" broken-ness (i hope)

Version 0.6.0

  • Fixed URL encoding error
  • Fixed "resume on complete" broken-ness (i hope)
  • Changed default to not use stream urls

Version 0.5.0

  • Restructured the whole plugin
  • Added support for StreamProtocol

Version 0.4.1

  • Fixed bug with old Deluge versions

Version 0.4.0

  • Added WebUI support
  • Improved scheduling algorithm

Version 0.3

  • Fixed bug when streaming multiple files.
  • Changed to try to prioritize end pieces more aggressively to not leave them hanging.
  • Added option to download rest of torrent when finished downloading the streamed torrent.
  • Added authentication to remote API.

Version 0.2

  • Improved buffering algorithm, not using only deadline anymore.

Version 0.1

  • Initial working release

More Repositories

1

autotorrent

Matches torrents with files and gets them seeded
Python
270
star
2

autotorrent2

Cross-seed matching and torrent lifecycle tool
Python
136
star
3

deluge-client

A very lightweight pure-python Deluge RPC Client
Python
87
star
4

magnet2torrent

Turn a bittorrent magnet link into a .torrent file
Python
62
star
5

spreadsheetui

A spreadsheet-like UI for your torrent clients.
Python
50
star
6

flexget-cross-seed

Get torrents for data you already have locally
Python
15
star
7

imdbparser

Basic IMDB Parser with a nice MIT license
Python
14
star
8

txasgiresource

Implementation of the ASGI application standard as a Twisted Resource
Python
11
star
9

pyrfc6266

Implementation of content-disposition header parsing without LEPL (rfc6266)
Python
11
star
10

rippy

Scrape websites using Chrome
Python
10
star
11

libtc

Bittorrent client abstraction to easily integrate a variety of clients.
Python
9
star
12

the-cute-collection

A list of audio/video based subtitle tools for syncing and alike.
Python
8
star
13

kodi-deluge-streaming

Stream torrents from Deluge directly in Kodi
Python
8
star
14

rtorrent-automover

Moves complete torrents automagically for rtorrent.
Python
7
star
15

malparser

MyAnimeList Parser
Python
5
star
16

rip-avgle

DEPRECATED - See https://github.com/JohnDoee/rippy
Python
5
star
17

StreamProtocol

Making stream links clickable and streamable
C#
4
star
18

pylev2

Levenshtein distance library for Python
C
3
star
19

wampyre

WAMP Router in Python made for embedded situations
Python
2
star
20

TimeoutThreadPoolExecutor

Backported ThreadPoolExecutor that also cleans up unused threads
Python
2
star
21

unplugged

A pluginsystem for Django and Twisted
Python
2
star
22

tidalstream-recoder

Reencodes files real-time and outputs a stream compatible with.... whatever
Python
1
star
23

rippy-webinterface

TypeScript
1
star
24

web-parsers

Parsing various websites for their delicious data and lack of API
HTML
1
star
25

rippy-docker

Python
1
star
26

grepmx

Grep emails in a file based on their MX
Python
1
star
27

spreadsheetui-webinterface

Webinterface for Spreadsheet UI
TypeScript
1
star
28

tidalstream.org

TidalStream website
CSS
1
star
29

thomas

Thomas allows parallel http downloads and is an alternative to Axel (and other stuff!)
Python
1
star
30

tidalstream-webinterface

Webinterface for TidalStream API Server
CoffeeScript
1
star