diff --git a/CHANGES.md b/CHANGES.md index 131209a5..371227de 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -43,7 +43,7 @@ * Change to not display IMDb info on UI when "Enable IMDb info" is disabled * Change genre tags on displayShow page to link to IMDb instead of Trakt * Change to reduce the time taken to "Update shows" with show data -* Change to stop updating the IMDb info during the scheduled daily update for every show +* Change to stop updating the IMDb info on edit, mass edit and during the scheduled daily update for every show * Change to update the IMDb info for a show after snatching an episode for it * Fix updating of scene exception name cache after adding exceptions on Editshow page @@ -55,6 +55,7 @@ * Fix being able to actually turn IMDb off when it has been turned on * Remove IMDb option from General Settings * Change IMDb option to enable by default now the slow operation has been eliminated from process flows +* Add IMDb update capability back to the "Force Full Update" button on the displayShow page * Fix to correctly use wanted_begin and wanted_latest when adding shows ### 0.7.2 (2015-03-10 17:05:00 UTC) diff --git a/sickbeard/show_queue.py b/sickbeard/show_queue.py index 24e40256..ed44e65d 100644 --- a/sickbeard/show_queue.py +++ b/sickbeard/show_queue.py @@ -75,7 +75,7 @@ class ShowQueue(generic_queue.GenericQueue): loadingShowList = property(_getLoadingShowList) - def updateShow(self, show, force=False): + def updateShow(self, show, force=False, web=False): if self.isBeingAdded(show): raise exceptions.CantUpdateException( @@ -91,6 +91,8 @@ class ShowQueue(generic_queue.GenericQueue): if not force: queueItemObj = QueueItemUpdate(show) + elif web: + queueItemObj = QueueItemForceUpdateWeb(show) else: queueItemObj = QueueItemForceUpdate(show) @@ -538,6 +540,7 @@ class QueueItemUpdate(ShowQueueItem): def __init__(self, show=None): ShowQueueItem.__init__(self, ShowQueueActions.UPDATE, show) self.force = False + self.force_web = False def run(self): @@ -557,6 +560,9 @@ class QueueItemUpdate(ShowQueueItem): self.show.indexer).name + " was incomplete, aborting: " + ex(e), logger.ERROR) return + if self.force_web: + self.show.load_imdb_info() + try: self.show.saveToDB() except Exception, e: @@ -606,3 +612,10 @@ class QueueItemForceUpdate(QueueItemUpdate): def __init__(self, show=None): ShowQueueItem.__init__(self, ShowQueueActions.FORCEUPDATE, show) self.force = True + + +class QueueItemForceUpdateWeb(QueueItemUpdate): + def __init__(self, show=None): + ShowQueueItem.__init__(self, ShowQueueActions.FORCEUPDATE, show) + self.force = True + self.force_web = True \ No newline at end of file diff --git a/sickbeard/webserve.py b/sickbeard/webserve.py index 1e42f767..ba047072 100644 --- a/sickbeard/webserve.py +++ b/sickbeard/webserve.py @@ -1042,7 +1042,7 @@ class Home(MainHandler): {'title': 'Remove', 'path': 'home/deleteShow?show=%d' % showObj.indexerid, 'confirm': True}) t.submenu.append({'title': 'Re-scan files', 'path': 'home/refreshShow?show=%d' % showObj.indexerid}) t.submenu.append( - {'title': 'Force Full Update', 'path': 'home/updateShow?show=%d&force=1' % showObj.indexerid}) + {'title': 'Force Full Update', 'path': 'home/updateShow?show=%d&force=1&web=1' % showObj.indexerid}) t.submenu.append({'title': 'Update show in XBMC', 'path': 'home/updateXBMC?showName=%s' % urllib.quote_plus( showObj.name.encode('utf-8')), 'requires': self.haveXBMC}) @@ -1375,7 +1375,7 @@ class Home(MainHandler): self.redirect('/home/displayShow?show=' + str(showObj.indexerid)) - def updateShow(self, show=None, force=0): + def updateShow(self, show=None, force=0, web=0): if show is None: return self._genericMessage('Error', 'Invalid show ID') @@ -1387,7 +1387,7 @@ class Home(MainHandler): # force the update try: - sickbeard.showQueueScheduler.action.updateShow(showObj, bool(force)) # @UndefinedVariable + sickbeard.showQueueScheduler.action.updateShow(showObj, bool(force), bool(web)) except exceptions.CantUpdateException, e: ui.notifications.error('Unable to update this show.', ex(e))