From 752191bc23cdde9de9d32da4531a12211291af95 Mon Sep 17 00:00:00 2001 From: Ruud Date: Tue, 2 Dec 2014 11:43:10 +0100 Subject: [PATCH] Comments --- couchpotato/core/downloaders/blackhole.py | 15 +++++++++++++++ couchpotato/core/downloaders/hadouken.py | 15 +++++++++++++++ couchpotato/core/downloaders/nzbget.py | 15 +++++++++++++++ couchpotato/core/downloaders/nzbvortex.py | 15 +++++++++++++++ couchpotato/core/downloaders/pneumatic.py | 15 +++++++++++++++ couchpotato/core/downloaders/qbittorrent_.py | 15 +++++++++++++++ couchpotato/core/downloaders/rtorrent_.py | 15 +++++++++++++++ couchpotato/core/downloaders/sabnzbd.py | 15 +++++++++++++++ couchpotato/core/downloaders/synology.py | 15 +++++++++++++++ couchpotato/core/downloaders/transmission.py | 15 +++++++++++++++ couchpotato/core/downloaders/utorrent.py | 15 +++++++++++++++ 11 files changed, 165 insertions(+) diff --git a/couchpotato/core/downloaders/blackhole.py b/couchpotato/core/downloaders/blackhole.py index 262776a8..5d4e54be 100644 --- a/couchpotato/core/downloaders/blackhole.py +++ b/couchpotato/core/downloaders/blackhole.py @@ -20,6 +20,21 @@ class Blackhole(DownloaderBase): status_support = False def download(self, data = None, media = None, filedata = None): + """ + Send a torrent/nzb file to the downloader + + :param data: dict returned from provider + Contains the release information + :param media: media dict with information + Used for creating the filename when possible + :param filedata: downloaded torrent/nzb filedata + The file gets downloaded in the searcher and send to this function + This is done to have failed checking before using the downloader, so the downloader + doesn't need to worry about that + :return: boolean + One faile returns false, but the downloaded should log his own errors + """ + if not media: media = {} if not data: data = {} diff --git a/couchpotato/core/downloaders/hadouken.py b/couchpotato/core/downloaders/hadouken.py index 2570b591..0841832e 100644 --- a/couchpotato/core/downloaders/hadouken.py +++ b/couchpotato/core/downloaders/hadouken.py @@ -40,6 +40,21 @@ class Hadouken(DownloaderBase): return True def download(self, data = None, media = None, filedata = None): + """ + Send a torrent/nzb file to the downloader + + :param data: dict returned from provider + Contains the release information + :param media: media dict with information + Used for creating the filename when possible + :param filedata: downloaded torrent/nzb filedata + The file gets downloaded in the searcher and send to this function + This is done to have failed checking before using the downloader, so the downloader + doesn't need to worry about that + :return: boolean + One faile returns false, but the downloaded should log his own errors + """ + if not media: media = {} if not data: data = {} diff --git a/couchpotato/core/downloaders/nzbget.py b/couchpotato/core/downloaders/nzbget.py index 54725bd5..2f3e686e 100644 --- a/couchpotato/core/downloaders/nzbget.py +++ b/couchpotato/core/downloaders/nzbget.py @@ -23,6 +23,21 @@ class NZBGet(DownloaderBase): rpc = 'xmlrpc' def download(self, data = None, media = None, filedata = None): + """ + Send a torrent/nzb file to the downloader + + :param data: dict returned from provider + Contains the release information + :param media: media dict with information + Used for creating the filename when possible + :param filedata: downloaded torrent/nzb filedata + The file gets downloaded in the searcher and send to this function + This is done to have failed checking before using the downloader, so the downloader + doesn't need to worry about that + :return: boolean + One faile returns false, but the downloaded should log his own errors + """ + if not media: media = {} if not data: data = {} diff --git a/couchpotato/core/downloaders/nzbvortex.py b/couchpotato/core/downloaders/nzbvortex.py index 4f28ed45..df3e3719 100644 --- a/couchpotato/core/downloaders/nzbvortex.py +++ b/couchpotato/core/downloaders/nzbvortex.py @@ -24,6 +24,21 @@ class NZBVortex(DownloaderBase): session_id = None def download(self, data = None, media = None, filedata = None): + """ + Send a torrent/nzb file to the downloader + + :param data: dict returned from provider + Contains the release information + :param media: media dict with information + Used for creating the filename when possible + :param filedata: downloaded torrent/nzb filedata + The file gets downloaded in the searcher and send to this function + This is done to have failed checking before using the downloader, so the downloader + doesn't need to worry about that + :return: boolean + One faile returns false, but the downloaded should log his own errors + """ + if not media: media = {} if not data: data = {} diff --git a/couchpotato/core/downloaders/pneumatic.py b/couchpotato/core/downloaders/pneumatic.py index 8cf1aebb..957a76dd 100644 --- a/couchpotato/core/downloaders/pneumatic.py +++ b/couchpotato/core/downloaders/pneumatic.py @@ -19,6 +19,21 @@ class Pneumatic(DownloaderBase): status_support = False def download(self, data = None, media = None, filedata = None): + """ + Send a torrent/nzb file to the downloader + + :param data: dict returned from provider + Contains the release information + :param media: media dict with information + Used for creating the filename when possible + :param filedata: downloaded torrent/nzb filedata + The file gets downloaded in the searcher and send to this function + This is done to have failed checking before using the downloader, so the downloader + doesn't need to worry about that + :return: boolean + One faile returns false, but the downloaded should log his own errors + """ + if not media: media = {} if not data: data = {} diff --git a/couchpotato/core/downloaders/qbittorrent_.py b/couchpotato/core/downloaders/qbittorrent_.py index d4bfced1..a9e8cf4d 100644 --- a/couchpotato/core/downloaders/qbittorrent_.py +++ b/couchpotato/core/downloaders/qbittorrent_.py @@ -47,6 +47,21 @@ class qBittorrent(DownloaderBase): return False def download(self, data = None, media = None, filedata = None): + """ + Send a torrent/nzb file to the downloader + + :param data: dict returned from provider + Contains the release information + :param media: media dict with information + Used for creating the filename when possible + :param filedata: downloaded torrent/nzb filedata + The file gets downloaded in the searcher and send to this function + This is done to have failed checking before using the downloader, so the downloader + doesn't need to worry about that + :return: boolean + One faile returns false, but the downloaded should log his own errors + """ + if not media: media = {} if not data: data = {} diff --git a/couchpotato/core/downloaders/rtorrent_.py b/couchpotato/core/downloaders/rtorrent_.py index 7474697f..4de952fa 100644 --- a/couchpotato/core/downloaders/rtorrent_.py +++ b/couchpotato/core/downloaders/rtorrent_.py @@ -94,6 +94,21 @@ class rTorrent(DownloaderBase): def download(self, data = None, media = None, filedata = None): + """ + Send a torrent/nzb file to the downloader + + :param data: dict returned from provider + Contains the release information + :param media: media dict with information + Used for creating the filename when possible + :param filedata: downloaded torrent/nzb filedata + The file gets downloaded in the searcher and send to this function + This is done to have failed checking before using the downloader, so the downloader + doesn't need to worry about that + :return: boolean + One faile returns false, but the downloaded should log his own errors + """ + if not media: media = {} if not data: data = {} diff --git a/couchpotato/core/downloaders/sabnzbd.py b/couchpotato/core/downloaders/sabnzbd.py index cd51cb87..d6e3e1d2 100644 --- a/couchpotato/core/downloaders/sabnzbd.py +++ b/couchpotato/core/downloaders/sabnzbd.py @@ -21,6 +21,21 @@ class Sabnzbd(DownloaderBase): protocol = ['nzb'] def download(self, data = None, media = None, filedata = None): + """ + Send a torrent/nzb file to the downloader + + :param data: dict returned from provider + Contains the release information + :param media: media dict with information + Used for creating the filename when possible + :param filedata: downloaded torrent/nzb filedata + The file gets downloaded in the searcher and send to this function + This is done to have failed checking before using the downloader, so the downloader + doesn't need to worry about that + :return: boolean + One faile returns false, but the downloaded should log his own errors + """ + if not media: media = {} if not data: data = {} diff --git a/couchpotato/core/downloaders/synology.py b/couchpotato/core/downloaders/synology.py index 2c12536f..3e4ead2f 100644 --- a/couchpotato/core/downloaders/synology.py +++ b/couchpotato/core/downloaders/synology.py @@ -19,6 +19,21 @@ class Synology(DownloaderBase): status_support = False def download(self, data = None, media = None, filedata = None): + """ + Send a torrent/nzb file to the downloader + + :param data: dict returned from provider + Contains the release information + :param media: media dict with information + Used for creating the filename when possible + :param filedata: downloaded torrent/nzb filedata + The file gets downloaded in the searcher and send to this function + This is done to have failed checking before using the downloader, so the downloader + doesn't need to worry about that + :return: boolean + One faile returns false, but the downloaded should log his own errors + """ + if not media: media = {} if not data: data = {} diff --git a/couchpotato/core/downloaders/transmission.py b/couchpotato/core/downloaders/transmission.py index 3a04cbbc..8f274915 100644 --- a/couchpotato/core/downloaders/transmission.py +++ b/couchpotato/core/downloaders/transmission.py @@ -34,6 +34,21 @@ class Transmission(DownloaderBase): return self.trpc def download(self, data = None, media = None, filedata = None): + """ + Send a torrent/nzb file to the downloader + + :param data: dict returned from provider + Contains the release information + :param media: media dict with information + Used for creating the filename when possible + :param filedata: downloaded torrent/nzb filedata + The file gets downloaded in the searcher and send to this function + This is done to have failed checking before using the downloader, so the downloader + doesn't need to worry about that + :return: boolean + One faile returns false, but the downloaded should log his own errors + """ + if not media: media = {} if not data: data = {} diff --git a/couchpotato/core/downloaders/utorrent.py b/couchpotato/core/downloaders/utorrent.py index 3164681c..f4535cad 100644 --- a/couchpotato/core/downloaders/utorrent.py +++ b/couchpotato/core/downloaders/utorrent.py @@ -51,6 +51,21 @@ class uTorrent(DownloaderBase): return self.utorrent_api def download(self, data = None, media = None, filedata = None): + """ + Send a torrent/nzb file to the downloader + + :param data: dict returned from provider + Contains the release information + :param media: media dict with information + Used for creating the filename when possible + :param filedata: downloaded torrent/nzb filedata + The file gets downloaded in the searcher and send to this function + This is done to have failed checking before using the downloader, so the downloader + doesn't need to worry about that + :return: boolean + One faile returns false, but the downloaded should log his own errors + """ + if not media: media = {} if not data: data = {}