mirror of
https://github.com/markbeep/AudioBookRequest.git
synced 2026-01-07 06:00:04 -06:00
remove unnecessary quote_plus calls
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
from typing import Any, Mapping, overload
|
||||
from urllib.parse import quote_plus
|
||||
|
||||
from fastapi import Request, Response
|
||||
from jinja2_fragments.fastapi import Jinja2Blocks
|
||||
@@ -9,7 +8,6 @@ from app.internal.auth.authentication import DetailedUser
|
||||
from app.internal.env_settings import Settings
|
||||
|
||||
templates = Jinja2Blocks(directory="templates")
|
||||
templates.env.filters["quote_plus"] = lambda u: quote_plus(u) # pyright: ignore[reportUnknownLambdaType,reportUnknownMemberType,reportUnknownArgumentType]
|
||||
templates.env.filters["zfill"] = lambda val, num: str(val).zfill(num) # pyright: ignore[reportUnknownLambdaType,reportUnknownMemberType,reportUnknownArgumentType]
|
||||
templates.env.globals["vars"] = vars # pyright: ignore[reportUnknownMemberType]
|
||||
templates.env.globals["getattr"] = getattr # pyright: ignore[reportUnknownMemberType]
|
||||
|
||||
@@ -329,7 +329,7 @@
|
||||
title="Delete flag"
|
||||
type="button"
|
||||
class="btn btn-square delete-button"
|
||||
hx-delete="/settings/download/indexer-flag/{{ flag.flag|quote_plus }}"
|
||||
hx-delete="/settings/download/indexer-flag/{{ flag.flag }}"
|
||||
hx-disabled-elt=".delete-button"
|
||||
hx-target="#flags-form"
|
||||
>
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
name="group"
|
||||
class="select w-full"
|
||||
required {% if u.root %}disabled{% endif %}
|
||||
hx-patch="/settings/user/{{ u.username|quote_plus }}"
|
||||
hx-patch="/settings/user/{{ u.username }}"
|
||||
hx-trigger="change"
|
||||
hx-disabled-elt="this"
|
||||
hx-target="#user-list"
|
||||
@@ -122,7 +122,7 @@
|
||||
<button class="btn">Cancel</button>
|
||||
<button
|
||||
class="btn bg-primary"
|
||||
hx-delete="/settings/user/{{ u.username|quote_plus }}"
|
||||
hx-delete="/settings/user/{{ u.username }}"
|
||||
hx-disabled-elt="this"
|
||||
hx-target="#user-list"
|
||||
hx-swap="outerHTML"
|
||||
|
||||
@@ -3,11 +3,7 @@
|
||||
{% endblock %} {% block body %}
|
||||
|
||||
<div class="w-screen p-2 md:p-4 lg:p-8 flex flex-col gap-2">
|
||||
<a
|
||||
preload
|
||||
href="/wishlist#{{ book.asin|quote_plus }}"
|
||||
class="w-fit btn btn-ghost"
|
||||
>
|
||||
<a preload href="/wishlist#{{ book.asin }}" class="w-fit btn btn-ghost">
|
||||
< Back to wishlist
|
||||
</a>
|
||||
<h1 class="text-3xl font-bold">Sources for {{ book.title }}</h1>
|
||||
@@ -75,7 +71,7 @@
|
||||
type="checkbox"
|
||||
hx-trigger="click"
|
||||
hx-target="this"
|
||||
hx-post="/wishlist/sources/{{ book.asin|quote_plus }}"
|
||||
hx-post="/wishlist/sources/{{ book.asin }}"
|
||||
hx-include="#form-{{ loop.index }}"
|
||||
hx-on::after-request="if (event.detail.successful) this.disabled = true"
|
||||
/>
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
<div class="flex flex-col">
|
||||
<a
|
||||
preload
|
||||
href="/search?q={{ (book.title+' ' +(book.authors|join(',')))|quote_plus }}"
|
||||
href="/search?q={{ book.title+' ' +(book.authors|join(',')) }}"
|
||||
class="font-bold text-primary line-clamp-4"
|
||||
title="{{ book.title }}"
|
||||
>{{ book.title }}</a
|
||||
@@ -88,7 +88,7 @@
|
||||
<a
|
||||
preload
|
||||
title="Torrent Sources"
|
||||
href="/wishlist/sources/{{ book.asin|quote_plus }}"
|
||||
href="/wishlist/sources/{{ book.asin }}"
|
||||
{% if not user.is_admin() %}disabled{% endif %}
|
||||
class="btn btn-square"
|
||||
>{% include 'icons/list.html' %}</a
|
||||
@@ -112,7 +112,7 @@
|
||||
class="btn btn-square"
|
||||
{% endif %}
|
||||
{% if not user.can_download() or book.downloaded %}disabled{% endif %}
|
||||
hx-post="/wishlist/auto-download/{{ book.asin|quote_plus }}"
|
||||
hx-post="/wishlist/auto-download/{{ book.asin }}"
|
||||
hx-swap="outerHTML"
|
||||
hx-target="#book-table-body"
|
||||
hx-disabled-elt="this"
|
||||
|
||||
Reference in New Issue
Block a user