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
|
||||
:param magnet_f: str
|
||||
Start a downloader thread to download torrent specified by data['magnet_f']
|
||||
:param data: dict
|
||||
:return: None
|
||||
"""
|
||||
|
||||
downloader = PeertubeDownloader(magnet_f)
|
||||
downloader = PeertubeDownloader(data['magnet_f'])
|
||||
downloader.start()
|
||||
|
||||
def run(self):
|
||||
|
@ -71,7 +71,7 @@ class PeertubeService():
|
|||
"""
|
||||
|
||||
# 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 = xbmc.Monitor()
|
||||
|
|
Loading…
Reference in New Issue