From 3f357dec08691a401162236400f4dddf877feb32 Mon Sep 17 00:00:00 2001 From: Supremicus Date: Tue, 3 Mar 2015 20:57:03 +1000 Subject: [PATCH] Remove defunct Fanzub provider --- CHANGES.md | 1 + gui/slick/images/providers/fanzub.gif | Bin 101 -> 0 bytes sickbeard/__init__.py | 2 +- sickbeard/providers/__init__.py | 1 - sickbeard/providers/fanzub.py | 150 -------------------------- 5 files changed, 2 insertions(+), 152 deletions(-) delete mode 100644 gui/slick/images/providers/fanzub.gif delete mode 100644 sickbeard/providers/fanzub.py diff --git a/CHANGES.md b/CHANGES.md index ba57b5e9..a49ef087 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -77,6 +77,7 @@ * Change FreshOnTv login parameter and use secure URLs, add logging of Cloudflare blocking and prevent vacant cookie tracebacks * Change TPB webproxy list and add SSL variants * Add YTV network logo +* Remove defunct Fanzub provider ### 0.6.4 (2015-02-10 20:20:00 UTC) diff --git a/gui/slick/images/providers/fanzub.gif b/gui/slick/images/providers/fanzub.gif deleted file mode 100644 index 1787676a7085bc10a08d939c224916b1b12cb979..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 101 zcmZ?wbhEHb6krfwn8*ME@^0A?z59U-#h)yU3=GT+Iv`PyJR_6Yoc_#%8|_*qGOyEC z$?ZS7Lvez0>+v5;!&-e$aUb`XwozxTM}}p5dF_H59_yy`&sdbJU~zNx2L@{ZE} -# URL: http://code.google.com/p/sickbeard/ -# -# This file is part of Sick Beard. -# -# Sick Beard is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Sick Beard is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Sick Beard. If not, see . - -import urllib -import datetime - -import sickbeard -import generic - -from sickbeard import classes, show_name_helpers, helpers - -from sickbeard import exceptions, logger -from sickbeard.common import * -from sickbeard import tvcache -from lib.dateutil.parser import parse as parseDate - - -class Fanzub(generic.NZBProvider): - - def __init__(self): - - generic.NZBProvider.__init__(self, "Fanzub") - - self.supportsBacklog = False - self.supportsAbsoluteNumbering = True - self.anime_only = True - - self.enabled = False - - self.cache = FanzubCache(self) - - self.url = 'https://fanzub.com/' - - def isEnabled(self): - return self.enabled - - def imageName(self): - return 'fanzub.gif' - - def _get_season_search_strings(self, ep_obj): - return [x for x in show_name_helpers.makeSceneSeasonSearchString(self.show, ep_obj)] - - def _get_episode_search_strings(self, ep_obj, add_string=''): - return [x for x in show_name_helpers.makeSceneSearchString(self.show, ep_obj)] - - def _doSearch(self, search_string, search_mode='eponly', epcount=0, age=0): - if self.show and not self.show.is_anime: - logger.log(u"" + str(self.show.name) + " is not an anime skiping ...") - return [] - - params = { - "cat": "anime", - "q": search_string.encode('utf-8'), - "max": "100" - } - - search_url = self.url + "rss?" + urllib.urlencode(params) - - logger.log(u"Search url: " + search_url, logger.DEBUG) - - data = self.cache.getRSSFeed(search_url) - if not data: - return [] - - if 'entries' in data: - - items = data.entries - results = [] - - for curItem in items: - (title, url) = self._get_title_and_url(curItem) - - if title and url: - results.append(curItem) - else: - logger.log( - u"The data returned from " + self.name + " is incomplete, this result is unusable", - logger.DEBUG) - - return results - - return [] - - def findPropers(self, date=None): - - results = [] - - for item in self._doSearch("v2|v3|v4|v5"): - - (title, url) = self._get_title_and_url(item) - - if item.has_key('published_parsed') and item['published_parsed']: - result_date = item.published_parsed - if result_date: - result_date = datetime.datetime(*result_date[0:6]) - else: - logger.log(u"Unable to figure out the date for entry " + title + ", skipping it") - continue - - if not date or result_date > date: - search_result = classes.Proper(title, url, result_date, self.show) - results.append(search_result) - - return results - - -class FanzubCache(tvcache.TVCache): - - def __init__(self, provider): - - tvcache.TVCache.__init__(self, provider) - - # only poll Fanzub every 20 minutes max - self.minTime = 20 - - def _getRSSData(self): - - params = { - "cat": "anime".encode('utf-8'), - "max": "100".encode('utf-8') - } - - rss_url = self.provider.url + 'rss?' + urllib.urlencode(params) - - logger.log(self.provider.name + u" cache update URL: " + rss_url, logger.DEBUG) - - data = self.getRSSFeed(rss_url) - - if data and 'entries' in data: - return data.entries - else: - return [] - - -provider = Fanzub()