Beispiel #1
0
 def __init__(self):
     NZBProvider.__init__(self, "Womble's Index")
     self.public = True
     self.cache = WombleCache(self)
     self.urls = {'base_url': 'http://newshost.co.za/'}
     self.url = self.urls['base_url']
     self.supports_backlog = False
Beispiel #2
0
 def __init__(self):
     NZBProvider.__init__(self, "Womble's Index")
     self.public = True
     self.cache = WombleCache(self)
     self.urls = {'base_url': 'http://newshost.co.za/'}
     self.url = self.urls['base_url']
     self.supports_backlog = False
Beispiel #3
0
    def __init__(self, name, url, key='0', catIDs='5030,5040', search_mode='eponly',
                 search_fallback=False, enable_daily=True, enable_backlog=False):

        NZBProvider.__init__(self, name)

        self.url = url
        self.key = key

        self.search_mode = search_mode
        self.search_fallback = search_fallback
        self.enable_daily = enable_daily
        self.enable_backlog = enable_backlog

        # 0 in the key spot indicates that no key is needed
        self.needs_auth = self.key != '0'
        self.public = not self.needs_auth

        self.catIDs = catIDs if catIDs else '5030,5040'

        self.default = False

        self._caps = False
        self.use_tv_search = None
        self.cap_tv_search = None
        # self.cap_search = None
        # self.cap_movie_search = None
        # self.cap_audio_search = None

        self.cache = tvcache.TVCache(self, min_time=30)  # only poll newznab providers every 30 minutes max
Beispiel #4
0
    def __init__(self, name, url, key='0', catIDs='5030,5040', search_mode='eponly',
                 search_fallback=False, enable_daily=True, enable_backlog=False):

        NZBProvider.__init__(self, name)

        # self.headers.update({'User-Agent': USER_AGENT})

        self.urls = {'base_url': url}
        self.url = self.urls['base_url']

        self.key = key

        self.search_mode = search_mode
        self.search_fallback = search_fallback
        self.enable_daily = enable_daily
        self.enable_backlog = enable_backlog

        # 0 in the key spot indicates that no key is needed
        self.needs_auth = self.key != '0'
        self.public = not self.needs_auth

        self.catIDs = catIDs if catIDs else '5030,5040'

        self.default = False

        self.cache = NewznabCache(self)
Beispiel #5
0
    def __init__(self):

        # Provider Init
        NZBProvider.__init__(self, 'Anizb')

        # Credentials
        self.public = True

        # URLs
        self.url = 'https://anizb.org/'
        self.urls = {
            'rss': self.url,
            'api': urljoin(self.url, 'api/?q=')
        }

        # Proper Strings

        # Miscellaneous Options
        self.supports_absolute_numbering = True
        self.anime_only = True

        # Torrent Stats

        # Cache
        self.cache = tvcache.TVCache(self)
Beispiel #6
0
    def __init__(
        self,
        name,
        url,
        key="0",
        catIDs="5030,5040",
        search_mode="eponly",
        search_fallback=False,
        enable_daily=True,
        enable_backlog=False,
    ):

        NZBProvider.__init__(self, name)

        self.urls = {"base_url": url}
        self.url = self.urls["base_url"]

        self.key = key

        self.search_mode = search_mode
        self.search_fallback = search_fallback
        self.enable_daily = enable_daily
        self.enable_backlog = enable_backlog

        # 0 in the key spot indicates that no key is needed
        self.needs_auth = self.key != "0"
        self.public = not self.needs_auth

        self.catIDs = catIDs if catIDs else "5030,5040"

        self.default = False

        self.cache = NewznabCache(self)
Beispiel #7
0
    def __init__(self, name, url, key='0', catIDs='5030,5040', search_mode='eponly',
                 search_fallback=False, enable_daily=True, enable_backlog=False):

        NZBProvider.__init__(self, name)

        self.url = url
        self.key = key

        self.search_mode = search_mode
        self.search_fallback = search_fallback
        self.enable_daily = enable_daily
        self.enable_backlog = enable_backlog

        # 0 in the key spot indicates that no key is needed
        self.needs_auth = self.key != '0'
        self.public = not self.needs_auth

        self.catIDs = catIDs if catIDs else '5030,5040'

        self.default = False

        self._caps = False
        self.use_tv_search = None
        self.cap_tv_search = None
        # self.cap_search = None
        # self.cap_movie_search = None
        # self.cap_audio_search = None

        self.cache = tvcache.TVCache(self, min_time=30)  # only poll newznab providers every 30 minutes max
