From c2edde32905e5505bf4ef5ef53054a2c87d69f11 Mon Sep 17 00:00:00 2001 From: BKSteve Date: Mon, 29 Apr 2024 21:10:52 +0700 Subject: [PATCH] Config get_body_args (#8737) * edit dir dirty fix * get args * making an Edit mass mess * e,d,k explicit * massUpdate sticky headers * massUpdate sticky headers * init super ?? * sort the exceptions list * sort the exceptions list note * kill off init * saveGeneral get_arg * saveGeneral get_arg * logging relocate * search page * postprocessing page * postprocessing page * subtitles page * notifications page * anime page * addshow arg * addshow arg * addshow arg * post processing arg * newShow arg * logging own tab * logging tab location * logging notify * schedule show custom name * comment fix * Fix some calls * deprication warning * poe format * pylint else timeout * pylint else elseif * rabbit logger * cleaning * validators * valid_url and validators to helper.common * Pylint relative import beyond top-level package * Rabbit identified items for clarity * absolute paths PEP 8 * Pylint Exception order * clean up * mako indents * Calendar tz calc display * calendar change revert * ruff cleanup * ruff setting * format * ruff builtin --------- Co-authored-by: miigotu --- SickChill.py | 2 +- frontend/app.py | 7 +- frontend/config/__init__.py | 2 +- frontend/config/views.py | 2 +- frontend/movies/__init__.py | 2 +- frontend/shows/__init__.py | 2 +- pyproject.toml | 4 + sickchill/__init__.py | 2 +- sickchill/adba/__init__.py | 8 +- sickchill/adba/aniDBAbstracter.py | 10 +- sickchill/adba/aniDBcommands.py | 4 +- sickchill/adba/aniDBfileInfo.py | 4 +- sickchill/adba/aniDBlink.py | 10 +- sickchill/adba/aniDBmapper.py | 2 +- sickchill/adba/aniDBresponses.py | 2 +- sickchill/adba/aniDBtvDBmaper.py | 4 +- sickchill/gui/slick/js/core.js | 1 + sickchill/gui/slick/js/core.min.js | 2 +- sickchill/gui/slick/views/config_general.mako | 203 +++--- .../gui/slick/views/config_providers.mako | 14 +- sickchill/gui/slick/views/home.mako | 6 +- .../gui/slick/views/inc_home_show_list.mako | 2 +- sickchill/gui/slick/views/layouts/main.mako | 2 +- .../slick/views/manage_backlogOverview.mako | 8 +- sickchill/gui/slick/views/schedule.mako | 183 +++-- sickchill/helper/__init__.py | 4 +- sickchill/helper/common.py | 23 +- sickchill/helper/media_info.py | 5 +- sickchill/helper/rootdirs.py | 2 +- sickchill/movies.py | 6 +- sickchill/oldbeard/blackandwhitelist.py | 6 +- sickchill/oldbeard/classes.py | 7 +- sickchill/oldbeard/clients/deluge.py | 3 +- sickchill/oldbeard/clients/deluged.py | 3 +- sickchill/oldbeard/clients/qbittorrent.py | 2 +- sickchill/oldbeard/common.py | 3 +- sickchill/oldbeard/config.py | 3 +- sickchill/oldbeard/dailysearcher.py | 3 +- sickchill/oldbeard/databases/main.py | 2 +- sickchill/oldbeard/databases/movie.py | 2 +- sickchill/oldbeard/event_queue.py | 2 +- sickchill/oldbeard/failedProcessor.py | 5 +- sickchill/oldbeard/generic_queue.py | 2 +- sickchill/oldbeard/helpers.py | 11 +- sickchill/oldbeard/image_cache.py | 13 +- sickchill/oldbeard/name_cache.py | 7 +- sickchill/oldbeard/naming.py | 7 +- sickchill/oldbeard/network_timezones.py | 5 +- sickchill/oldbeard/notifications_queue.py | 3 +- sickchill/oldbeard/notifiers/libnotify.py | 2 +- sickchill/oldbeard/nzbSplitter.py | 6 +- sickchill/oldbeard/nzbget.py | 5 +- sickchill/oldbeard/postProcessor.py | 9 +- sickchill/oldbeard/post_processing_queue.py | 5 +- sickchill/oldbeard/processTV.py | 8 +- sickchill/oldbeard/properFinder.py | 11 +- sickchill/oldbeard/providers/thepiratebay.py | 2 +- sickchill/oldbeard/sab.py | 3 +- sickchill/oldbeard/scdatetime.py | 3 +- sickchill/oldbeard/scene_exceptions.py | 17 +- sickchill/oldbeard/scene_numbering.py | 5 +- sickchill/oldbeard/scheduler.py | 2 +- sickchill/oldbeard/search.py | 4 +- sickchill/oldbeard/searchBacklog.py | 3 +- sickchill/oldbeard/search_queue.py | 2 +- sickchill/oldbeard/show_name_helpers.py | 13 +- sickchill/oldbeard/show_queue.py | 30 +- sickchill/oldbeard/subtitles.py | 5 +- sickchill/oldbeard/traktChecker.py | 5 +- sickchill/oldbeard/traktTrending.py | 3 +- sickchill/oldbeard/trakt_api/__init__.py | 4 +- sickchill/oldbeard/trakt_api/trakt.py | 3 +- sickchill/oldbeard/tvcache.py | 13 +- sickchill/providers/GenericProvider.py | 16 +- sickchill/providers/metadata/__init__.py | 2 +- sickchill/providers/metadata/generic.py | 3 +- sickchill/providers/metadata/kodi.py | 5 +- sickchill/providers/metadata/mede8er.py | 5 +- sickchill/providers/metadata/mediabrowser.py | 3 +- sickchill/providers/metadata/ps3.py | 2 +- sickchill/providers/metadata/tivo.py | 7 +- sickchill/providers/metadata/wdtv.py | 5 +- sickchill/providers/torrent/FrenchProvider.py | 6 +- sickchill/settings.py | 5 +- sickchill/show/ComingEpisodes.py | 9 +- sickchill/show/indexers/__init__.py | 2 +- sickchill/show/indexers/handler.py | 3 +- sickchill/show/indexers/tvdb.py | 5 +- sickchill/show/recommendations/imdb.py | 4 +- sickchill/start.py | 20 +- sickchill/tagger/episode.py | 8 +- sickchill/tv.py | 110 +-- sickchill/update_manager/__init__.py | 4 +- sickchill/update_manager/pip.py | 7 +- sickchill/update_manager/runner.py | 29 +- sickchill/views/__init__.py | 32 +- sickchill/views/api/__init__.py | 4 +- sickchill/views/api/webapi.py | 38 +- sickchill/views/authentication.py | 7 +- sickchill/views/browser.py | 7 +- sickchill/views/calendar.py | 5 +- sickchill/views/changelog.py | 10 +- sickchill/views/config/__init__.py | 20 +- sickchill/views/config/anime.py | 17 +- sickchill/views/config/backup.py | 3 +- sickchill/views/config/general.py | 199 ++--- sickchill/views/config/notifications.py | 682 ++++++------------ sickchill/views/config/post_processing.py | 129 ++-- sickchill/views/config/providers.py | 19 +- sickchill/views/config/search.py | 219 ++---- sickchill/views/config/shares.py | 3 +- sickchill/views/config/subtitles.py | 76 +- sickchill/views/history.py | 9 +- sickchill/views/home.py | 418 ++++++----- sickchill/views/imageSelector.py | 5 +- sickchill/views/index.py | 14 +- sickchill/views/logs.py | 11 +- sickchill/views/manage/__init__.py | 8 +- sickchill/views/manage/add_shows.py | 96 ++- sickchill/views/manage/index.py | 54 +- sickchill/views/manage/post_processing.py | 34 +- sickchill/views/manage/searches.py | 3 +- sickchill/views/movies.py | 5 +- sickchill/views/news.py | 7 +- sickchill/views/routes.py | 2 +- sickchill/views/server_settings.py | 3 +- tests/sickchill_tests/__init__.py | 2 +- tests/sickchill_tests/helper/test_common.py | 1 - tests/test_search.py | 2 +- 129 files changed, 1389 insertions(+), 1795 deletions(-) diff --git a/SickChill.py b/SickChill.py index 3b9b439b31..97efec47f7 100755 --- a/SickChill.py +++ b/SickChill.py @@ -430,7 +430,7 @@ def install_file(self, file: Path): updater = UpdateManager() if not updater.updater: - self.log(f"Unable to install files, the updater is disabled", 1) + self.log("Unable to install files, the updater is disabled", 1) return False self.log(f"Creating a backup of your database and config before installing {file.name}") diff --git a/frontend/app.py b/frontend/app.py index 0753dc7fbf..4f3557be68 100644 --- a/frontend/app.py +++ b/frontend/app.py @@ -6,10 +6,9 @@ from logging.config import dictConfig from flask import Flask - -from .config import blueprint as config_blueprint -from .movies import blueprint as movies_blueprint -from .shows import blueprint as shows_blueprint +from frontend.config import blueprint as config_blueprint +from frontend.movies import blueprint as movies_blueprint +from frontend.shows import blueprint as shows_blueprint class FlaskServer(threading.Thread): diff --git a/frontend/config/__init__.py b/frontend/config/__init__.py index 941cfbe505..70d63ade3e 100644 --- a/frontend/config/__init__.py +++ b/frontend/config/__init__.py @@ -2,4 +2,4 @@ This module implements the web interface for the SickChill configuration. It provides a blueprint for handling configuration-related requests. """ -from .views import blueprint +from frontend.config.views import blueprint diff --git a/frontend/config/views.py b/frontend/config/views.py index dbe8a42084..77ea374333 100644 --- a/frontend/config/views.py +++ b/frontend/config/views.py @@ -1,6 +1,6 @@ from flask import Blueprint, render_template -from sickchill import logger, settings +from sickchill import logger blueprint = Blueprint("config", __name__, template_folder="templates", static_folder="static", url_prefix="/config") diff --git a/frontend/movies/__init__.py b/frontend/movies/__init__.py index e67d19a01e..e0f65dfea0 100644 --- a/frontend/movies/__init__.py +++ b/frontend/movies/__init__.py @@ -2,4 +2,4 @@ This module implements the web interface for the sickchill movies media type """ -from .views import blueprint +from frontend.movies.views import blueprint diff --git a/frontend/shows/__init__.py b/frontend/shows/__init__.py index 7a9d890116..e0db81bb99 100644 --- a/frontend/shows/__init__.py +++ b/frontend/shows/__init__.py @@ -2,4 +2,4 @@ This module implements the web interface for the sickchill shows media type """ -from .views import blueprint +from frontend.shows.views import blueprint diff --git a/pyproject.toml b/pyproject.toml index a7a0b23f67..6b4ccc04c5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -177,6 +177,10 @@ target_version = ['py310'] include = '\.pyi?$' exclude = 'contrib/scmaintools|\.venv|venv|\.git|\.hg|\.mypy_cache|\.tox|_build|buck-out|build|dist|node_modules|bower_components' +[tool.ruff] +line-length = 160 +builtins = ["_"] + [tool.poe.tasks] pytest = "pytest" yarn = "yarn" diff --git a/sickchill/__init__.py b/sickchill/__init__.py index 767071561a..a8a8385760 100644 --- a/sickchill/__init__.py +++ b/sickchill/__init__.py @@ -2,4 +2,4 @@ maybe_daemonize() -from .show.indexers import indexer, ShowIndexer +from sickchill.show.indexers import indexer, ShowIndexer diff --git a/sickchill/adba/__init__.py b/sickchill/adba/__init__.py index 13b73427bf..c6dae95179 100644 --- a/sickchill/adba/__init__.py +++ b/sickchill/adba/__init__.py @@ -2,8 +2,8 @@ from time import localtime, sleep, strftime, time from types import FunctionType, MethodType -from .aniDBAbstracter import Anime, Episode -from .aniDBcommands import ( +from sickchill.adba.aniDBAbstracter import Anime, Episode +from sickchill.adba.aniDBcommands import ( AnimeCommand, AuthCommand, BuddyAcceptCommand, @@ -40,8 +40,8 @@ VersionCommand, VoteCommand, ) -from .aniDBerrors import AniDBBannedError, AniDBCommandTimeoutError, AniDBError, AniDBIncorrectParameterError, AniDBInternalError -from .aniDBlink import AniDBLink +from sickchill.adba.aniDBerrors import AniDBBannedError, AniDBCommandTimeoutError, AniDBError, AniDBIncorrectParameterError, AniDBInternalError +from sickchill.adba.aniDBlink import AniDBLink version = 100 diff --git a/sickchill/adba/aniDBAbstracter.py b/sickchill/adba/aniDBAbstracter.py index 3306274927..8af170faca 100644 --- a/sickchill/adba/aniDBAbstracter.py +++ b/sickchill/adba/aniDBAbstracter.py @@ -2,11 +2,11 @@ import string from pathlib import Path -from . import aniDBfileInfo as fileInfo -from .aniDBerrors import AniDBIncorrectParameterError -from .aniDBfileInfo import read_anidb_xml -from .aniDBmapper import AniDBMapper -from .aniDBtvDBmaper import TvDBMap +from sickchill.adba import aniDBfileInfo as fileInfo +from sickchill.adba.aniDBerrors import AniDBIncorrectParameterError +from sickchill.adba.aniDBfileInfo import read_anidb_xml +from sickchill.adba.aniDBmapper import AniDBMapper +from sickchill.adba.aniDBtvDBmaper import TvDBMap class AniDBabstractObject(object): diff --git a/sickchill/adba/aniDBcommands.py b/sickchill/adba/aniDBcommands.py index 26cd0bf14e..3647301c01 100644 --- a/sickchill/adba/aniDBcommands.py +++ b/sickchill/adba/aniDBcommands.py @@ -1,7 +1,7 @@ from threading import Lock -from .aniDBerrors import AniDBIncorrectParameterError, AniDBInternalError -from .aniDBresponses import MylistResponse, NoSuchFileResponse, NoSuchMylistEntryResponse, ProducerResponse +from sickchill.adba.aniDBerrors import AniDBIncorrectParameterError, AniDBInternalError +from sickchill.adba.aniDBresponses import MylistResponse, NoSuchFileResponse, NoSuchMylistEntryResponse, ProducerResponse class Command(object): diff --git a/sickchill/adba/aniDBfileInfo.py b/sickchill/adba/aniDBfileInfo.py index c841f9104a..05f1c07ca9 100644 --- a/sickchill/adba/aniDBfileInfo.py +++ b/sickchill/adba/aniDBfileInfo.py @@ -32,8 +32,8 @@ def md4_hash(data): hashes = [md4_hash(data).digest() for data in a] if len(hashes) == 1: return hashes[0].hex() - else: - return md4_hash(reduce(lambda b, c: b + c, hashes, b"")).hexdigest() + + return md4_hash(reduce(lambda b, c: b + c, hashes, b"")).hexdigest() def download_file(url, filename: Path): diff --git a/sickchill/adba/aniDBlink.py b/sickchill/adba/aniDBlink.py index e10615c360..4c09d5f33c 100644 --- a/sickchill/adba/aniDBlink.py +++ b/sickchill/adba/aniDBlink.py @@ -5,9 +5,9 @@ from time import sleep, time from typing import Any, Dict -from .aniDBcommands import Command -from .aniDBerrors import AniDBBannedError, AniDBError, AniDBMustAuthError, AniDBPacketCorruptedError -from .aniDBresponses import ResponseResolver +from sickchill.adba.aniDBcommands import Command +from sickchill.adba.aniDBerrors import AniDBBannedError, AniDBError, AniDBMustAuthError, AniDBPacketCorruptedError +from sickchill.adba.aniDBresponses import ResponseResolver class AniDBLink(threading.Thread): @@ -181,8 +181,8 @@ def _cmd_queue(self, command): def _cmd_dequeue(self, resp) -> Command: if not resp.restag: return None - else: - return self.cmd_queue.pop(resp.restag) + + return self.cmd_queue.pop(resp.restag) def _delay(self): return self.delay < 2.1 and 2.1 or self.delay diff --git a/sickchill/adba/aniDBmapper.py b/sickchill/adba/aniDBmapper.py index 75ebcb6f61..48d3790819 100644 --- a/sickchill/adba/aniDBmapper.py +++ b/sickchill/adba/aniDBmapper.py @@ -32,7 +32,7 @@ def _getBitChain(self, map, wanted): """Return an hex string with the correct bit set corresponding to the wanted fields in the map""" bit = 0 for index, field in enumerate(map): - if field in wanted and not field in self.blacklist: + if field in wanted and field not in self.blacklist: bit = bit ^ (1 << len(map) - index - 1) bit = str(hex(bit)).lstrip("0x").rstrip("L") diff --git a/sickchill/adba/aniDBresponses.py b/sickchill/adba/aniDBresponses.py index ee50fdec67..65a03d293c 100644 --- a/sickchill/adba/aniDBresponses.py +++ b/sickchill/adba/aniDBresponses.py @@ -1,4 +1,4 @@ -from .aniDBmapper import AniDBMapper +from sickchill.adba.aniDBmapper import AniDBMapper class ResponseResolver: diff --git a/sickchill/adba/aniDBtvDBmaper.py b/sickchill/adba/aniDBtvDBmaper.py index 3a8f5b8310..5d55f520ba 100644 --- a/sickchill/adba/aniDBtvDBmaper.py +++ b/sickchill/adba/aniDBtvDBmaper.py @@ -1,6 +1,6 @@ from pathlib import Path -from . import aniDBfileInfo as fileInfo +from sickchill.adba import aniDBfileInfo as fileInfo class TvDBMap(object): @@ -20,7 +20,7 @@ def _get_x_for_y(self, xValue, x, y): try: if anime.get(x, False) == xValue: return int(anime.get(y, 0)) - except ValueError as error: + except ValueError: continue return 0 diff --git a/sickchill/gui/slick/js/core.js b/sickchill/gui/slick/js/core.js index 1991909e4e..26b0302b78 100644 --- a/sickchill/gui/slick/js/core.js +++ b/sickchill/gui/slick/js/core.js @@ -3391,6 +3391,7 @@ const SICKCHILL = { columnSelector_columns: { // eslint-disable-line camelcase 12: false, }, + stickyHeaders_offset: 50, // eslint-disable-line camelcase filter_cssFilter: 'text-center text-capitalize', // eslint-disable-line camelcase filter_hideFilters: false, // eslint-disable-line camelcase filter_ignoreCase: true, // eslint-disable-line camelcase diff --git a/sickchill/gui/slick/js/core.min.js b/sickchill/gui/slick/js/core.min.js index c72af01d47..2a80688f94 100644 --- a/sickchill/gui/slick/js/core.min.js +++ b/sickchill/gui/slick/js/core.min.js @@ -1 +1 @@ -function getMeta(e){return $('meta[data-var="'+e+'"]').data("content")}const scRoot=getMeta("scRoot"),scDefaultPage=getMeta("scDefaultPage"),themeSpinner=getMeta("themeSpinner"),anonURL=getMeta("anonURL"),topImageHtml='Jump to top',loading='loading';let scPID=getMeta("scPID");function configSuccess(e=!0){$(".config_submitter").each(function(){$(this).removeAttr("disabled"),$(this).next().remove(),$(this).show(),!0===e&&window.location.reload()}),$(".config_submitter_refresh").each(function(){$(this).removeAttr("disabled"),$(this).next().remove(),$(this).show()}),$("#email_show").trigger("notify"),$("#prowl_show").trigger("notify")}function metaToBool(e){let t=$('meta[data-var="'+e+'"]').data("content");return void 0===t?(console.log(e+' is empty, did you forget to add this to "main.mako"?'),t):!("false"===(t=(t=Number.isNaN(t)?t.toLowerCase():t.toString()).toLowerCase())||"none"===t||"0"===t)}function isMeta(e,t){return new RegExp(1{var t=$("#site-messages");if(void 0!==t){t.empty();for(const o in e)Object.hasOwn(e,o)&&t.append('')}}),$("#site-messages").on("click",".site-message-dismiss",function(){var e=$(this).data("id");$("#site-message-"+e).hide(),$.post(scRoot+"/ui/dismiss-site-message",{index:e})})}function shiftReturn(e){return e.length<=1?[]:(e.shift(),e)}const __=_,SICKCHILL=(window._=function(e){return e},{common:{init(){for(const e of document.querySelectorAll("img"))e.dataset.src&&e.setAttribute("src",e.dataset.src);metaToBool("settings.SICKCHILL_BACKGROUND")&&($.backstretch(scRoot+"/ui/sickchill_background"),$(".backstretch").css("opacity",getMeta("settings.FANART_BACKGROUND_OPACITY")).fadeIn("500")),addSiteMessage(),$.confirm.options={confirmButton:"Yes",cancelButton:"Cancel",dialogClass:"modal-dialog",post:!1,confirm(e){location.href=e.context.href}},$("a.shutdown").confirm({title:"Shutdown",text:"Are you sure you want to shut down SickChill?"}),$("a.restart").confirm({title:"Restart",text:"Are you sure you want to restart SickChill?"}),$("a.removeshow").confirm({title:"Remove Show",text:'Are you sure you want to remove '+$("#showtitle").data("showname")+' from the database?

 ',confirm(e){location.href=e.context.href+($("#deleteFiles")[0].checked?"&full=1":"&full=0")}}),$("a.clearhistory").confirm({title:"Clear History",text:"Are you sure you want to clear all download history?"}),$("a.trimhistory").confirm({title:"Trim History",text:"Are you sure you want to trim all download history older than 30 days?"}),$("a.submiterrors").confirm({title:"Submit Errors",text:'Are you sure you want to submit these errors ?

Make sure SickChill is updated and trigger
this error with debug enabled before submitting
'}),$("#config-components").tabs({activate(e,t){var o=$(this).data("lastOpenedPanel");o||=$(t.oldPanel),$(this).data("topPositionTab")||$(this).data("topPositionTab",$(t.newPanel).position().top),$(t.newPanel).hide().fadeIn(0),o&&o.toggleClass("ui-tabs-hide").css("position","absolute").css("top",$(this).data("topPositionTab")+"px").fadeOut(0,function(){$(this).css("position","")}),$(this).data("lastOpenedPanel",$(t.newPanel))}}),(navigator.maxTouchPoints||0)<2&&$(".dropdown-toggle").on("click",function(){var e=$(this);"true"===e.prop("ariaExpanded")&&(window.location.href=e.prop("href"))}),metaToBool("settings.FUZZY_DATING")&&($.timeago.settings.allowFuture=!0,$.timeago.settings.strings={prefixAgo:null,prefixFromNow:"In ",suffixAgo:"ago",suffixFromNow:"",seconds:"less than a minute",minute:"about a minute",minutes:"%d minutes",hour:"an hour",hours:"%d hours",day:"a day",days:"%d days",month:"a month",months:"%d months",year:"a year",years:"%d years",wordSeparator:" ",numbers:[]},$("[datetime]").timeago()),$(document.body).on("click","a[data-no-redirect]",e=>(e.preventDefault(),$.get($(e.currentTarget).prop("href")),!1)),$(document.body).on("change",".bulkCheck",e=>{const t=e.currentTarget;e="."+t.id+":visible";$(e).each(function(){this.checked=t.checked})}),$(".enabler").on("change",function(){this.checked?$("#content_"+$(this).attr("id")).fadeIn("fast","linear"):$("#content_"+$(this).attr("id")).fadeOut("fast","linear")})},QualityChooser:{setFromPresets(t){0===Number.parseInt(t,10)?$("#customQuality").show():($("#customQuality").hide(),$("#anyQualities").find("option").each(function(){var e=t&$(this).val();$(this).attr("selected",0{this.setFromPresets(e.find(":selected").val())}),this.setFromPresets(e.find(":selected").val())}},updateBlackWhiteList(e){$("#pool").children().remove(),$("#anime").is(":checked")?($("#blackwhitelist").show(),e&&$.getJSON(scRoot+"/home/fetch_releasegroups",{show_name:e},e=>{"success"===e.result&&$.each(e.groups,(e,t)=>{var o=$(""):$("#pushbullet_device_list").append('"));$("#pushbullet_device_list").prepend('"),t&&$("#testPushbullet-result").html(t)}),$("#pushbullet_device_list").on("change",()=>{$("#pushbullet_device").val($("#pushbullet_device_list").val()),$("#testPushbullet-result").html(_("Don't forget to save your new pushbullet settings."))}),$.post(scRoot+"/home/getPushbulletChannels",{api:o.api},e=>{if(o.channels=$.parseJSON(e).channels,o.currentChannel=$("#pushbullet_channel").val(),$("#pushbullet_channel_list").html(""),0'+o.channels[e].name+""):$("#pushbullet_channel_list").append('");$("#pushbullet_channel_list").prepend('"),$("#pushbullet_channel_list").prop("disabled",!1)}else $("#pushbullet_channel_list").prepend(''),$("#pushbullet_channel_list").prop("disabled",!0);t&&$("#testPushbullet-result").html(t),$("#pushbullet_channel_list").on("change",()=>{$("#pushbullet_channel").val($("#pushbullet_channel_list").val()),$("#testPushbullet-result").html(_("Don't forget to save your new pushbullet settings."))})})):($("#testPushbullet-result").html(_("You didn't supply a Pushbullet api key")),$("#pushbullet_api").focus())}function t(){$.getJSON(scRoot+"/home/loadShowNotifyLists",t=>{if(0!==t._size){var o=[];for(const a in t)Object.hasOwn(t,a)&&"_"!==a.charAt(0)&&o.push(t[a]);var s=o.sort((e,t)=>e.namet.name?1:0);let e='';for(const i in s)Object.hasOwn(s,i)&&s[i].id&&s[i].name&&(e+='