Skip to content

Commit

Permalink
Config get_body_args (#8737)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
BKSteve and miigotu authored Apr 29, 2024
1 parent 7670191 commit c2edde3
Show file tree
Hide file tree
Showing 129 changed files with 1,389 additions and 1,795 deletions.
2 changes: 1 addition & 1 deletion SickChill.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down
7 changes: 3 additions & 4 deletions frontend/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion frontend/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion frontend/config/views.py
Original file line number Diff line number Diff line change
@@ -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")

Expand Down
2 changes: 1 addition & 1 deletion frontend/movies/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion frontend/shows/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion sickchill/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

maybe_daemonize()

from .show.indexers import indexer, ShowIndexer
from sickchill.show.indexers import indexer, ShowIndexer
8 changes: 4 additions & 4 deletions sickchill/adba/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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

Expand Down
10 changes: 5 additions & 5 deletions sickchill/adba/aniDBAbstracter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions sickchill/adba/aniDBcommands.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down
4 changes: 2 additions & 2 deletions sickchill/adba/aniDBfileInfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
10 changes: 5 additions & 5 deletions sickchill/adba/aniDBlink.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion sickchill/adba/aniDBmapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion sickchill/adba/aniDBresponses.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .aniDBmapper import AniDBMapper
from sickchill.adba.aniDBmapper import AniDBMapper


class ResponseResolver:
Expand Down
4 changes: 2 additions & 2 deletions sickchill/adba/aniDBtvDBmaper.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from pathlib import Path

from . import aniDBfileInfo as fileInfo
from sickchill.adba import aniDBfileInfo as fileInfo


class TvDBMap(object):
Expand All @@ -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

Expand Down
1 change: 1 addition & 0 deletions sickchill/gui/slick/js/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion sickchill/gui/slick/js/core.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit c2edde3

Please sign in to comment.