Beispiel #8
0
    def __init__(self,
                 name,
                 url,
                 key='0',
                 catIDs='5030,5040',
                 search_mode='eponly',
                 search_fallback=False,
                 enable_daily=True,
                 enable_backlog=False):

        NZBProvider.__init__(self, name)

        # self.headers.update({'User-Agent': USER_AGENT})

        self.urls = {'base_url': url}
        self.url = self.urls['base_url']

        self.key = key

        self.search_mode = search_mode
        self.search_fallback = search_fallback
        self.enable_daily = enable_daily
        self.enable_backlog = enable_backlog

        # 0 in the key spot indicates that no key is needed
        self.needs_auth = self.key != '0'
        self.public = not self.needs_auth

        self.catIDs = catIDs if catIDs else '5030,5040'

        self.default = False

        self.cache = NewznabCache(self)
Beispiel #9
0
    def __init__(self):
        NZBProvider.__init__(self, "BinSearch")

        self.public = True
        self.cache = BinSearchCache(self)
        self.urls = {'base_url': 'https://www.binsearch.info/'}
        self.url = self.urls['base_url']
        self.supports_backlog = False
Beispiel #10
0
    def test__get_size(self):
        """
        Test _get_size
        """
        items_list = [
            None, {}, {'links': None}, {'links': []}, {'links': [{}]},
            {'links': [{'length': 1}, {'length': None}, {'length': 3}]},
            {'links': [{'length': 1}, {'length': ''}, {'length': 3}]},
            {'links': [{'length': 1}, {'length': '0'}, {'length': 3}]},
            {'links': [{'length': 1}, {'length': '123'}, {'length': 3}]},
            {'links': [{'length': 1}, {'length': '12.3'}, {'length': 3}]},
            {'links': [{'length': 1}, {'length': '-123'}, {'length': 3}]},
            {'links': [{'length': 1}, {'length': '-12.3'}, {'length': 3}]},
            {'links': [{'length': 1}, {'length': 0}, {'length': 3}]},
            {'links': [{'length': 1}, {'length': 123}, {'length': 3}]},
            {'links': [{'length': 1}, {'length': 12.3}, {'length': 3}]},
            {'links': [{'length': 1}, {'length': -123}, {'length': 3}]},
            {'links': [{'length': 1}, {'length': -12.3}, {'length': 3}]},
        ]
        results_list = [
            -1, -1, -1, -1, -1, -1, -1, 0, 123, -1, -123, -1, 0, 123, 12, -123, -12
        ]

        unicode_items_list = [
            {'links': None}, {'links': []}, {'links': [{}]},
            {'links': [{'length': 1}, {'length': None}, {'length': 3}]},
            {'links': [{'length': 1}, {'length': ''}, {'length': 3}]},
            {'links': [{'length': 1}, {'length': '0'}, {'length': 3}]},
            {'links': [{'length': 1}, {'length': '123'}, {'length': 3}]},
            {'links': [{'length': 1}, {'length': '12.3'}, {'length': 3}]},
            {'links': [{'length': 1}, {'length': '-123'}, {'length': 3}]},
            {'links': [{'length': 1}, {'length': '-12.3'}, {'length': 3}]},
            {'links': [{'length': 1}, {'length': 0}, {'length': 3}]},
            {'links': [{'length': 1}, {'length': 123}, {'length': 3}]},
            {'links': [{'length': 1}, {'length': 12.3}, {'length': 3}]},
            {'links': [{'length': 1}, {'length': -123}, {'length': 3}]},
            {'links': [{'length': 1}, {'length': -12.3}, {'length': 3}]},
        ]
        unicode_results_list = [
            -1, -1, -1, -1, -1, 0, 123, -1, -123, -1, 0, 123, 12, -123, -12
        ]

        self.assertEqual(
            len(items_list), len(results_list),
            'Number of parameters ({0:d}) and results ({1:d}) does not match'.format(len(items_list), len(results_list))
        )

        self.assertEqual(
            len(unicode_items_list), len(unicode_results_list),
            'Number of parameters ({0:d}) and results ({1:d}) does not match'.format(
                len(unicode_items_list), len(unicode_results_list))
        )

        for (index, item) in enumerate(items_list):
            self.assertEqual(NZBProvider('Test Provider')._get_size(item), results_list[index])

        for (index, item) in enumerate(unicode_items_list):
            self.assertEqual(NZBProvider('Test Provider')._get_size(item), unicode_results_list[index])
