Skip to content

Commit

Permalink
Fix routes after rename of deleteShow to delete_show
Browse files Browse the repository at this point in the history
* Fixed bug where location is called as an attribute, but the attribute itself is verifying the location. Which does not work, if the file/location has been deleted from disk.
  • Loading branch information
p0psicles committed Jul 15, 2016
1 parent 32f27a7 commit 2db6c34
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions sickbeard/server/web/home/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ def displayShow(self, show=None):
})
submenu.append({
'title': 'Remove',
'path': 'home/delete_show?show={show}'.format(show=show_obj.indexerid),
'path': 'home/deleteShow?show={show}'.format(show=show_obj.indexerid),
'class': 'removeshow',
'confirm': True,
'icon': 'ui-icon ui-icon-trash',
Expand Down Expand Up @@ -1085,7 +1085,7 @@ def snatchSelection(self, show=None, season=None, episode=None, manual_search_ty
})
submenu.append({
'title': 'Remove',
'path': 'home/delete_show?show={show}'.format(show=show_obj.indexerid),
'path': 'home/deleteShow?show={show}'.format(show=show_obj.indexerid),
'class': 'removeshow',
'confirm': True,
'icon': 'ui-icon ui-icon-trash',
Expand Down
4 changes: 2 additions & 2 deletions sickbeard/tv.py
Original file line number Diff line number Diff line change
Expand Up @@ -1205,10 +1205,10 @@ def delete_show(self, full=False):
else:
ek(shutil.rmtree, self.location)

logger.log(u'%s show folder %s' % (('Deleted', 'Trashed')[sickbeard.TRASH_REMOVE_SHOW], self.location))
logger.log(u'%s show folder %s' % (('Deleted', 'Trashed')[sickbeard.TRASH_REMOVE_SHOW], self.raw_location))

except ShowDirectoryNotFoundException:
logger.log(u'Show folder does not exist, no need to %s %s' % (action, self.location), logger.WARNING)
logger.log(u'Show folder does not exist, no need to %s %s' % (action, self.raw_location), logger.WARNING)
except OSError as e:
logger.log(u'Unable to %s %s: %s / %s' % (action, self.location, repr(e), str(e)), logger.WARNING)

Expand Down

0 comments on commit 2db6c34

Please sign in to comment.