diff --git a/SickBeard.py b/SickBeard.py index 6014dd844ff9e0c5c26d53b07f2f6fc5312739b1..ed1b91ded35b9ee5f118d428b9418155456ba560 100755 --- a/SickBeard.py +++ b/SickBeard.py @@ -100,7 +100,6 @@ class SickRage(object): # webserver constants self.webserver = None - self.forceUpdate = False self.forcedPort = None self.noLaunch = False @@ -114,7 +113,6 @@ class SickRage(object): help_msg += "Options:\n" help_msg += "\n" help_msg += " -h --help Prints this message\n" - help_msg += " -f --forceupdate Force update all shows in the DB (from tvdb) on startup\n" help_msg += " -q --quiet Disables logging to console\n" help_msg += " --nolaunch Suppress launching web browser on startup\n" @@ -135,9 +133,9 @@ class SickRage(object): help_msg += " --noresize Prevent resizing of the banner/posters even if PIL is installed\n" return help_msg - + def fix_clients_nonsense(self): - + files = ["sickbeard/clients/download_station.py", "sickbeard/clients/utorrent.py", "sickbeard/clients/qbittorrent.py", @@ -146,7 +144,7 @@ class SickRage(object): "sickbeard/clients/deluged.py", "sickbeard/clients/rtorrent.py" ] - + for file in files: file = ek.ek(os.path.join, sickbeard.PROG_DIR, file) try: @@ -181,7 +179,7 @@ class SickRage(object): if not hasattr(sys, "setdefaultencoding"): reload(sys) - + if sys.platform == 'win32': if sys.getwindowsversion()[0] >= 6 and sys.stdout.encoding == 'cp65001': sickbeard.SYS_ENCODING = 'UTF-8' @@ -202,7 +200,7 @@ class SickRage(object): try: opts, args = getopt.getopt(sys.argv[1:], "hfqdp::", - ['help', 'forceupdate', 'quiet', 'nolaunch', 'daemon', 'pidfile=', 'port=', + ['help', 'quiet', 'nolaunch', 'daemon', 'pidfile=', 'port=', 'datadir=', 'config=', 'noresize']) # @UnusedVariable except getopt.GetoptError: sys.exit(self.help_message()) @@ -216,10 +214,6 @@ class SickRage(object): if o in ('-q', '--quiet'): self.consoleLogging = False - # Should we update (from indexer) all shows in the DB right away? - if o in ('-f', '--forceupdate'): - self.forceUpdate = True - # Suppress launching web browser # Needed for OSes without default browser assigned # Prevent duplicate browser window when restarting in the app @@ -329,7 +323,7 @@ class SickRage(object): # Get PID sickbeard.PID = os.getpid() - + # Fix clients old files self.fix_clients_nonsense() @@ -381,7 +375,7 @@ class SickRage(object): # Fire up all our threads sickbeard.start() - + # Build internal name cache name_cache.buildNameCache() @@ -392,9 +386,8 @@ class SickRage(object): if sickbeard.USE_FAILED_DOWNLOADS: failed_history.trimHistory() - # Start an update if we're supposed to - if self.forceUpdate or sickbeard.UPDATE_SHOWS_ON_START: - sickbeard.showUpdateScheduler.forceRun() + # Check for metadata indexer updates for shows (Disabled until we use api) + #sickbeard.showUpdateScheduler.forceRun() # Launch browser if sickbeard.LAUNCH_BROWSER and not (self.noLaunch or self.runAsDaemon): diff --git a/gui/slick/interfaces/default/config_general.mako b/gui/slick/interfaces/default/config_general.mako index e90f0de251c697f67dc51e99e013d2d6258d7c6f..d1914035d639e3c7e33b01df5add48e3a58ce3ca 100644 --- a/gui/slick/interfaces/default/config_general.mako +++ b/gui/slick/interfaces/default/config_general.mako @@ -110,26 +110,6 @@ </label> </div> - <div class="field-pair"> - <label for="update_shows_on_start"> - <span class="component-title">Update shows on startup</span> - <span class="component-desc"> - <input type="checkbox" name="update_shows_on_start" id="update_shows_on_start" ${('', 'checked="checked"')[bool(sickbeard.UPDATE_SHOWS_ON_START)]}/> - <p>with information such as next air dates, show ended, etc. Disable for a faster startup as show info is sheduled to update in the background anyway</p> - </span> - </label> - </div> - - <div class="field-pair"> - <label for="update_shows_on_snatch"> - <span class="component-title">Update shows on snatch</span> - <span class="component-desc"> - <input type="checkbox" name="update_shows_on_snatch" id="update_shows_on_snatch" ${('', 'checked="checked"')[bool(sickbeard.UPDATE_SHOWS_ON_SNATCH)]}/> - <p>with information such as next air dates, show ended, etc.</p> - </span> - </label> - </div> - <div class="field-pair"> <span class="component-title">Send to trash for actions</span> <span class="component-desc"> diff --git a/gui/slick/js/config.js b/gui/slick/js/config.js index 6e3f9d018891c38b98554178a7858083ce771c67..62d3579804f9c9f30bf8bba876275737124c34ec 100644 --- a/gui/slick/js/config.js +++ b/gui/slick/js/config.js @@ -70,9 +70,8 @@ $(document).ready(function(){ $('#branchCheckout').click(function() { var url = sbRoot+'/home/branchCheckout?branch='+$("#branchVersion").val(); - var checkDBversion = sbRoot + "/home/getDBcompare?branchDest=" - var branchDest = $('#branchVersion option:selected').val() - $.getJSON(checkDBversion + branchDest, function(data){ + var checkDBversion = sbRoot + "/home/getDBcompare" + $.getJSON(checkDBversion, function(data){ if (data.status == "success") { if (data.message == "equal") { //Checkout Branch diff --git a/lib/imdb/__init__.py b/lib/imdb/__init__.py index 5114dd22db58eb836b7e3d147f6e1a66549ba0dc..a14eec2fb00a28c4e8e36374a4033b4407910958 100644 --- a/lib/imdb/__init__.py +++ b/lib/imdb/__init__.py @@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA __all__ = ['IMDb', 'IMDbError', 'Movie', 'Person', 'Character', 'Company', 'available_access_systems'] -__version__ = VERSION = '5.1dev20141116' +__version__ = VERSION = '5.1dev20150705' # Import compatibility module (importing it is enough). import _compat diff --git a/lib/imdb/locale/generatepot.py b/lib/imdb/locale/generatepot.py old mode 100644 new mode 100755 diff --git a/lib/imdb/locale/imdbpy-de.po b/lib/imdb/locale/imdbpy-de.po index c0585b92069042fd6fedd8de597a5a2a642df3b2..ee3112b107c1b43c02aa696fbae5a88293d65873 100644 --- a/lib/imdb/locale/imdbpy-de.po +++ b/lib/imdb/locale/imdbpy-de.po @@ -1,12 +1,13 @@ # Gettext message file for imdbpy # Translators: -# Ioan, 2013 +# Nils Welzk, 2013 +# Raphael, 2014 msgid "" msgstr "" "Project-Id-Version: IMDbPY\n" "POT-Creation-Date: 2010-03-18 14:35+0000\n" -"PO-Revision-Date: 2013-11-20 11:07+0000\n" -"Last-Translator: Ioan\n" +"PO-Revision-Date: 2014-10-21 15:24+0000\n" +"Last-Translator: Raphael\n" "Language-Team: German (http://www.transifex.com/projects/p/imdbpy/language/de/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -20,11 +21,11 @@ msgstr "" # Default: Actor msgid "actor" -msgstr "" +msgstr "Schauspieler" # Default: Actress msgid "actress" -msgstr "" +msgstr "Schauspielerin" # Default: Adaption msgid "adaption" @@ -32,7 +33,7 @@ msgstr "" # Default: Additional information msgid "additional-information" -msgstr "" +msgstr "zusätzliche Information" # Default: Admissions msgid "admissions" @@ -48,7 +49,7 @@ msgstr "" # Default: Akas msgid "akas" -msgstr "" +msgstr "Pseudonüme" # Default: Akas from release info msgid "akas-from-release-info" @@ -56,7 +57,7 @@ msgstr "" # Default: All products msgid "all-products" -msgstr "" +msgstr "Alle Produkte" # Default: Alternate language version of msgid "alternate-language-version-of" @@ -68,7 +69,7 @@ msgstr "" # Default: Amazon reviews msgid "amazon-reviews" -msgstr "" +msgstr "Amazon Rezensionen" # Default: Analog left msgid "analog-left" @@ -100,7 +101,7 @@ msgstr "" # Default: Art director msgid "art-director" -msgstr "" +msgstr "Art Director" # Default: Article msgid "article" @@ -112,7 +113,7 @@ msgstr "" # Default: Aspect ratio msgid "aspect-ratio" -msgstr "" +msgstr "Seitenverhältnis" # Default: Assigner msgid "assigner" @@ -132,7 +133,7 @@ msgstr "" # Default: Audio quality msgid "audio-quality" -msgstr "" +msgstr "Audio Qualität" # Default: Award msgid "award" @@ -188,7 +189,7 @@ msgstr "Kosten" # Default: Business msgid "business" -msgstr "" +msgstr "Geschäft" # Default: By arrangement with msgid "by-arrangement-with" @@ -220,7 +221,7 @@ msgstr "" # Default: Cast msgid "cast" -msgstr "" +msgstr "Besetzung" # Default: Casting department msgid "casting-department" @@ -236,23 +237,23 @@ msgstr "" # Default: Category msgid "category" -msgstr "" +msgstr "Kategorie" # Default: Certificate msgid "certificate" -msgstr "" +msgstr "Zertifikat" # Default: Certificates msgid "certificates" -msgstr "" +msgstr "Zertifikate" # Default: Certification msgid "certification" -msgstr "" +msgstr "Bescheinigung" # Default: Channel msgid "channel" -msgstr "" +msgstr "Kanal" # Default: Character msgid "character" @@ -372,7 +373,7 @@ msgstr "" # Default: Description msgid "description" -msgstr "" +msgstr "Beschreibung" # Default: Dialogue intellegibility msgid "dialogue-intellegibility" @@ -396,7 +397,7 @@ msgstr "" # Default: Distributors msgid "distributors" -msgstr "" +msgstr "Händler" # Default: Dvd msgid "dvd" @@ -452,7 +453,7 @@ msgstr "Episoden" # Default: Episodes rating msgid "episodes-rating" -msgstr "" +msgstr "Episoden Bewertung" # Default: Essays msgid "essays" @@ -464,7 +465,7 @@ msgstr "" # Default: Faqs msgid "faqs" -msgstr "" +msgstr "FAQs" # Default: Feature msgid "feature" @@ -488,19 +489,19 @@ msgstr "" # Default: Filmography msgid "filmography" -msgstr "" +msgstr "Filmografie" # Default: Followed by msgid "followed-by" -msgstr "" +msgstr "gefolgt von" # Default: Follows msgid "follows" -msgstr "" +msgstr "folgt" # Default: For msgid "for" -msgstr "" +msgstr "für" # Default: Frequency response msgid "frequency-response" @@ -508,7 +509,7 @@ msgstr "" # Default: From msgid "from" -msgstr "" +msgstr "von" # Default: Full article link msgid "full-article-link" @@ -524,7 +525,7 @@ msgstr "" # Default: Genres msgid "genres" -msgstr "" +msgstr "Genres" # Default: Goofs msgid "goofs" @@ -540,7 +541,7 @@ msgstr "" # Default: Headshot msgid "headshot" -msgstr "" +msgstr "Portrait" # Default: Height msgid "height" @@ -556,15 +557,15 @@ msgstr "" # Default: Interview msgid "interview" -msgstr "" +msgstr "Interview" # Default: Interviews msgid "interviews" -msgstr "" +msgstr "Interviews" # Default: Introduction msgid "introduction" -msgstr "" +msgstr "Vorstellung" # Default: Item msgid "item" @@ -596,7 +597,7 @@ msgstr "Sprachen" # Default: Laserdisc msgid "laserdisc" -msgstr "" +msgstr "Laserdisc" # Default: Laserdisc title msgid "laserdisc-title" @@ -624,7 +625,7 @@ msgstr "Literatur" # Default: Locations msgid "locations" -msgstr "" +msgstr "Standorte" # Default: Long imdb canonical name msgid "long-imdb-canonical-name" @@ -708,11 +709,11 @@ msgstr "" # Default: Nick names msgid "nick-names" -msgstr "" +msgstr "Spitznamen" # Default: Notes msgid "notes" -msgstr "" +msgstr "Anmerkungen" # Default: Novel msgid "novel" @@ -720,7 +721,7 @@ msgstr "" # Default: Number msgid "number" -msgstr "" +msgstr "Zahl" # Default: Number of chapter stops msgid "number-of-chapter-stops" @@ -800,7 +801,7 @@ msgstr "" # Default: Plot msgid "plot" -msgstr "Inhalt" +msgstr "Handlung" # Default: Plot outline msgid "plot-outline" @@ -824,7 +825,7 @@ msgstr "" # Default: Producer msgid "producer" -msgstr "" +msgstr "Produzent" # Default: Production companies msgid "production-companies" @@ -864,15 +865,15 @@ msgstr "" # Default: Quote msgid "quote" -msgstr "" +msgstr "Zitat" # Default: Quotes msgid "quotes" -msgstr "" +msgstr "Zitate" # Default: Rating msgid "rating" -msgstr "" +msgstr "Bewertung" # Default: Recommendations msgid "recommendations" @@ -896,11 +897,11 @@ msgstr "" # Default: Release date msgid "release-date" -msgstr "" +msgstr "Veröffentlichungsdatum" # Default: Release dates msgid "release-dates" -msgstr "" +msgstr "Veröffentlichungstermine" # Default: Remade as msgid "remade-as" @@ -908,27 +909,27 @@ msgstr "" # Default: Remake of msgid "remake-of" -msgstr "" +msgstr "Remake von" # Default: Rentals msgid "rentals" -msgstr "" +msgstr "Leigebühr" # Default: Result msgid "result" -msgstr "" +msgstr "Ergebnis" # Default: Review msgid "review" -msgstr "" +msgstr "Kritik" # Default: Review author msgid "review-author" -msgstr "" +msgstr "Kritik Autor" # Default: Review kind msgid "review-kind" -msgstr "" +msgstr "Kritik Art" # Default: Runtime msgid "runtime" @@ -1096,7 +1097,7 @@ msgstr "" # Default: Soundtrack msgid "soundtrack" -msgstr "" +msgstr "Soundtrack" # Default: Spaciality msgid "spaciality" @@ -1116,43 +1117,43 @@ msgstr "" # Default: Spin off msgid "spin-off" -msgstr "" +msgstr "Nebenprodukt" # Default: Spin off from msgid "spin-off-from" -msgstr "" +msgstr "Nebenprodukt von" # Default: Spoofed in msgid "spoofed-in" -msgstr "" +msgstr "Parodiert in" # Default: Spoofs msgid "spoofs" -msgstr "" +msgstr "Parodie" # Default: Spouse msgid "spouse" -msgstr "" +msgstr "Gattin" # Default: Status of availablility msgid "status-of-availablility" -msgstr "" +msgstr "Verfügbarkeitsstatus" # Default: Studio msgid "studio" -msgstr "" +msgstr "Studio" # Default: Studios msgid "studios" -msgstr "" +msgstr "Studios" # Default: Stunt performer msgid "stunt-performer" -msgstr "" +msgstr "Stunt-Darsteller" # Default: Stunts msgid "stunts" -msgstr "" +msgstr "Stunts" # Default: Subtitles msgid "subtitles" @@ -1160,19 +1161,19 @@ msgstr "Untertitel" # Default: Supplement msgid "supplement" -msgstr "" +msgstr "Ergänzung" # Default: Supplements msgid "supplements" -msgstr "" +msgstr "Ergänzungen" # Default: Synopsis msgid "synopsis" -msgstr "" +msgstr "Zusammenfassung" # Default: Taglines msgid "taglines" -msgstr "" +msgstr "Slogan" # Default: Tech info msgid "tech-info" @@ -1188,7 +1189,7 @@ msgstr "Zeit" # Default: Title msgid "title" -msgstr "" +msgstr "Titel" # Default: Titles in this product msgid "titles-in-this-product" @@ -1200,11 +1201,11 @@ msgstr "" # Default: Top 250 rank msgid "top-250-rank" -msgstr "" +msgstr "Top 250 platzierung" # Default: Trade mark msgid "trade-mark" -msgstr "" +msgstr "Warenzeichen" # Default: Transportation department msgid "transportation-department" @@ -1212,7 +1213,7 @@ msgstr "" # Default: Trivia msgid "trivia" -msgstr "" +msgstr "Nichtigkeiten" # Default: Tv msgid "tv" @@ -1220,7 +1221,7 @@ msgstr "TV" # Default: Under license from msgid "under-license-from" -msgstr "" +msgstr "lizensiert von" # Default: Unknown link msgid "unknown-link" @@ -1256,19 +1257,19 @@ msgstr "" # Default: Video quality msgid "video-quality" -msgstr "" +msgstr "Video Qualität" # Default: Video standard msgid "video-standard" -msgstr "" +msgstr "Video Standart" # Default: Visual effects msgid "visual-effects" -msgstr "" +msgstr "Visuelle Effekte" # Default: Votes msgid "votes" -msgstr "" +msgstr "Stimmen" # Default: Votes distribution msgid "votes-distribution" @@ -1284,11 +1285,11 @@ msgstr "" # Default: With msgid "with" -msgstr "" +msgstr "mit" # Default: Writer msgid "writer" -msgstr "Schreiber" +msgstr "Autor" # Default: Written by msgid "written-by" diff --git a/lib/imdb/locale/imdbpy-fr.po b/lib/imdb/locale/imdbpy-fr.po index c4509c993ac578b712c14d559ade6f8c8c8c8d41..f40012c12dc982782c72ef6fdce63d740c9b5e12 100644 --- a/lib/imdb/locale/imdbpy-fr.po +++ b/lib/imdb/locale/imdbpy-fr.po @@ -1,13 +1,14 @@ # Gettext message file for imdbpy # Translators: -# RainDropR <rajaa@hilltx.com>, 2013 -# Stéphane Aulery, 2012 +# lukophron, 2014 +# Rajaa Gutknecht <rajaa@hilltx.com>, 2013 +# lkppo, 2012 msgid "" msgstr "" "Project-Id-Version: IMDbPY\n" "POT-Creation-Date: 2010-03-18 14:35+0000\n" -"PO-Revision-Date: 2013-11-20 11:07+0000\n" -"Last-Translator: RainDropR <rajaa@hilltx.com>\n" +"PO-Revision-Date: 2014-10-08 02:52+0000\n" +"Last-Translator: lukophron\n" "Language-Team: French (http://www.transifex.com/projects/p/imdbpy/language/fr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -33,11 +34,11 @@ msgstr "adaptation" # Default: Additional information msgid "additional-information" -msgstr "" +msgstr "information-additionnelle" # Default: Admissions msgid "admissions" -msgstr "" +msgstr "admissions" # Default: Agent address msgid "agent-address" diff --git a/lib/imdb/locale/rebuildmo.py b/lib/imdb/locale/rebuildmo.py old mode 100644 new mode 100755 diff --git a/lib/imdb/parser/http/__init__.py b/lib/imdb/parser/http/__init__.py index 16f8518df3daeb08a5e82202253226306d5201e0..a3001a08daccc68b5454642fedfda1b13d11b2bf 100644 --- a/lib/imdb/parser/http/__init__.py +++ b/lib/imdb/parser/http/__init__.py @@ -726,6 +726,10 @@ class IMDbHTTPAccessSystem(IMDbBase): cont = self._retrieve(self.urls['person_main'] % personID + 'bio') return self.pProxy.bio_parser.parse(cont, getRefs=self._getRefs) + def get_person_resume(self, personID): + cont = self._retrieve(self.urls['person_main'] % personID + 'resume') + return self.pProxy.resume_parser.parse(cont, getRefs=self._getRefs) + def get_person_awards(self, personID): cont = self._retrieve(self.urls['person_main'] % personID + 'awards') return self.pProxy.person_awards_parser.parse(cont) diff --git a/lib/imdb/parser/http/movieParser.py b/lib/imdb/parser/http/movieParser.py index a203b0d93cb8ed2d119eb31a16c7d033392cc477..d19b71904341a9538797260a7c8a66518dcdac86 100644 --- a/lib/imdb/parser/http/movieParser.py +++ b/lib/imdb/parser/http/movieParser.py @@ -1534,7 +1534,7 @@ class DOMHTMLSeasonEpisodesParser(DOMParserBase): '').strip() episode_title = episode.get('title', '').strip() episode_plot = episode.get('plot', '') - if not (episode_nr and episode_id and episode_title): + if not (episode_nr is not None and episode_id and episode_title): continue ep_obj = Movie(movieID=episode_id, title=episode_title, accessSystem=self._as, modFunct=self._modFunct) diff --git a/lib/imdb/parser/http/personParser.py b/lib/imdb/parser/http/personParser.py index 9261a4da11a4fd73b87044c03fbe6908bb736c97..27168bb92e106e1d3160ba98996a4fd14bb04593 100644 --- a/lib/imdb/parser/http/personParser.py +++ b/lib/imdb/parser/http/personParser.py @@ -326,6 +326,107 @@ class DOMHTMLBioParser(DOMParserBase): return data +class DOMHTMLResumeParser(DOMParserBase): + """Parser for the "resume" page of a given person. + The page should be provided as a string, as taken from + the akas.imdb.com server. The final result will be a + dictionary, with a key for every relevant section. + + Example: + resumeparser = DOMHTMLResumeParser() + result = resumeparser.parse(resume_html_string) + """ + _defGetRefs = True + + extractors = [ + Extractor(label='info', + group="//div[@class='section_box']", + group_key="./h3/text()", + group_key_normalize=lambda x: x.lower().replace(' ', '_'), + path="./ul[@class='resume_section_multi_list']//li", + attrs=Attribute(key=None, + multi=True, + path={ + 'title': ".//b//text()", + 'desc': ".//text()", + }, + postprocess=lambda x: (x.get('title'), x.get('desc').strip().replace('\n', ' ')))), + Extractor(label='other_info', + group="//div[@class='section_box']", + group_key="./h3/text()", + group_key_normalize=lambda x: x.lower().replace(' ', '_'), + path="./ul[@class='_imdbpy']//li", + attrs=Attribute(key=None, + multi=True, + path=".//text()", + postprocess=lambda x: x.strip().replace('\n', ' '))), + Extractor(label='credits', + group="//div[@class='section_box']", + group_key="./h3/text()", + group_key_normalize=lambda x: x.lower().replace(' ', '_'), + path="./table[@class='credits']//tr", + attrs=Attribute(key=None, + multi=True, + path={ + '0':".//td[1]//text()", + '1':".//td[2]//text()", + '2':".//td[3]//text()", + }, + postprocess=lambda x: [x.get('0'),x.get('1'),x.get('2')])), + Extractor(label='mini_info', + path="//div[@class='center']", + attrs=Attribute(key='mini_info', + path=".//text()", + postprocess=lambda x: x.strip().replace('\n', ' '))), + Extractor(label='name', + path="//div[@class='center']/h1[@id='preview_user_name']", + attrs=Attribute(key='name', + path=".//text()", + postprocess=lambda x: x.strip().replace('\n', ' '))), + Extractor(label='resume_bio', + path="//div[@id='resume_rendered_html']//p", + attrs=Attribute(key='resume_bio', + multi=True, + path=".//text()")), + + ] + + preprocessors = [ + (re.compile('(<ul>)', re.I), r'<ul class="_imdbpy">\1'), + ] + + def postprocess_data(self, data): + + for key in data.keys(): + if data[key] == '': + del data[key] + if key in ('mini_info', 'name', 'resume_bio'): + if key == 'resume_bio': + data[key] = "".join(data[key]).strip() + continue + if len(data[key][0]) == 3: + for item in data[key]: + item[:] = [x for x in item if not x == None] + continue + + if len(data[key][0]) == 2: + new_key = {} + for item in data[key]: + if item[0] == None: + continue + if ':' in item[0]: + if item[1].replace(item[0], '')[1:].strip() == '': + continue + new_key[item[0].strip().replace(':', '')] = item[1].replace(item[0], '')[1:].strip() + else: + new_key[item[0]] = item[1] + data[key] = new_key + + new_data = {} + new_data['resume'] = data + return new_data + + class DOMHTMLOtherWorksParser(DOMParserBase): """Parser for the "other works" and "agent" pages of a given person. The page should be provided as a string, as taken from @@ -502,6 +603,7 @@ from movieParser import DOMHTMLNewsParser _OBJECTS = { 'maindetails_parser': ((DOMHTMLMaindetailsParser,), None), 'bio_parser': ((DOMHTMLBioParser,), None), + 'resume_parser': ((DOMHTMLResumeParser,), None), 'otherworks_parser': ((DOMHTMLOtherWorksParser,), None), #'agent_parser': ((DOMHTMLOtherWorksParser,), {'kind': 'agent'}), 'person_officialsites_parser': ((DOMHTMLOfficialsitesParser,), None), diff --git a/sickbeard/__init__.py b/sickbeard/__init__.py index ef33f107b995277d1d2e8170eb0c48f6376e0a63..e2cbe3b30c9b9c86ae294f9b82eabfe0d8886388 100644 --- a/sickbeard/__init__.py +++ b/sickbeard/__init__.py @@ -176,8 +176,7 @@ LAUNCH_BROWSER = False CACHE_DIR = None ACTUAL_CACHE_DIR = None ROOT_DIRS = None -UPDATE_SHOWS_ON_START = False -UPDATE_SHOWS_ON_SNATCH = False + TRASH_REMOVE_SHOW = False TRASH_ROTATE_LOGS = False SORT_ARTICLE = False @@ -564,7 +563,7 @@ def initialize(consoleLogging=True): USE_PLEX, PLEX_NOTIFY_ONSNATCH, PLEX_NOTIFY_ONDOWNLOAD, PLEX_NOTIFY_ONSUBTITLEDOWNLOAD, PLEX_UPDATE_LIBRARY, USE_PLEX_CLIENT, PLEX_CLIENT_USERNAME, PLEX_CLIENT_PASSWORD, \ PLEX_SERVER_HOST, PLEX_SERVER_TOKEN, PLEX_HOST, PLEX_USERNAME, PLEX_PASSWORD, DEFAULT_BACKLOG_FREQUENCY, MIN_BACKLOG_FREQUENCY, BACKLOG_STARTUP, SKIP_REMOVED_FILES, \ USE_EMBY, EMBY_HOST, EMBY_APIKEY, \ - showUpdateScheduler, __INITIALIZED__, INDEXER_DEFAULT_LANGUAGE, EP_DEFAULT_DELETED_STATUS, LAUNCH_BROWSER, UPDATE_SHOWS_ON_START, UPDATE_SHOWS_ON_SNATCH, TRASH_REMOVE_SHOW, TRASH_ROTATE_LOGS, SORT_ARTICLE, showList, loadingShowList, \ + showUpdateScheduler, __INITIALIZED__, INDEXER_DEFAULT_LANGUAGE, EP_DEFAULT_DELETED_STATUS, LAUNCH_BROWSER, TRASH_REMOVE_SHOW, TRASH_ROTATE_LOGS, SORT_ARTICLE, showList, loadingShowList, \ NEWZNAB_DATA, NZBS, NZBS_UID, NZBS_HASH, INDEXER_DEFAULT, INDEXER_TIMEOUT, USENET_RETENTION, TORRENT_DIR, \ QUALITY_DEFAULT, FLATTEN_FOLDERS_DEFAULT, SUBTITLES_DEFAULT, STATUS_DEFAULT, STATUS_DEFAULT_AFTER, DAILYSEARCH_STARTUP, \ GROWL_NOTIFY_ONSNATCH, GROWL_NOTIFY_ONDOWNLOAD, GROWL_NOTIFY_ONSUBTITLEDOWNLOAD, TWITTER_NOTIFY_ONSNATCH, TWITTER_NOTIFY_ONDOWNLOAD, TWITTER_NOTIFY_ONSUBTITLEDOWNLOAD, USE_FREEMOBILE, FREEMOBILE_ID, FREEMOBILE_APIKEY, FREEMOBILE_NOTIFY_ONSNATCH, FREEMOBILE_NOTIFY_ONDOWNLOAD, FREEMOBILE_NOTIFY_ONSUBTITLEDOWNLOAD, \ @@ -773,8 +772,6 @@ def initialize(consoleLogging=True): if not ANON_REDIRECT.endswith('?'): ANON_REDIRECT = '' - UPDATE_SHOWS_ON_START = bool(check_setting_int(CFG, 'General', 'update_shows_on_start', 0)) - UPDATE_SHOWS_ON_SNATCH = bool(check_setting_int(CFG, 'General', 'update_shows_on_snatch', 0)) TRASH_REMOVE_SHOW = bool(check_setting_int(CFG, 'General', 'trash_remove_show', 0)) TRASH_ROTATE_LOGS = bool(check_setting_int(CFG, 'General', 'trash_rotate_logs', 0)) @@ -1691,8 +1688,6 @@ def save_config(): new_config['General']['indexerDefaultLang'] = INDEXER_DEFAULT_LANGUAGE new_config['General']['ep_default_deleted_status'] = int(EP_DEFAULT_DELETED_STATUS) new_config['General']['launch_browser'] = int(LAUNCH_BROWSER) - new_config['General']['update_shows_on_start'] = int(UPDATE_SHOWS_ON_START) - new_config['General']['update_shows_on_snatch'] = int(UPDATE_SHOWS_ON_SNATCH) new_config['General']['trash_remove_show'] = int(TRASH_REMOVE_SHOW) new_config['General']['trash_rotate_logs'] = int(TRASH_ROTATE_LOGS) new_config['General']['sort_article'] = int(SORT_ARTICLE) diff --git a/sickbeard/helpers.py b/sickbeard/helpers.py index 8d2b0b159cb6e99009987c57d7dcf8fbd82cb1cf..966372fdcd6cd77e14cedd30a35fee21a84ef467 100644 --- a/sickbeard/helpers.py +++ b/sickbeard/helpers.py @@ -148,6 +148,7 @@ def remove_non_release_groups(name): ' \[1044\]$': 'searchre', '\.RiPSaLoT$': 'searchre', '\.GiuseppeTnT$': 'searchre', + '\.Renc$': 'searchre', '-NZBGEEK$': 'searchre', '-Siklopentan$': 'searchre', '-RP$': 'searchre', diff --git a/sickbeard/providers/kat.py b/sickbeard/providers/kat.py index 65200573eecfc14aa49a35898ac6728ccf9f72a2..dc5898fc9fbbbd6f2e0d1fa363985e2ba6668f3c 100644 --- a/sickbeard/providers/kat.py +++ b/sickbeard/providers/kat.py @@ -136,8 +136,8 @@ class KATProvider(generic.TorrentProvider): quality = Quality.sceneQuality(os.path.basename(fileName)) if quality != Quality.UNKNOWN: break - if fileName is not None and quality == Quality.UNKNOWN: - quality = Quality.assumeQuality(fileName) + #if fileName is not None and quality == Quality.UNKNOWN: + # quality = Quality.assumeQuality(fileName) if quality == Quality.UNKNOWN: logger.log(u"Unable to obtain a Season Quality for " + title, logger.DEBUG) diff --git a/sickbeard/providers/thepiratebay.py b/sickbeard/providers/thepiratebay.py index 23df14de24015ab1be375338f26a18a74f32147a..30a40113e2c47b78f5c70351143344dc3f83ff06 100644 --- a/sickbeard/providers/thepiratebay.py +++ b/sickbeard/providers/thepiratebay.py @@ -144,8 +144,8 @@ class ThePirateBayProvider(generic.TorrentProvider): quality = Quality.sceneQuality(os.path.basename(fileName)) if quality != Quality.UNKNOWN: break - if fileName is not None and quality == Quality.UNKNOWN: - quality = Quality.assumeQuality(fileName) + #if fileName is not None and quality == Quality.UNKNOWN: + # quality = Quality.assumeQuality(fileName) if quality == Quality.UNKNOWN: logger.log(u"Unable to obtain a Season Quality for " + title, logger.DEBUG) diff --git a/sickbeard/search.py b/sickbeard/search.py index d98324c7f1f5dc31e9c394b5be45cbb9fdcdbb6c..18ee986252d1a1f804c64e7b5502756a831753e4 100644 --- a/sickbeard/search.py +++ b/sickbeard/search.py @@ -181,12 +181,6 @@ def snatchEpisode(result, endStatus=SNATCHED): myDB = db.DBConnection() myDB.mass_action(sql_l) - if sickbeard.UPDATE_SHOWS_ON_SNATCH and not sickbeard.showQueueScheduler.action.isBeingUpdated(result.show) and result.show.status == "Continuing": - try: - sickbeard.showQueueScheduler.action.updateShow(result.show, True) - except exceptions.CantUpdateException as e: - logger.log("Unable to update show: {0}".format(str(e)),logger.DEBUG) - return True @@ -237,11 +231,13 @@ def pickBestResult(results, show): logger.log(cur_result.name + u" has previously failed, rejecting it") continue - if cur_result.quality in bestQualities and (not bestResult or bestResult.quality < cur_result.quality or bestResult not in bestQualities): + if not bestResult: + bestResult = cur_result + elif cur_result.quality in bestQualities and (bestResult.quality < cur_result.quality or bestResult not in bestQualities): bestResult = cur_result - elif cur_result.quality in anyQualities and (not bestResult or bestResult not in bestQualities) and (not bestResult or bestResult.quality < cur_result.quality): + elif cur_result.quality in anyQualities and bestResult not in bestQualities and bestResult.quality < cur_result.quality: bestResult = cur_result - elif bestResult and bestResult.quality == cur_result.quality: + elif bestResult.quality == cur_result.quality: if "proper" in cur_result.name.lower() or "repack" in cur_result.name.lower(): bestResult = cur_result elif "internal" in bestResult.name.lower() and "internal" not in cur_result.name.lower(): @@ -595,11 +591,11 @@ def searchProviders(show, episodes, manualSearch=False, downCurQuality=False): # go through multi-ep results and see if we really want them or not, get rid of the rest multiResults = {} if MULTI_EP_RESULT in foundResults[curProvider.name]: - for multiResult in foundResults[curProvider.name][MULTI_EP_RESULT]: + for _multiResult in foundResults[curProvider.name][MULTI_EP_RESULT]: logger.log(u"Seeing if we want to bother with multi-episode result " + multiResult.name, logger.DEBUG) - multiResult = pickBestResult([multiResult], show) + multiResult = pickBestResult(_multiResult, show) if not multiResult: continue diff --git a/sickbeard/versionChecker.py b/sickbeard/versionChecker.py index 757ca924afdb100961b46e38a57b2b1356a6c25b..897b04b0573e44b40274f7e9b40a986ed5570db7 100644 --- a/sickbeard/versionChecker.py +++ b/sickbeard/versionChecker.py @@ -49,7 +49,7 @@ class CheckVersion(): def __init__(self): self.updater = None - self.install_type = None + self.install_type = None self.amActive = False if sickbeard.gh: self.install_type = self.find_install_type() @@ -88,7 +88,7 @@ class CheckVersion(): backupDir = os.path.join(sickbeard.DATA_DIR, 'backup') if not os.path.isdir(backupDir): os.mkdir(backupDir) - + if self._keeplatestbackup(backupDir) == True and self._backup(backupDir) == True: logger.log(u"Config backup successful, updating...") ui.notifications.message('Backup', 'Config backup successful, updating...') @@ -115,13 +115,13 @@ class CheckVersion(): if age < newest[1]: newest = file, age files.remove(newest[0]) - + for file in files: os.remove(file) return True else: return False - + # TODO: Merge with backup in helpers def _backup(self,backupDir=None): if backupDir: @@ -164,7 +164,7 @@ class CheckVersion(): except: logger.log(u"We can't proceed with the update. Unable to compare DB version", logger.ERROR) return False - + def postprocessor_safe(self): if not sickbeard.autoPostProcesserScheduler.action.amActive: logger.log(u"We can proceed with the update. Post-Processor is not running", logger.DEBUG) @@ -172,7 +172,7 @@ class CheckVersion(): else: logger.log(u"We can't proceed with the update. Post-Processor is running", logger.DEBUG) return False - + def showupdate_safe(self): if not sickbeard.showUpdateScheduler.action.amActive: logger.log(u"We can proceed with the update. Shows are not being updated", logger.DEBUG) @@ -194,7 +194,7 @@ class CheckVersion(): def getDBcompare(self): try: - response = requests.get("http://cdn.rawgit.com/SICKRAGETV/SickRage/" + str(self._newest_commit_hash) +"/sickbeard/databases/mainDB.py") + response = requests.get("http://cdn.rawgit.com/SICKRAGETV/SickRage/" + str(self.updater.get_newest_commit_hash()) +"/sickbeard/databases/mainDB.py") response.raise_for_status() match = re.search(r"MAX_DB_VERSION\s=\s(?P<version>\d{2,3})",response.text) branchDestDBversion = int(match.group('version')) @@ -447,9 +447,9 @@ class GitUpdateManager(UpdateManager): if branch: sickbeard.BRANCH = branch return branch - + return "" - + def _check_github_for_update(self): """ Uses git commands to check if there is a newer version that the provided @@ -804,7 +804,7 @@ class SourceUpdateManager(UpdateManager): sickbeard.CUR_COMMIT_HASH = self._newest_commit_hash sickbeard.CUR_COMMIT_BRANCH = self.branch - + except Exception, e: logger.log(u"Error while trying to update: " + ex(e), logger.ERROR) logger.log(u"Traceback: " + traceback.format_exc(), logger.DEBUG) diff --git a/sickbeard/webserve.py b/sickbeard/webserve.py index 0ffc62d264c8f844d9b994d22f5567a21bad247b..c5d6c11d8f8053d2f444ed246c92cdbedbfe6f51 100644 --- a/sickbeard/webserve.py +++ b/sickbeard/webserve.py @@ -1196,10 +1196,10 @@ class Home(WebRoot): ui.notifications.message('Already on branch: ', branch) return self.redirect('/' + sickbeard.DEFAULT_PAGE +'/') - def getDBcompare(self, branchDest=None): + def getDBcompare(self): checkversion = CheckVersion() - db_status = checkversion.getDBcompare(branchDest) + db_status = checkversion.getDBcompare() if db_status == 'upgrade': logger.log(u"Checkout branch has a new DB version - Upgrade", logger.DEBUG) @@ -3759,7 +3759,7 @@ class ConfigGeneral(Config): sickbeard.save_config() def saveGeneral(self, log_dir=None, log_nr = 5, log_size = 1048576, web_port=None, web_log=None, encryption_version=None, web_ipv6=None, - update_shows_on_start=None, update_shows_on_snatch=None, trash_remove_show=None, trash_rotate_logs=None, update_frequency=None, + trash_remove_show=None, trash_rotate_logs=None, update_frequency=None, indexerDefaultLang='en', ep_default_deleted_status=None, launch_browser=None, showupdate_hour=3, web_username=None, api_key=None, indexer_default=None, timezone_display=None, cpu_preset='NORMAL', web_password=None, version_notify=None, enable_https=None, https_cert=None, https_key=None, @@ -3784,8 +3784,7 @@ class ConfigGeneral(Config): # sickbeard.LOG_DIR is set in config.change_LOG_DIR() sickbeard.LOG_NR = log_nr sickbeard.LOG_SIZE = log_size - sickbeard.UPDATE_SHOWS_ON_START = config.checkbox_to_value(update_shows_on_start) - sickbeard.UPDATE_SHOWS_ON_SNATCH = config.checkbox_to_value(update_shows_on_snatch) + sickbeard.TRASH_REMOVE_SHOW = config.checkbox_to_value(trash_remove_show) sickbeard.TRASH_ROTATE_LOGS = config.checkbox_to_value(trash_rotate_logs) config.change_UPDATE_FREQUENCY(update_frequency)