in classes, callback functions should be specified self.callbackfunction and not just
callbackfunction
This commit is contained in:
parent
e54fedbf94
commit
4729397b16
10
service.py
10
service.py
|
@ -56,14 +56,14 @@ class PeertubeService():
|
||||||
"""
|
"""
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def download_torrent(self, magnet_f):
|
def download_torrent(self, data):
|
||||||
"""
|
"""
|
||||||
Start a downloader thread to download torrent specified by magnet_f
|
Start a downloader thread to download torrent specified by data['magnet_f']
|
||||||
:param magnet_f: str
|
:param data: dict
|
||||||
:return: None
|
:return: None
|
||||||
"""
|
"""
|
||||||
|
|
||||||
downloader = PeertubeDownloader(magnet_f)
|
downloader = PeertubeDownloader(data['magnet_f'])
|
||||||
downloader.start()
|
downloader.start()
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
@ -71,7 +71,7 @@ class PeertubeService():
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# Launch the download_torrent callback function when the 'start_download' signal is received
|
# Launch the download_torrent callback function when the 'start_download' signal is received
|
||||||
AddonSignals.registerSlot('plugin.video.peertube', 'start_download', download_torrent)
|
AddonSignals.registerSlot('plugin.video.peertube', 'start_download', self.download_torrent)
|
||||||
|
|
||||||
# Monitor Kodi's shutdown signal
|
# Monitor Kodi's shutdown signal
|
||||||
monitor = xbmc.Monitor()
|
monitor = xbmc.Monitor()
|
||||||
|
|
Loading…
Reference in New Issue