in classes, callback functions should be specified self.callbackfunction and not just

callbackfunction
This commit is contained in:
Famille Bollu 2018-07-26 21:37:08 +02:00
parent e54fedbf94
commit 4729397b16
1 changed files with 5 additions and 5 deletions

View File

@ -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()