From 4729397b164a9b381df6c971aeb1fa0bf4a15eaa Mon Sep 17 00:00:00 2001 From: Famille Bollu Date: Thu, 26 Jul 2018 21:37:08 +0200 Subject: [PATCH] in classes, callback functions should be specified self.callbackfunction and not just callbackfunction --- service.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/service.py b/service.py index 3fd068f..a0d80b5 100644 --- a/service.py +++ b/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()