mirror of
https://github.com/JohnDoee/deluge-streaming/
synced 2026-07-01 07:31:17 -07:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
123962e123 | ||
|
|
435707b379 | ||
|
|
034f0ef331 | ||
|
|
d0e9780d76 | ||
|
|
bffef417f8 | ||
|
|
30340a25a2 | ||
|
|
287efadb3e | ||
|
|
d6e7fc83b8 |
@@ -107,6 +107,14 @@ List of URL GET Arguments
|
||||
|
||||
# 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
|
||||
|
||||
2
setup.py
2
setup.py
@@ -42,7 +42,7 @@ from setuptools import setup, find_packages
|
||||
__plugin_name__ = "Streaming"
|
||||
__author__ = "Anders Jensen"
|
||||
__author_email__ = "johndoee@tridentstream.org"
|
||||
__version__ = "0.12.0"
|
||||
__version__ = "0.12.2"
|
||||
__url__ = "https://github.com/JohnDoee/deluge-streaming"
|
||||
__license__ = "GPLv3"
|
||||
__description__ = "Enables streaming of files while downloading them."
|
||||
|
||||
@@ -56,7 +56,7 @@ from deluge._libtorrent import lt
|
||||
from deluge.core.rpcserver import export
|
||||
from deluge.plugins.pluginbase import CorePluginBase
|
||||
|
||||
from twisted.internet import reactor, defer, task
|
||||
from twisted.internet import reactor, defer, task, error
|
||||
from twisted.web import server, client
|
||||
from twisted.web.resource import Resource as TwistedResource
|
||||
|
||||
@@ -620,9 +620,11 @@ class ServerContextFactory(object):
|
||||
def getContext(self):
|
||||
from OpenSSL import SSL
|
||||
|
||||
method = getattr(SSL, 'TLSv1_1_METHOD', None)
|
||||
if method is None:
|
||||
method = getattr(SSL, 'SSLv23_METHOD', None)
|
||||
methods_names = ['TLSv1_2_METHOD', 'TLSv1_1_METHOD', 'SSLv23_METHOD']
|
||||
for method_name in methods_names:
|
||||
method = getattr(SSL, method_name, None)
|
||||
if method is not None:
|
||||
break
|
||||
|
||||
ctx = SSL.Context(method)
|
||||
ctx.use_certificate_file(self._cert_file)
|
||||
@@ -743,13 +745,19 @@ class Core(CorePluginBase):
|
||||
try:
|
||||
self.listening = reactor.listenSSL(self.config['port'], self.site, context, interface=self.config['ip'])
|
||||
except:
|
||||
try:
|
||||
self.listening = reactor.listenSSL(self.config['port'], self.site, context, interface='0.0.0.0')
|
||||
except error.CannotListenError:
|
||||
logger.warning("Unable to listen to anything")
|
||||
self.base_url += 's'
|
||||
else:
|
||||
try:
|
||||
self.listening = reactor.listenTCP(self.config['port'], self.site, interface=self.config['ip'])
|
||||
except:
|
||||
try:
|
||||
self.listening = reactor.listenTCP(self.config['port'], self.site, interface='0.0.0.0')
|
||||
except error.CannotListenError:
|
||||
logger.warning("Unable to listen to anything")
|
||||
|
||||
port = self.config['port']
|
||||
ip = self.config['ip']
|
||||
@@ -820,9 +828,6 @@ class Core(CorePluginBase):
|
||||
plugin_manager = component.get("CorePluginManager")
|
||||
return 'WebUi' in plugin_manager.get_enabled_plugins()
|
||||
|
||||
def check_config(self):
|
||||
pass
|
||||
|
||||
@export
|
||||
@defer.inlineCallbacks
|
||||
def set_config(self, config):
|
||||
|
||||
@@ -32,7 +32,7 @@ class DelugeTorrentInput(InputBase):
|
||||
self.path = path
|
||||
self.piece_buffer = {}
|
||||
self.requested_pieces = {}
|
||||
self.piece_request_queue = []
|
||||
self.piece_consumption_time = []
|
||||
self.size, self.filename, self.content_type = self.get_info()
|
||||
|
||||
def get_info(self):
|
||||
|
||||
Reference in New Issue
Block a user