Beispiel #11
0
    def __init__(self):

        NZBProvider.__init__(self, "BinSearch")

        self.public = True
        self.cache = BinSearchCache(self, min_time=30)  # only poll Binsearch every 30 minutes max
        self.urls = {'base_url': 'https://www.binsearch.info/'}
        self.url = self.urls['base_url']
        self.supports_backlog = False
Beispiel #12
0
    def __init__(self):

        NZBProvider.__init__(self, "Womble's Index")

        self.public = True
        self.cache = WombleCache(self, min_time=15)  # only poll Womble's Index every 15 minutes max
        self.urls = {'base_url': 'http://newshost.co.za/'}
        self.url = self.urls['base_url']
        self.supports_backlog = False
Beispiel #13
0
    def __init__(self):
        NZBProvider.__init__(self, "omgwtfnzbs")

        self.username = None
        self.api_key = None
        self.cache = OmgwtfnzbsCache(self)

        self.urls = {'base_url': 'https://omgwtfnzbs.org/'}
        self.url = self.urls['base_url']
Beispiel #14
0
    def __init__(self):
        NZBProvider.__init__(self, "omgwtfnzbs")

        self.username = None
        self.api_key = None
        self.cache = OmgwtfnzbsCache(self)

        self.urls = {'base_url': 'https://omgwtfnzbs.org/'}
        self.url = self.urls['base_url']
Beispiel #15
0
    def __init__(self):

        NZBProvider.__init__(self, 'Womble\'s Index')

        self.public = True

        self.url = 'http://newshost.co.za'
        self.urls = {'rss': urljoin(self.url, 'rss')}
        self.supports_backlog = False

        self.cache = WombleCache(self, min_time=20)
Beispiel #16
0
    def __init__(self):

        NZBProvider.__init__(self, "Womble's Index")

        self.public = True

        self.url = "http://newshost.co.za"
        self.urls = {"rss": urljoin(self.url, "rss")}
        self.supports_backlog = False

        self.cache = WombleCache(self, min_time=20)
Beispiel #17
0
    def __init__(self):

        NZBProvider.__init__(self, 'BinSearch')

        self.url = 'https://www.binsearch.info'
        self.urls = {'rss': urljoin(self.url, 'rss.php')}

        self.public = True
        self.supports_backlog = False

        self.cache = BinSearchCache(self, min_time=30)  # only poll Binsearch every 30 minutes max
Beispiel #18
0
    def __init__(self):

        NZBProvider.__init__(self, "BinSearch")

        self.url = "https://www.binsearch.info"
        self.urls = {"rss": urljoin(self.url, "rss.php")}

        self.public = True
        self.supports_backlog = False

        self.cache = BinSearchCache(self, min_time=30)  # only poll Binsearch every 30 minutes max
Beispiel #19
0
    def __init__(self):

        NZBProvider.__init__(self, 'Womble\'s Index')

        self.public = True

        self.url = 'http://newshost.co.za'
        self.urls = {'rss': urljoin(self.url, 'rss')}
        self.supports_backlog = False

        self.cache = WombleCache(self, min_time=20)
Beispiel #20
0
    def __init__(self):
        NZBProvider.__init__(self, "OMGWTFNZBs")

        self.username = None
        self.api_key = None

        self.cache = OmgwtfnzbsCache(self)

        self.url = "https://omgwtfnzbs.me/"
        self.urls = {"rss": "https://rss.omgwtfnzbs.me/rss-download.php", "api": "https://api.omgwtfnzbs.me/json/"}

        self.proper_strings = [".PROPER.", ".REPACK."]
Beispiel #21
0
    def __init__(self):

        NZBProvider.__init__(self, "BinSearch")

        self.url = "https://www.binsearch.info"
        self.urls = {"rss": urljoin(self.url, "rss.php")}

        self.public = True
        self.supports_backlog = False

        self.cache = BinSearchCache(
            self, min_time=30)  # only poll Binsearch every 30 minutes max
Beispiel #22
0
    def __init__(self):
        NZBProvider.__init__(self, "omgwtfnzbs")

        self.username = None
        self.api_key = None
        self.cache = OmgwtfnzbsCache(self)

        self.url = 'https://omgwtfnzbs.org/'
        self.urls = {
            'rss': 'https://rss.omgwtfnzbs.org/rss-download.php',
            'api': 'https://api.omgwtfnzbs.org/json/'
        }
