Commit bc7393aa authored by echel0n's avatar echel0n

Refactored more web handlers to be async

parent 8a9db44a
......@@ -29,7 +29,7 @@ from sickrage.libs.trakt.interfaces.base import authenticated
class AnnouncementsHandler(BaseHandler, ABC):
@authenticated
async def get(self, *args, **kwargs):
return self.render(
return await self.render(
'announcements.mako',
announcements=sickrage.app.announcements.get_all(),
title=_('Announcements'),
......
......@@ -175,8 +175,8 @@ class BaseHandler(RequestHandler, ABC):
url = urlparse(self.request.headers.get("referer", "/{}/".format(sickrage.app.config.default_page)))
return url._replace(scheme="", netloc="").geturl()
def _genericMessage(self, subject, message):
return self.render(
async def _genericMessage(self, subject, message):
return await self.render(
"/generic_message.mako",
message=message,
subject=subject,
......
......@@ -43,8 +43,8 @@ class ConfigHandler(BaseHandler, ABC):
]
@authenticated
def get(self, *args, **kwargs):
return self.render(
async def get(self, *args, **kwargs):
return await self.render(
"/config/index.mako",
submenu=self.menu,
title=_('Configuration'),
......
......@@ -30,8 +30,8 @@ from sickrage.core.webserver.handlers.base import BaseHandler
class ConfigAnimeHandler(BaseHandler, ABC):
@authenticated
def get(self, *args, **kwargs):
return self.render(
async def get(self, *args, **kwargs):
return await self.render(
"/config/anime.mako",
submenu=ConfigHandler.menu,
title=_('Config - Anime'),
......
......@@ -32,8 +32,8 @@ from sickrage.core.webserver.handlers.base import BaseHandler
class ConfigBackupRestoreHandler(BaseHandler, ABC):
@authenticated
def get(self, *args, **kwargs):
return self.render(
async def get(self, *args, **kwargs):
return await self.render(
"/config/backup_restore.mako",
submenu=ConfigHandler.menu,
title=_('Config - Backup/Restore'),
......
......@@ -34,8 +34,8 @@ from sickrage.core.webserver.handlers.base import BaseHandler
class ConfigGeneralHandler(BaseHandler, ABC):
@authenticated
def get(self, *args, **kwargs):
return self.render(
async def get(self, *args, **kwargs):
return await self.render(
"/config/general.mako",
title=_('Config - General'),
header=_('General Configuration'),
......
......@@ -30,8 +30,8 @@ from sickrage.core.webserver.handlers.base import BaseHandler
class ConfigNotificationsHandler(BaseHandler, ABC):
@authenticated
def get(self, *args, **kwargs):
return self.render(
async def get(self, *args, **kwargs):
return await self.render(
"/config/notifications.mako",
submenu=ConfigHandler.menu,
title=_('Config - Notifications'),
......
......@@ -82,8 +82,8 @@ def is_rar_supported():
class ConfigPostProcessingHandler(BaseHandler, ABC):
@authenticated
def get(self, *args, **kwargs):
return self.render(
async def get(self, *args, **kwargs):
return await self.render(
"/config/postprocessing.mako",
submenu=ConfigHandler.menu,
title=_('Config - Post Processing'),
......
......@@ -32,8 +32,8 @@ from sickrage.providers import NewznabProvider, TorrentRssProvider
class ConfigProvidersHandler(BaseHandler, ABC):
@authenticated
def get(self, *args, **kwargs):
return self.render(
async def get(self, *args, **kwargs):
return await self.render(
"/config/providers.mako",
submenu=ConfigHandler.menu,
title=_('Config - Search Providers'),
......
......@@ -30,8 +30,8 @@ from sickrage.core.webserver.handlers.base import BaseHandler
class ConfigQualitySettingsHandler(BaseHandler, ABC):
@authenticated
def get(self, *args, **kwargs):
return self.render(
async def get(self, *args, **kwargs):
return await self.render(
"/config/quality_settings.mako",
submenu=ConfigHandler.menu,
title=_('Config - Quality Settings'),
......
......@@ -32,8 +32,8 @@ from sickrage.core.webserver.handlers.base import BaseHandler
class ConfigSearchHandler(BaseHandler, ABC):
@authenticated
def get(self, *args, **kwargs):
return self.render(
async def get(self, *args, **kwargs):
return await self.render(
"/config/search.mako",
submenu=ConfigHandler.menu,
title=_('Config - Search Clients'),
......
......@@ -33,8 +33,8 @@ from sickrage.subtitles import Subtitles
class ConfigSubtitlesHandler(BaseHandler, ABC):
@authenticated
def get(self, *args, **kwargs):
return self.render(
async def get(self, *args, **kwargs):
return await self.render(
"/config/subtitles.mako",
submenu=ConfigHandler.menu,
title=_('Config - Subtitles Settings'),
......
......@@ -29,7 +29,7 @@ from sickrage.core.webserver.handlers.base import BaseHandler
class HistoryHandler(BaseHandler, ABC):
@authenticated
def get(self, *args, **kwargs):
async def get(self, *args, **kwargs):
limit = self.get_argument('limit', None)
if limit is None:
......@@ -90,7 +90,7 @@ class HistoryHandler(BaseHandler, ABC):
'class': 'trimhistory', 'confirm': True},
]
return self.render(
return await self.render(
"/history.mako",
historyResults=History().get(limit),
compactResults=compact,
......
......@@ -65,7 +65,7 @@ from sickrage.subtitles import Subtitles
class HomeHandler(BaseHandler, ABC):
@authenticated
def get(self, *args, **kwargs):
async def get(self, *args, **kwargs):
show_list = get_show_list()
if not len(show_list):
return self.redirect('/home/addShows/')
......@@ -75,7 +75,7 @@ class HomeHandler(BaseHandler, ABC):
'Anime': [x for x in show_list if x.anime is True]
})
return self.render(
return await self.render(
"/home/index.mako",
title="Home",
header="Show List",
......@@ -623,7 +623,7 @@ class GetPushbulletDevicesHandler(BaseHandler, ABC):
class ServerStatusHandler(BaseHandler, ABC):
@authenticated
def get(self, *args, **kwargs):
async def get(self, *args, **kwargs):
tvdir_free = get_disk_space_usage(sickrage.app.config.tv_download_dir)
root_dir = {}
if sickrage.app.config.root_dirs:
......@@ -636,7 +636,7 @@ class ServerStatusHandler(BaseHandler, ABC):
for subject in backend_dirs:
root_dir[subject] = get_disk_space_usage(subject)
return self.render(
return await self.render(
"/home/server_status.mako",
title=_('Server Status'),
header=_('Server Status'),
......@@ -650,8 +650,8 @@ class ServerStatusHandler(BaseHandler, ABC):
class ProviderStatusHandler(BaseHandler, ABC):
@authenticated
def get(self, *args, **kwargs):
return self.render(
async def get(self, *args, **kwargs):
return await self.render(
"/home/provider_status.mako",
title=_('Provider Status'),
header=_('Provider Status'),
......@@ -663,19 +663,19 @@ class ProviderStatusHandler(BaseHandler, ABC):
class ShutdownHandler(BaseHandler, ABC):
@authenticated
def get(self, *args, **kwargs):
async def get(self, *args, **kwargs):
pid = self.get_argument('pid')
if str(pid) != str(sickrage.app.pid):
return self.redirect("/{}/".format(sickrage.app.config.default_page))
self._genericMessage(_("Shutting down"), _("SiCKRAGE is shutting down"))
await self._genericMessage(_("Shutting down"), _("SiCKRAGE is shutting down"))
sickrage.app.shutdown()
class RestartHandler(BaseHandler, ABC):
@authenticated
def get(self, *args, **kwargs):
async def get(self, *args, **kwargs):
pid = self.get_argument('pid')
force = self.get_argument('force', None)
......@@ -687,7 +687,7 @@ class RestartHandler(BaseHandler, ABC):
sickrage.app.io_loop.add_timeout(datetime.timedelta(seconds=5), sickrage.app.shutdown, restart=True)
return self.render(
return await self.render(
"/home/restart.mako",
title="Home",
header="Restarting SiCKRAGE",
......@@ -777,7 +777,7 @@ class DisplayShowHandler(BaseHandler, ABC):
show_obj = find_show(int(show))
if not show_obj:
return self._genericMessage(_("Error"), _("Show not in show list"))
return await self._genericMessage(_("Error"), _("Show not in show list"))
episode_objects = sorted(show_obj.episodes, key=lambda x: (x.season, x.episode), reverse=True)
......@@ -947,7 +947,7 @@ class DisplayShowHandler(BaseHandler, ABC):
'name': show_obj.name,
})
return self.render(
return await self.render(
"/home/display_show.mako",
submenu=submenu,
showLoc=show_loc,
......@@ -981,14 +981,14 @@ class DisplayShowHandler(BaseHandler, ABC):
class TogglePauseHandler(BaseHandler, ABC):
@authenticated
def get(self, *args, **kwargs):
async def get(self, *args, **kwargs):
show = self.get_argument('show')
session = sickrage.app.main_db.session()
show_obj = find_show(int(show))
if show_obj is None:
return self._genericMessage(_("Error"), _("Unable to find the specified show"))
return await self._genericMessage(_("Error"), _("Unable to find the specified show"))
show_obj.paused = not show_obj.paused
show_obj.save()
......@@ -1008,7 +1008,7 @@ class DeleteShowHandler(BaseHandler, ABC):
show_obj = find_show(int(show))
if show_obj is None:
return self._genericMessage(_("Error"), _("Unable to find the specified show"))
return await self._genericMessage(_("Error"), _("Unable to find the specified show"))
try:
sickrage.app.show_queue.remove_show(show_obj.indexer_id, bool(full))
......@@ -1037,7 +1037,7 @@ class RefreshShowHandler(BaseHandler, ABC):
show_obj = find_show(int(show))
if show_obj is None:
return self._genericMessage(_("Error"), _("Unable to find the specified show"))
return await self._genericMessage(_("Error"), _("Unable to find the specified show"))
try:
sickrage.app.show_queue.refresh_show(show_obj.indexer_id, True)
......@@ -1058,7 +1058,7 @@ class UpdateShowHandler(BaseHandler, ABC):
show_obj = find_show(int(show))
if show_obj is None:
return self._genericMessage(_("Error"), _("Unable to find the specified show"))
return await self._genericMessage(_("Error"), _("Unable to find the specified show"))
# force the update
try:
......@@ -1080,7 +1080,7 @@ class SubtitleShowHandler(BaseHandler, ABC):
show_obj = find_show(int(show))
if show_obj is None:
return self._genericMessage(_("Error"), _("Unable to find the specified show"))
return await self._genericMessage(_("Error"), _("Unable to find the specified show"))
# search and download subtitles
sickrage.app.show_queue.download_subtitles(show_obj.indexer_id)
......@@ -1164,7 +1164,7 @@ class SyncTraktHandler(BaseHandler, ABC):
class DeleteEpisodeHandler(BaseHandler, ABC):
@authenticated
def get(self, *args, **kwargs):
async def get(self, *args, **kwargs):
show = self.get_argument('show')
eps = self.get_argument('eps')
direct = self.get_argument('direct', None)
......@@ -1177,7 +1177,7 @@ class DeleteEpisodeHandler(BaseHandler, ABC):
sickrage.app.alerts.error(_('Error'), err_msg)
return self.write(json_encode({'result': 'error'}))
else:
return self._genericMessage(_("Error"), err_msg)
return await self._genericMessage(_("Error"), err_msg)
if eps:
for curEp in eps.split('|'):
......@@ -1197,7 +1197,7 @@ class DeleteEpisodeHandler(BaseHandler, ABC):
tv_episode = show_obj.get_episode(season, episode)
tv_episode.delete_episode(full=True)
except EpisodeNotFoundException:
return self._genericMessage(_("Error"), _("Episode couldn't be retrieved"))
return await self._genericMessage(_("Error"), _("Episode couldn't be retrieved"))
except EpisodeDeletedException:
pass
......@@ -1209,16 +1209,16 @@ class DeleteEpisodeHandler(BaseHandler, ABC):
class TestRenameHandler(BaseHandler, ABC):
@authenticated
def get(self, *args, **kwargs):
async def get(self, *args, **kwargs):
show = self.get_argument('show')
show_object = find_show(int(show))
if show_object is None:
return self._genericMessage(_("Error"), _("Show not in show list"))
return await self._genericMessage(_("Error"), _("Show not in show list"))
if not os.path.isdir(show_object.location):
return self._genericMessage(_("Error"), _("Can't rename episodes when the show dir is missing."))
return await self._genericMessage(_("Error"), _("Can't rename episodes when the show dir is missing."))
episode_objects = []
......@@ -1239,7 +1239,7 @@ class TestRenameHandler(BaseHandler, ABC):
{'title': _('Edit'), 'path': '/manage/editShow?show=%d' % show_object.indexer_id,
'icon': 'fas fa-edit'}]
return self.render(
return await self.render(
"/home/test_renaming.mako",
submenu=submenu,
episode_objects=episode_objects,
......@@ -1253,17 +1253,17 @@ class TestRenameHandler(BaseHandler, ABC):
class DoRenameHandler(BaseHandler, ABC):
@authenticated
def get(self, *args, **kwargs):
async def get(self, *args, **kwargs):
show = self.get_argument('show')
eps = self.get_argument('eps')
tv_show = find_show(int(show))
if tv_show is None:
err_msg = _("Show not in show list")
return self._genericMessage(_("Error"), err_msg)
return await self._genericMessage(_("Error"), err_msg)
if not os.path.isdir(tv_show.location):
return self._genericMessage(_("Error"), _("Can't rename episodes when the show dir is missing."))
return await self._genericMessage(_("Error"), _("Can't rename episodes when the show dir is missing."))
if eps is None:
return self.redirect("/home/displayShow?show=" + show)
......
......@@ -59,8 +59,8 @@ def split_extra_show(extra_show):
class HomeAddShowsHandler(BaseHandler, ABC):
@authenticated
def get(self, *args, **kwargs):
return self.render(
async def get(self, *args, **kwargs):
return await self.render(
"/home/add_shows.mako",
title=_('Add Shows'),
header=_('Add Shows'),
......@@ -115,7 +115,7 @@ class SearchIndexersForShowNameHandler(BaseHandler, ABC):
class MassAddTableHandler(BaseHandler, ABC):
@authenticated
def get(self, *args, **kwargs):
async def get(self, *args, **kwargs):
root_dir = self.get_arguments('rootDir')
root_dirs = [unquote_plus(x) for x in root_dir]
......@@ -182,7 +182,7 @@ class MassAddTableHandler(BaseHandler, ABC):
except Exception:
pass
return self.render(
return await self.render(
"/home/mass_add_table.mako",
dirList=dir_list,
controller='home',
......@@ -192,7 +192,7 @@ class MassAddTableHandler(BaseHandler, ABC):
class NewShowHandler(BaseHandler, ABC):
@authenticated
def get(self, *args, **kwargs):
async def get(self, *args, **kwargs):
"""
Display the new show page which collects a tvdb id, folder, and extra options and
posts them to addNewShow
......@@ -219,7 +219,7 @@ class NewShowHandler(BaseHandler, ABC):
provided_indexer_name = show_name or ''
provided_indexer = int(indexer or sickrage.app.config.indexer_default)
return self.render(
return await self.render(
"/home/new_show.mako",
enable_anime_options=True,
use_provided_info=use_provided_info,
......@@ -244,7 +244,7 @@ class NewShowHandler(BaseHandler, ABC):
class TraktShowsHandler(BaseHandler, ABC):
@authenticated
def get(self, *args, **kwargs):
async def get(self, *args, **kwargs):
"""
Display the new show page which collects a tvdb id, folder, and extra options and
posts them to addNewShow
......@@ -260,16 +260,16 @@ class TraktShowsHandler(BaseHandler, ABC):
while len(trakt_shows) < int(limit):
trakt_shows += [x for x in shows if 'tvdb' in x.ids and not find_show(int(x.ids['tvdb']))]
return self.render("/home/trakt_shows.mako",
title="Trakt {} Shows".format(show_list.capitalize()),
header="Trakt {} Shows".format(show_list.capitalize()),
enable_anime_options=False,
black_list=black_list,
trakt_shows=trakt_shows[:int(limit)],
trakt_list=show_list,
limit=limit,
controller='home',
action="trakt_shows")
return await self.render("/home/trakt_shows.mako",
title="Trakt {} Shows".format(show_list.capitalize()),
header="Trakt {} Shows".format(show_list.capitalize()),
enable_anime_options=False,
black_list=black_list,
trakt_shows=trakt_shows[:int(limit)],
trakt_list=show_list,
limit=limit,
controller='home',
action="trakt_shows")
class PopularShowsHandler(BaseHandler, ABC):
......@@ -286,14 +286,14 @@ class PopularShowsHandler(BaseHandler, ABC):
popular_shows = None
imdb_exception = e
return self.render("/home/imdb_shows.mako",
title="IMDB Popular Shows",
header="IMDB Popular Shows",
popular_shows=popular_shows,
imdb_exception=imdb_exception,
topmenu="home",
controller='home',
action="popular_shows")
return await self.render("/home/imdb_shows.mako",
title="IMDB Popular Shows",
header="IMDB Popular Shows",
popular_shows=popular_shows,
imdb_exception=imdb_exception,
topmenu="home",
controller='home',
action="popular_shows")
class AddShowToBlacklistHandler(BaseHandler, ABC):
......@@ -308,18 +308,18 @@ class AddShowToBlacklistHandler(BaseHandler, ABC):
class ExistingShowsHandler(BaseHandler, ABC):
@authenticated
def get(self, *args, **kwargs):
async def get(self, *args, **kwargs):
"""
Prints out the page to add existing shows from a root dir
"""
return self.render("/home/add_existing_shows.mako",
enable_anime_options=False,
quality=sickrage.app.config.quality_default,
title=_('Existing Show'),
header=_('Existing Show'),
topmenu="home",
controller='home',
action="add_existing_shows")
return await self.render("/home/add_existing_shows.mako",
enable_anime_options=False,
quality=sickrage.app.config.quality_default,
title=_('Existing Show'),
header=_('Existing Show'),
topmenu="home",
controller='home',
action="add_existing_shows")
class AddShowByIDHandler(BaseHandler, ABC):
......
......@@ -29,8 +29,8 @@ from sickrage.core.webserver.handlers.base import BaseHandler
class HomePostProcessHandler(BaseHandler, ABC):
@authenticated
def get(self, *args, **kwargs):
return self.render(
async def get(self, *args, **kwargs):
return await self.render(
"/home/postprocess.mako",
title=_('Post Processing'),
header=_('Post Processing'),
......@@ -70,4 +70,4 @@ class HomeProcessEpisodeHandler(BaseHandler, ABC):
if quiet:
return self.write(result)
return self._genericMessage(_("Postprocessing results"), result.replace("\n", "<br>\n"))
return await self._genericMessage(_("Postprocessing results"), result.replace("\n", "<br>\n"))
......@@ -27,8 +27,8 @@ from sickrage.core.webserver.handlers.base import BaseHandler
class IRCHandler(BaseHandler, ABC):
@authenticated
def get(self, *args, **kwargs):
return self.render(
async def get(self, *args, **kwargs):
return await self.render(
"/irc.mako",
topmenu="system",
header="IRC",
......
......@@ -42,10 +42,10 @@ class LogsHandler(BaseHandler, ABC):
]
@authenticated
def get(self, *args, **kwargs):
async def get(self, *args, **kwargs):
level = self.get_argument('level', sickrage.app.log.ERROR)
return self.render(
return await self.render(
"/logs/errors.mako",
header="Logs &amp; Errors",
title="Logs &amp; Errors",
......@@ -89,7 +89,7 @@ class LogsClearAllHanlder(BaseHandler, ABC):
class LogsViewHandler(BaseHandler, ABC):
@authenticated
def get(self, *args, **kwargs):
async def get(self, *args, **kwargs):
min_level = self.get_argument('minLevel', None) or sickrage.app.log.INFO
log_filter = self.get_argument('logFilter', '')
log_search = self.get_argument('logSearch', '')
......@@ -140,7 +140,7 @@ class LogsViewHandler(BaseHandler, ABC):
except StopIteration:
pass
return self.render(
return await self.render(
"/logs/view.mako",
header="Log File",
title="Logs",
......
......@@ -352,7 +352,7 @@ class ShowEpisodeStatusesHandler(BaseHandler, ABC):
class EpisodeStatusesHandler(BaseHandler, ABC):
@authenticated
def get(self, *args, **kwargs):
async def get(self, *args, **kwargs):
which_status = self.get_argument('whichStatus', None)
ep_counts = {}
......@@ -379,7 +379,7 @@ class EpisodeStatusesHandler(BaseHandler, ABC):
if show.indexer_id not in sorted_show_ids:
sorted_show_ids.append(show.indexer_id)
return self.render(
return await self.render(
"/manage/episode_statuses.mako",
title="Episode Overview",
header="Episode Overview",
......@@ -479,7 +479,7 @@ class ShowSubtitleMissedHandler(BaseHandler, ABC):
class SubtitleMissedHandler(BaseHandler, ABC):
@authenticated
def get(self, *args, **kwargs):
async def get(self, *args, **kwargs):
which_subs = self.get_argument('whichSubs', None)
ep_counts = {}
......@@ -518,7 +518,7 @@ class SubtitleMissedHandler(BaseHandler, ABC):
if cur_indexer_id not in sorted_show_ids:
sorted_show_ids.append(cur_indexer_id)
return self.render(
return await self.render(
"/manage/subtitles_missed.mako",
whichSubs=which_subs,
show_names=show_names,
......@@ -574,7 +574,7 @@ class BacklogShowHandler(BaseHandler, ABC):
class BacklogOverviewHandler(BaseHandler, ABC):
@authenticated
def get(self, *args, **kwargs):
async def get(self, *args, **kwargs):
show_counts = {}
show_cats = {}
show_results = {}
......@@ -609,7 +609,7 @@ class BacklogOverviewHandler(BaseHandler, ABC):
show_counts[curShow.indexer_id] = ep_counts
show_cats[curShow.indexer_id] = ep_cats
return self.render(
return await self.render(
"/manage/backlog_overview.mako",
showCounts=show_counts,
showCats=show_cats,
......@@ -624,7 +624,7 @@ class BacklogOverviewHandler(BaseHandler, ABC):
class EditShowHandler(BaseHandler, ABC):
@authenticated
def get(self, *args, **kwargs):
async def get(self, *args, **kwargs):
show = self.get_argument('show')
groups = []
......@@ -646,7 +646,7 @@ class EditShowHandler(BaseHandler, ABC):
except AnidbAdbaConnectionException as e:
sickrage.app.log.debug('Unable to get ReleaseGroups: {}'.format(e))
return self.render(
return await self.render(
"/home/edit_show.mako",
show=show_obj,
quality=show_obj.quality,
......@@ -660,7 +660,7 @@ class EditShowHandler(BaseHandler, ABC):
action="edit_show"
)
else:
return self.render(
return await self.render(
"/home/edit_show.mako",
show=show_obj,
quality=show_obj.quality,
......@@ -713,7 +713,7 @@ class EditShowHandler(BaseHandler, ABC):
class MassEditHandler(BaseHandler, ABC):
@authenticated
def get(self, *args, **kwargs):
async def get(self, *args, **kwargs):
to_edit = self.get_argument('toEdit')
show_ids = list(map(int, to_edit.split("|")))
......@@ -837,7 +837,7 @@ class MassEditHandler(BaseHandler, ABC):
sports_value = last_sports if sports_all_same else None
air_by_date_value = last_air_by_date if air_by_date_all_same else None
return self.render(
return await self.render(
"/manage/mass_edit.mako",
showList=to_edit,
showNames=show_names,
......@@ -999,8 +999,8 @@ class MassEditHandler(BaseHandler, ABC):
class MassUpdateHandler(BaseHandler, ABC):
@authenticated
def get(self, *args, **kwargs):
return self.render(
async def get(self, *args, **kwargs):
return await self.render(
'/manage/mass_update.mako',
title=_('Mass Update'),
header=_('Mass Update'),
......@@ -1107,7 +1107,7 @@ class MassUpdateHandler(BaseHandler, ABC):
class FailedDownloadsHandler(BaseHandler, ABC):
@authenticated
def get(self, *args, **kwargs):
async def get(self, *args, **kwargs):
limit = self.get_argument('limit', None) or 100
session = sickrage.app.main_db.session()
......@@ -1116,7 +1116,7 @@ class FailedDownloadsHandler(BaseHandler, ABC):
if int(limit):
query = session.query(MainDB.FailedSnatch).limit(int(limit))
return self.render(
return await self.render(
"/manage/failed_downloads.mako",
limit=int(limit),
failedResults=query.all(),
......
......@@ -28,8 +28,8 @@ from sickrage.core.webserver.handlers.base import BaseHandler
class ManageQueuesHandler(BaseHandler, ABC):
@authenticated
def get(self, *args, **kwargs):
return self.render(
async def get(self, *args, **kwargs):
return await self.render(
"/manage/queues.mako",
backlogSearchPaused=sickrage.app.search_queue.is_backlog_searcher_paused(),