Beispiel #23
0
    def __init__(self):

        NZBProvider.__init__(self, "AnimeNZB")

        self.supports_backlog = False
        self.public = True
        self.supports_absolute_numbering = True
        self.anime_only = True

        self.urls = {'base_url': 'http://animenzb.com/'}
        self.url = self.urls['base_url']

        self.cache = animenzbCache(self)
Beispiel #24
0
    def __init__(self):
        NZBProvider.__init__(self, "omgwtfnzbs")

        self.username = None
        self.api_key = None
        self.cache = OmgwtfnzbsCache(self)

        self.url = 'https://omgwtfnzbs.org/'
        self.urls = {
            'rss': 'https://rss.omgwtfnzbs.org/rss-download.php',
            'api': 'https://api.omgwtfnzbs.org/json/'
        }

        self.proper_strings = ['.PROPER.', '.REPACK.']
Beispiel #25
0
    def __init__(self):
        NZBProvider.__init__(self, 'OMGWTFNZBs')

        self.username = None
        self.api_key = None

        self.cache = OmgwtfnzbsCache(self)

        self.url = 'https://omgwtfnzbs.me/'
        self.urls = {
            'rss': 'https://rss.omgwtfnzbs.me/rss-download.php',
            'api': 'https://api.omgwtfnzbs.me/json/'
        }

        self.proper_strings = ['.PROPER.', '.REPACK.']
Beispiel #26
0
    def __init__(self):

        # Provider Init
        NZBProvider.__init__(self, "Womble's Index")

        # Credentials
        self.public = True

        # URLs
        self.url = 'http://newshost.co.za'
        self.urls = {
            'rss': urljoin(self.url, 'rss'),
        }

        # Proper Strings

        # Miscellaneous Options
        self.supports_backlog = False

        # Cache
        self.cache = WombleCache(self, min_time=20)
Beispiel #27
0
    def __init__(self):

        # Provider Init
        NZBProvider.__init__(self, 'BinSearch')

        # Credentials
        self.public = True
        self.supports_backlog = False

        # URLs
        self.url = 'https://www.binsearch.info'
        self.urls = {
            'rss': urljoin(self.url, 'rss.php')
        }

        # Proper Strings

        # Miscellaneous Options

        # Cache
        self.cache = BinSearchCache(self, min_time=30)  # only poll Binsearch every 30 minutes max
Beispiel #28
0
    def test__get_storage_dir(self):
        """
        Test _get_storage_dir
        """
        test_cases = [
            None, 123, 12.3, '', os.path.join('some', 'path', 'to', 'folder')
        ]

        for nzb_dir in test_cases:
            sickbeard.NZB_DIR = nzb_dir

            self.assertEqual(NZBProvider('Test Provider')._get_storage_dir(), nzb_dir)
    def test_is_active(self):
        """
        Test is_active
        """
        test_cases = {
            (False, False): False,
            (False, None): False,
            (False, True): False,
            (None, False): False,
            (None, None): False,
            (None, True): False,
            (True, False): False,
            (True, None): False,
            (True, True): True,
        }

        for ((use_nzb, enabled), result) in iteritems(test_cases):
            sickbeard.USE_NZBS = use_nzb

            provider = NZBProvider('Test Provider')
            provider.enabled = enabled

            self.assertEqual(provider.is_active(), result)
    def test_is_active(self):
        """
        Test is_active
        """
        test_cases = {
            (False, False): False,
            (False, None): False,
            (False, True): False,
            (None, False): False,
            (None, None): False,
            (None, True): False,
            (True, False): False,
            (True, None): False,
            (True, True): True,
        }

        for ((use_nzb, enabled), result) in six.iteritems(test_cases):
            sickbeard.USE_NZBS = use_nzb

            provider = NZBProvider('Test Provider')
            provider.enabled = enabled

            self.assertEqual(provider.is_active(), result)
Beispiel #31
0
 def __init__(self):
     NZBProvider.__init__(self, "BinnewZ")
 def test___init__(self):
     """
     Test __init__
     """
     self.assertEqual(
         NZBProvider('Test Provider').provider_type, GenericProvider.NZB)
Beispiel #33
0
 def __init__(self):
     NZBProvider.__init__(self, "BinnewZ")