Compare commits
117 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e4362468f7 | |||
| 6880f60d14 | |||
|
|
5d4aa7e2a3 | ||
|
|
2845196bc7 | ||
|
|
983915f8aa | ||
| ce2fb13ef2 | |||
| 99069fe5f7 | |||
| 761f26b387 | |||
| eec72bb6e2 | |||
| ceb92d066c | |||
|
|
cf74948840 | ||
|
|
1c62084c7b | ||
| 3c21253562 | |||
| b243c1c958 | |||
|
|
7be5bc7b1f | ||
|
|
65960fb560 | ||
|
|
1141903512 | ||
| ff93bd552f | |||
|
|
016d8557e6 | ||
| 5e9f92a06f | |||
| cc6a562e9e | |||
|
|
67b01f9e0b | ||
|
|
2f2eca2bff | ||
|
|
5073113568 | ||
|
|
430bfabfb4 | ||
| 160a2721f9 | |||
|
|
6f0187bccc | ||
|
|
801c89df5d | ||
|
|
49fdaeb42a | ||
| fc07c08c58 | |||
| f9e829dce6 | |||
| 17fb608f45 | |||
| 9d3861ab39 | |||
| d9cb018132 | |||
|
|
ac077ea1e1 | ||
| f29d719df0 | |||
|
|
6adfa71fde | ||
| 0946d374e3 | |||
|
|
f68c29f838 | ||
|
|
c46e39e736 | ||
|
|
2885d6b5d8 | ||
|
|
ab7932ae92 | ||
| 6c9118f67e | |||
| 34c78c7e2d | |||
|
|
01c6edef74 | ||
| 4a87ea559a | |||
|
|
846fb294d0 | ||
|
|
baa25afa27 | ||
|
|
b0dac0adda | ||
|
|
8c0e7b3cb8 | ||
| 38da65a848 | |||
|
|
64fbdbbbdf | ||
|
|
a00059ca88 | ||
|
|
7abccaec71 | ||
|
|
f075d3d531 | ||
|
|
190d891578 | ||
| 645cc6f9a1 | |||
|
|
01cf9ef56d | ||
|
|
504d9dcb55 | ||
| 1845f3e491 | |||
|
|
a2793f9541 | ||
| ef0d7ba5f8 | |||
| f36ec7e6d3 | |||
| 0f260100f2 | |||
| 4f4ea1a599 | |||
| 03ee338f15 | |||
|
|
fb2642de2c | ||
| ffc7f29688 | |||
| 2c30bff45d | |||
| dc7a0ae6b7 | |||
| d3cf53c609 | |||
|
|
0555277c50 | ||
|
|
aa4b168c44 | ||
|
|
650f1cad92 | ||
|
|
8eebd424c8 | ||
|
|
a1a3aaca18 | ||
|
|
d779830df6 | ||
| 4375cd3ebc | |||
| b0c7c13e5e | |||
|
|
bb4db5d342 | ||
|
|
64df0e0b32 | ||
|
|
72c9634832 | ||
| a4cfc53581 | |||
| d4feefd639 | |||
| 434efc79d8 | |||
| 54771b2d78 | |||
| fceb36c723 | |||
| c4075fb640 | |||
|
|
aa8191b0cd | ||
| a6626973ac | |||
| 79f1473c6a | |||
|
|
b76f2b72be | ||
| 8f2d9eaf6e | |||
|
|
c51f320a6f | ||
| 8b26bf513f | |||
| 25210ccc22 | |||
| 3205711bb1 | |||
| 92e3fd994e | |||
| 01e9da61eb | |||
|
|
fd5e62e23b | ||
| a64798644a | |||
|
|
b7511eb064 | ||
|
|
16f8f74f9b | ||
| 61891839d9 | |||
|
|
17cd2d54d0 | ||
| 9b61436a05 | |||
| 31e3cfab24 | |||
| ed437ec367 | |||
|
|
92aabc0086 | ||
| 38a0cedc9c | |||
| c0c2fcb009 | |||
| 3edebbdb6c | |||
|
|
98f0ea3bd2 | ||
| 0daf36719b | |||
| 38683bfe85 | |||
| 4066a6d5e3 | |||
| ee18929196 |
1
.deploystack/docker-run.txt
Normal file
1
.deploystack/docker-run.txt
Normal file
@@ -0,0 +1 @@
|
||||
docker run -d -p 3033:3033 -v /downloads:/downloads marcobaobao/yt-dlp-webui
|
||||
27
.devcontainer/devcontainer.json
Normal file
27
.devcontainer/devcontainer.json
Normal file
@@ -0,0 +1,27 @@
|
||||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
|
||||
// README at: https://github.com/devcontainers/templates/tree/main/src/go
|
||||
{
|
||||
"name": "Go",
|
||||
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
|
||||
"image": "mcr.microsoft.com/devcontainers/go:1-1.23-bookworm",
|
||||
"features": {
|
||||
"ghcr.io/devcontainers-extra/features/pnpm:2": {},
|
||||
"ghcr.io/devcontainers-extra/features/ffmpeg-apt-get:1": {},
|
||||
"ghcr.io/devcontainers-extra/features/yt-dlp:2": {}
|
||||
}
|
||||
|
||||
// Features to add to the dev container. More info: https://containers.dev/features.
|
||||
// "features": {},
|
||||
|
||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||
// "forwardPorts": [],
|
||||
|
||||
// Use 'postCreateCommand' to run commands after the container is created.
|
||||
// "postCreateCommand": "go version"
|
||||
|
||||
// Configure tool-specific properties.
|
||||
// "customizations": {},
|
||||
|
||||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
|
||||
// "remoteUser": "root"
|
||||
}
|
||||
31
.dockerignore
Normal file
31
.dockerignore
Normal file
@@ -0,0 +1,31 @@
|
||||
.pre-commit-config.yaml
|
||||
.direnv/
|
||||
result/
|
||||
result
|
||||
dist
|
||||
.pnpm-store/
|
||||
.pnpm-debug.log
|
||||
node_modules
|
||||
.env
|
||||
*.mp4
|
||||
*.ytdl
|
||||
*.part
|
||||
*.db
|
||||
downloads
|
||||
.DS_Store
|
||||
build/
|
||||
yt-dlp-webui
|
||||
session.dat
|
||||
config.yml
|
||||
cookies.txt
|
||||
__debug*
|
||||
ui/
|
||||
.idea
|
||||
.idea/
|
||||
frontend/.pnp.cjs
|
||||
frontend/.pnp.loader.mjs
|
||||
frontend/.yarn/install-state.gz
|
||||
.db.lock
|
||||
livestreams.dat
|
||||
.vite/deps
|
||||
archive.txt
|
||||
2
.gitattributes
vendored
Normal file
2
.gitattributes
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
*.tsx linguist-detectable=false
|
||||
*.html linguist-detectable=false
|
||||
2
.github/FUNDING.yml
vendored
2
.github/FUNDING.yml
vendored
@@ -10,4 +10,4 @@ liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
||||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
||||
custom: ['https://paypal.me/marcofw']
|
||||
|
||||
10
.gitignore
vendored
10
.gitignore
vendored
@@ -1,4 +1,9 @@
|
||||
.pre-commit-config.yaml
|
||||
.direnv/
|
||||
result/
|
||||
result
|
||||
dist
|
||||
.pnpm-store/
|
||||
.pnpm-debug.log
|
||||
node_modules
|
||||
.env
|
||||
@@ -16,6 +21,11 @@ cookies.txt
|
||||
__debug*
|
||||
ui/
|
||||
.idea
|
||||
.idea/
|
||||
frontend/.pnp.cjs
|
||||
frontend/.pnp.loader.mjs
|
||||
frontend/.yarn/install-state.gz
|
||||
.db.lock
|
||||
livestreams.dat
|
||||
.vite/deps
|
||||
archive.txt
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# Node (pnpm) ------------------------------------------------------------------
|
||||
FROM node:20-slim AS ui
|
||||
FROM node:22-slim AS ui
|
||||
ENV PNPM_HOME="/pnpm"
|
||||
ENV PATH="$PNPM_HOME:$PATH"
|
||||
RUN corepack enable
|
||||
RUN corepack prepare pnpm@10.0.0 --activate && corepack enable
|
||||
COPY . /usr/src/yt-dlp-webui
|
||||
|
||||
WORKDIR /usr/src/yt-dlp-webui/frontend
|
||||
@@ -28,7 +28,7 @@ RUN CGO_ENABLED=0 GOOS=linux go build -o yt-dlp-webui
|
||||
FROM alpine:edge
|
||||
|
||||
RUN apk update && \
|
||||
apk add ffmpeg yt-dlp ca-certificates curl wget
|
||||
apk add ffmpeg yt-dlp ca-certificates curl wget psmisc
|
||||
|
||||
VOLUME /downloads /config
|
||||
|
||||
|
||||
674
LICENSE
Normal file
674
LICENSE
Normal file
@@ -0,0 +1,674 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||
373
LICENSE.md
373
LICENSE.md
@@ -1,373 +0,0 @@
|
||||
Mozilla Public License Version 2.0
|
||||
==================================
|
||||
|
||||
1. Definitions
|
||||
--------------
|
||||
|
||||
1.1. "Contributor"
|
||||
means each individual or legal entity that creates, contributes to
|
||||
the creation of, or owns Covered Software.
|
||||
|
||||
1.2. "Contributor Version"
|
||||
means the combination of the Contributions of others (if any) used
|
||||
by a Contributor and that particular Contributor's Contribution.
|
||||
|
||||
1.3. "Contribution"
|
||||
means Covered Software of a particular Contributor.
|
||||
|
||||
1.4. "Covered Software"
|
||||
means Source Code Form to which the initial Contributor has attached
|
||||
the notice in Exhibit A, the Executable Form of such Source Code
|
||||
Form, and Modifications of such Source Code Form, in each case
|
||||
including portions thereof.
|
||||
|
||||
1.5. "Incompatible With Secondary Licenses"
|
||||
means
|
||||
|
||||
(a) that the initial Contributor has attached the notice described
|
||||
in Exhibit B to the Covered Software; or
|
||||
|
||||
(b) that the Covered Software was made available under the terms of
|
||||
version 1.1 or earlier of the License, but not also under the
|
||||
terms of a Secondary License.
|
||||
|
||||
1.6. "Executable Form"
|
||||
means any form of the work other than Source Code Form.
|
||||
|
||||
1.7. "Larger Work"
|
||||
means a work that combines Covered Software with other material, in
|
||||
a separate file or files, that is not Covered Software.
|
||||
|
||||
1.8. "License"
|
||||
means this document.
|
||||
|
||||
1.9. "Licensable"
|
||||
means having the right to grant, to the maximum extent possible,
|
||||
whether at the time of the initial grant or subsequently, any and
|
||||
all of the rights conveyed by this License.
|
||||
|
||||
1.10. "Modifications"
|
||||
means any of the following:
|
||||
|
||||
(a) any file in Source Code Form that results from an addition to,
|
||||
deletion from, or modification of the contents of Covered
|
||||
Software; or
|
||||
|
||||
(b) any new file in Source Code Form that contains any Covered
|
||||
Software.
|
||||
|
||||
1.11. "Patent Claims" of a Contributor
|
||||
means any patent claim(s), including without limitation, method,
|
||||
process, and apparatus claims, in any patent Licensable by such
|
||||
Contributor that would be infringed, but for the grant of the
|
||||
License, by the making, using, selling, offering for sale, having
|
||||
made, import, or transfer of either its Contributions or its
|
||||
Contributor Version.
|
||||
|
||||
1.12. "Secondary License"
|
||||
means either the GNU General Public License, Version 2.0, the GNU
|
||||
Lesser General Public License, Version 2.1, the GNU Affero General
|
||||
Public License, Version 3.0, or any later versions of those
|
||||
licenses.
|
||||
|
||||
1.13. "Source Code Form"
|
||||
means the form of the work preferred for making modifications.
|
||||
|
||||
1.14. "You" (or "Your")
|
||||
means an individual or a legal entity exercising rights under this
|
||||
License. For legal entities, "You" includes any entity that
|
||||
controls, is controlled by, or is under common control with You. For
|
||||
purposes of this definition, "control" means (a) the power, direct
|
||||
or indirect, to cause the direction or management of such entity,
|
||||
whether by contract or otherwise, or (b) ownership of more than
|
||||
fifty percent (50%) of the outstanding shares or beneficial
|
||||
ownership of such entity.
|
||||
|
||||
2. License Grants and Conditions
|
||||
--------------------------------
|
||||
|
||||
2.1. Grants
|
||||
|
||||
Each Contributor hereby grants You a world-wide, royalty-free,
|
||||
non-exclusive license:
|
||||
|
||||
(a) under intellectual property rights (other than patent or trademark)
|
||||
Licensable by such Contributor to use, reproduce, make available,
|
||||
modify, display, perform, distribute, and otherwise exploit its
|
||||
Contributions, either on an unmodified basis, with Modifications, or
|
||||
as part of a Larger Work; and
|
||||
|
||||
(b) under Patent Claims of such Contributor to make, use, sell, offer
|
||||
for sale, have made, import, and otherwise transfer either its
|
||||
Contributions or its Contributor Version.
|
||||
|
||||
2.2. Effective Date
|
||||
|
||||
The licenses granted in Section 2.1 with respect to any Contribution
|
||||
become effective for each Contribution on the date the Contributor first
|
||||
distributes such Contribution.
|
||||
|
||||
2.3. Limitations on Grant Scope
|
||||
|
||||
The licenses granted in this Section 2 are the only rights granted under
|
||||
this License. No additional rights or licenses will be implied from the
|
||||
distribution or licensing of Covered Software under this License.
|
||||
Notwithstanding Section 2.1(b) above, no patent license is granted by a
|
||||
Contributor:
|
||||
|
||||
(a) for any code that a Contributor has removed from Covered Software;
|
||||
or
|
||||
|
||||
(b) for infringements caused by: (i) Your and any other third party's
|
||||
modifications of Covered Software, or (ii) the combination of its
|
||||
Contributions with other software (except as part of its Contributor
|
||||
Version); or
|
||||
|
||||
(c) under Patent Claims infringed by Covered Software in the absence of
|
||||
its Contributions.
|
||||
|
||||
This License does not grant any rights in the trademarks, service marks,
|
||||
or logos of any Contributor (except as may be necessary to comply with
|
||||
the notice requirements in Section 3.4).
|
||||
|
||||
2.4. Subsequent Licenses
|
||||
|
||||
No Contributor makes additional grants as a result of Your choice to
|
||||
distribute the Covered Software under a subsequent version of this
|
||||
License (see Section 10.2) or under the terms of a Secondary License (if
|
||||
permitted under the terms of Section 3.3).
|
||||
|
||||
2.5. Representation
|
||||
|
||||
Each Contributor represents that the Contributor believes its
|
||||
Contributions are its original creation(s) or it has sufficient rights
|
||||
to grant the rights to its Contributions conveyed by this License.
|
||||
|
||||
2.6. Fair Use
|
||||
|
||||
This License is not intended to limit any rights You have under
|
||||
applicable copyright doctrines of fair use, fair dealing, or other
|
||||
equivalents.
|
||||
|
||||
2.7. Conditions
|
||||
|
||||
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
|
||||
in Section 2.1.
|
||||
|
||||
3. Responsibilities
|
||||
-------------------
|
||||
|
||||
3.1. Distribution of Source Form
|
||||
|
||||
All distribution of Covered Software in Source Code Form, including any
|
||||
Modifications that You create or to which You contribute, must be under
|
||||
the terms of this License. You must inform recipients that the Source
|
||||
Code Form of the Covered Software is governed by the terms of this
|
||||
License, and how they can obtain a copy of this License. You may not
|
||||
attempt to alter or restrict the recipients' rights in the Source Code
|
||||
Form.
|
||||
|
||||
3.2. Distribution of Executable Form
|
||||
|
||||
If You distribute Covered Software in Executable Form then:
|
||||
|
||||
(a) such Covered Software must also be made available in Source Code
|
||||
Form, as described in Section 3.1, and You must inform recipients of
|
||||
the Executable Form how they can obtain a copy of such Source Code
|
||||
Form by reasonable means in a timely manner, at a charge no more
|
||||
than the cost of distribution to the recipient; and
|
||||
|
||||
(b) You may distribute such Executable Form under the terms of this
|
||||
License, or sublicense it under different terms, provided that the
|
||||
license for the Executable Form does not attempt to limit or alter
|
||||
the recipients' rights in the Source Code Form under this License.
|
||||
|
||||
3.3. Distribution of a Larger Work
|
||||
|
||||
You may create and distribute a Larger Work under terms of Your choice,
|
||||
provided that You also comply with the requirements of this License for
|
||||
the Covered Software. If the Larger Work is a combination of Covered
|
||||
Software with a work governed by one or more Secondary Licenses, and the
|
||||
Covered Software is not Incompatible With Secondary Licenses, this
|
||||
License permits You to additionally distribute such Covered Software
|
||||
under the terms of such Secondary License(s), so that the recipient of
|
||||
the Larger Work may, at their option, further distribute the Covered
|
||||
Software under the terms of either this License or such Secondary
|
||||
License(s).
|
||||
|
||||
3.4. Notices
|
||||
|
||||
You may not remove or alter the substance of any license notices
|
||||
(including copyright notices, patent notices, disclaimers of warranty,
|
||||
or limitations of liability) contained within the Source Code Form of
|
||||
the Covered Software, except that You may alter any license notices to
|
||||
the extent required to remedy known factual inaccuracies.
|
||||
|
||||
3.5. Application of Additional Terms
|
||||
|
||||
You may choose to offer, and to charge a fee for, warranty, support,
|
||||
indemnity or liability obligations to one or more recipients of Covered
|
||||
Software. However, You may do so only on Your own behalf, and not on
|
||||
behalf of any Contributor. You must make it absolutely clear that any
|
||||
such warranty, support, indemnity, or liability obligation is offered by
|
||||
You alone, and You hereby agree to indemnify every Contributor for any
|
||||
liability incurred by such Contributor as a result of warranty, support,
|
||||
indemnity or liability terms You offer. You may include additional
|
||||
disclaimers of warranty and limitations of liability specific to any
|
||||
jurisdiction.
|
||||
|
||||
4. Inability to Comply Due to Statute or Regulation
|
||||
---------------------------------------------------
|
||||
|
||||
If it is impossible for You to comply with any of the terms of this
|
||||
License with respect to some or all of the Covered Software due to
|
||||
statute, judicial order, or regulation then You must: (a) comply with
|
||||
the terms of this License to the maximum extent possible; and (b)
|
||||
describe the limitations and the code they affect. Such description must
|
||||
be placed in a text file included with all distributions of the Covered
|
||||
Software under this License. Except to the extent prohibited by statute
|
||||
or regulation, such description must be sufficiently detailed for a
|
||||
recipient of ordinary skill to be able to understand it.
|
||||
|
||||
5. Termination
|
||||
--------------
|
||||
|
||||
5.1. The rights granted under this License will terminate automatically
|
||||
if You fail to comply with any of its terms. However, if You become
|
||||
compliant, then the rights granted under this License from a particular
|
||||
Contributor are reinstated (a) provisionally, unless and until such
|
||||
Contributor explicitly and finally terminates Your grants, and (b) on an
|
||||
ongoing basis, if such Contributor fails to notify You of the
|
||||
non-compliance by some reasonable means prior to 60 days after You have
|
||||
come back into compliance. Moreover, Your grants from a particular
|
||||
Contributor are reinstated on an ongoing basis if such Contributor
|
||||
notifies You of the non-compliance by some reasonable means, this is the
|
||||
first time You have received notice of non-compliance with this License
|
||||
from such Contributor, and You become compliant prior to 30 days after
|
||||
Your receipt of the notice.
|
||||
|
||||
5.2. If You initiate litigation against any entity by asserting a patent
|
||||
infringement claim (excluding declaratory judgment actions,
|
||||
counter-claims, and cross-claims) alleging that a Contributor Version
|
||||
directly or indirectly infringes any patent, then the rights granted to
|
||||
You by any and all Contributors for the Covered Software under Section
|
||||
2.1 of this License shall terminate.
|
||||
|
||||
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
|
||||
end user license agreements (excluding distributors and resellers) which
|
||||
have been validly granted by You or Your distributors under this License
|
||||
prior to termination shall survive termination.
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 6. Disclaimer of Warranty *
|
||||
* ------------------------- *
|
||||
* *
|
||||
* Covered Software is provided under this License on an "as is" *
|
||||
* basis, without warranty of any kind, either expressed, implied, or *
|
||||
* statutory, including, without limitation, warranties that the *
|
||||
* Covered Software is free of defects, merchantable, fit for a *
|
||||
* particular purpose or non-infringing. The entire risk as to the *
|
||||
* quality and performance of the Covered Software is with You. *
|
||||
* Should any Covered Software prove defective in any respect, You *
|
||||
* (not any Contributor) assume the cost of any necessary servicing, *
|
||||
* repair, or correction. This disclaimer of warranty constitutes an *
|
||||
* essential part of this License. No use of any Covered Software is *
|
||||
* authorized under this License except under this disclaimer. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 7. Limitation of Liability *
|
||||
* -------------------------- *
|
||||
* *
|
||||
* Under no circumstances and under no legal theory, whether tort *
|
||||
* (including negligence), contract, or otherwise, shall any *
|
||||
* Contributor, or anyone who distributes Covered Software as *
|
||||
* permitted above, be liable to You for any direct, indirect, *
|
||||
* special, incidental, or consequential damages of any character *
|
||||
* including, without limitation, damages for lost profits, loss of *
|
||||
* goodwill, work stoppage, computer failure or malfunction, or any *
|
||||
* and all other commercial damages or losses, even if such party *
|
||||
* shall have been informed of the possibility of such damages. This *
|
||||
* limitation of liability shall not apply to liability for death or *
|
||||
* personal injury resulting from such party's negligence to the *
|
||||
* extent applicable law prohibits such limitation. Some *
|
||||
* jurisdictions do not allow the exclusion or limitation of *
|
||||
* incidental or consequential damages, so this exclusion and *
|
||||
* limitation may not apply to You. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
8. Litigation
|
||||
-------------
|
||||
|
||||
Any litigation relating to this License may be brought only in the
|
||||
courts of a jurisdiction where the defendant maintains its principal
|
||||
place of business and such litigation shall be governed by laws of that
|
||||
jurisdiction, without reference to its conflict-of-law provisions.
|
||||
Nothing in this Section shall prevent a party's ability to bring
|
||||
cross-claims or counter-claims.
|
||||
|
||||
9. Miscellaneous
|
||||
----------------
|
||||
|
||||
This License represents the complete agreement concerning the subject
|
||||
matter hereof. If any provision of this License is held to be
|
||||
unenforceable, such provision shall be reformed only to the extent
|
||||
necessary to make it enforceable. Any law or regulation which provides
|
||||
that the language of a contract shall be construed against the drafter
|
||||
shall not be used to construe this License against a Contributor.
|
||||
|
||||
10. Versions of the License
|
||||
---------------------------
|
||||
|
||||
10.1. New Versions
|
||||
|
||||
Mozilla Foundation is the license steward. Except as provided in Section
|
||||
10.3, no one other than the license steward has the right to modify or
|
||||
publish new versions of this License. Each version will be given a
|
||||
distinguishing version number.
|
||||
|
||||
10.2. Effect of New Versions
|
||||
|
||||
You may distribute the Covered Software under the terms of the version
|
||||
of the License under which You originally received the Covered Software,
|
||||
or under the terms of any subsequent version published by the license
|
||||
steward.
|
||||
|
||||
10.3. Modified Versions
|
||||
|
||||
If you create software not governed by this License, and you want to
|
||||
create a new license for such software, you may create and use a
|
||||
modified version of this License if you rename the license and remove
|
||||
any references to the name of the license steward (except to note that
|
||||
such modified license differs from this License).
|
||||
|
||||
10.4. Distributing Source Code Form that is Incompatible With Secondary
|
||||
Licenses
|
||||
|
||||
If You choose to distribute Source Code Form that is Incompatible With
|
||||
Secondary Licenses under the terms of this version of the License, the
|
||||
notice described in Exhibit B of this License must be attached.
|
||||
|
||||
Exhibit A - Source Code Form License Notice
|
||||
-------------------------------------------
|
||||
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
If it is not possible or desirable to put the notice in a particular
|
||||
file, then You may include the notice in a location (such as a LICENSE
|
||||
file in a relevant directory) where a recipient would be likely to look
|
||||
for such a notice.
|
||||
|
||||
You may add additional accurate notices of copyright ownership.
|
||||
|
||||
Exhibit B - "Incompatible With Secondary Licenses" Notice
|
||||
---------------------------------------------------------
|
||||
|
||||
This Source Code Form is "Incompatible With Secondary Licenses", as
|
||||
defined by the Mozilla Public License, v. 2.0.
|
||||
10
Makefile
10
Makefile
@@ -4,17 +4,15 @@ default:
|
||||
go run main.go
|
||||
|
||||
fe:
|
||||
cd frontend && pnpm build
|
||||
cd frontend && pnpm install && pnpm build
|
||||
|
||||
dev:
|
||||
cd frontend && pnpm dev
|
||||
cd frontend && pnpm install && pnpm dev
|
||||
|
||||
all:
|
||||
$(MAKE) fe && cd ..
|
||||
all: fe
|
||||
CGO_ENABLED=0 go build -o yt-dlp-webui main.go
|
||||
|
||||
multiarch:
|
||||
$(MAKE) fe
|
||||
multiarch: fe
|
||||
mkdir -p build
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o build/yt-dlp-webui_linux-amd64 main.go
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o build/yt-dlp-webui_linux-arm64 main.go
|
||||
|
||||
171
README.md
171
README.md
@@ -1,67 +1,42 @@
|
||||
> [!IMPORTANT]
|
||||
> Major frontend refactoring in progress.
|
||||
> I won't add features or fix minor issues until completition.
|
||||
---
|
||||
> [!NOTE]
|
||||
> A poll is up to decide the future of yt-dlp-web-ui frontend! If you're interested you can take part.
|
||||
> https://github.com/marcopiovanello/yt-dlp-web-ui/discussions/223
|
||||
|
||||
# yt-dlp Web UI
|
||||
|
||||
A not so terrible web ui for yt-dlp.
|
||||
Created for the only purpose of *fetching* videos from my server/nas.
|
||||
A not so terrible web ui for yt-dlp.
|
||||
|
||||
Intended to be used with docker and in standalone mode. 😎👍
|
||||
High performance extendeable web ui and RPC server for yt-dlp with low impact on resources.
|
||||
|
||||
Developed to be as lightweight as possible (because my server is basically an intel atom sbc).
|
||||
Created for the only purpose of *fetching* videos from my server/nas and monitor upcoming livestreams.
|
||||
|
||||
The bottleneck remains yt-dlp startup time.
|
||||
|
||||
**Docker images are available on [Docker Hub](https://hub.docker.com/r/marcobaobao/yt-dlp-webui) or [ghcr.io](https://github.com/marcopeocchi/yt-dlp-web-ui/pkgs/container/yt-dlp-web-ui)**.
|
||||
**Docker images are available on [Docker Hub](https://hub.docker.com/r/marcobaobao/yt-dlp-webui) or [ghcr.io](https://github.com/marcopiovanello/yt-dlp-web-ui/pkgs/container/yt-dlp-web-ui)**.
|
||||
|
||||
```sh
|
||||
docker pull marcobaobao/yt-dlp-webui
|
||||
```
|
||||
```sh
|
||||
# latest dev
|
||||
docker pull ghcr.io/marcopeocchi/yt-dlp-web-ui:latest
|
||||
docker pull ghcr.io/marcopiovanello/yt-dlp-web-ui:latest
|
||||
```
|
||||
|
||||
[app.webm](https://github.com/marcopeocchi/yt-dlp-web-ui/assets/35533749/91545bc4-233d-4dde-8504-27422cb26964)
|
||||
## Donate to yt-dlp-webui development
|
||||
[PayPal](https://paypal.me/marcofw)
|
||||
|
||||
*Keeps the project alive!* 😃
|
||||
|
||||

|
||||

|
||||
## Community stuff
|
||||
Feel free to join :)
|
||||
|
||||
### Integrated File browser
|
||||
Stream or download your content, easily.
|
||||
[](https://discord.gg/WRnVWr4y)
|
||||
|
||||

|
||||
## Some screeshots
|
||||

|
||||

|
||||

|
||||
|
||||
## Changelog
|
||||
```
|
||||
05/03/22: Korean translation by kimpig
|
||||
|
||||
03/03/22: cut-down image size by switching to Alpine linux based container
|
||||
|
||||
01/03/22: Chinese translation by deluxghost
|
||||
|
||||
03/02/22: i18n enabled! I need help with the translations :/
|
||||
|
||||
27/01/22: Multidownload implemented!
|
||||
|
||||
26/01/22: Multiple downloads are being implemented. Maybe by next release they will be there.
|
||||
Refactoring and JSDoc.
|
||||
|
||||
04/01/22: Background jobs now are retrieved!! It's still rudimentary but it leverages on yt-dlp resume feature.
|
||||
|
||||
05/05/22: Material UI update.
|
||||
|
||||
03/06/22: The most requested feature finally implemented: Format Selection!!
|
||||
|
||||
08/06/22: ARM builds.
|
||||
|
||||
28/06/22: Reworked resume download feature. Now it's pratically instantaneous. It no longer stops and restarts each process, references to each process are saved in memory.
|
||||
|
||||
12/01/23: Switched from TypeScript to Golang on the backend. It was a great effort but it was worth it.
|
||||
```
|
||||
## Video showcase
|
||||
[app.webm](https://github.com/marcopiovanello/yt-dlp-web-ui/assets/35533749/91545bc4-233d-4dde-8504-27422cb26964)
|
||||
|
||||
## Settings
|
||||
|
||||
@@ -76,23 +51,13 @@ The currently avaible settings are:
|
||||
- Pass custom yt-dlp arguments safely
|
||||
- Download queue (limit concurrent downloads)
|
||||
|
||||

|
||||

|
||||
|
||||
## Format selection
|
||||
|
||||
This feature is disabled by default as this intended to be used to retrieve the best quality automatically.
|
||||
|
||||
To enable it just go to the settings page and enable the **Enable video/audio formats selection** flag!
|
||||
|
||||
## Troubleshooting
|
||||
- **It says that it isn't connected/ip in the header is not defined.**
|
||||
- You must set the server ip address in the settings section (gear icon).
|
||||
- **The download doesn't start.**
|
||||
- As before server address is not specified or simply yt-dlp process takes a lot of time to fire up. (Forking yt-dlp isn't fast especially if you have a lower-end/low-power NAS/server/desktop where the server is running)
|
||||
|
||||
## [Docker](https://github.com/marcopeocchi/yt-dlp-web-ui/pkgs/container/yt-dlp-web-ui) installation
|
||||
## Docker run
|
||||
## [Docker](https://github.com/marcopiovanello/yt-dlp-web-ui/pkgs/container/yt-dlp-web-ui) run
|
||||
```sh
|
||||
docker pull marcobaobao/yt-dlp-webui
|
||||
docker run -d -p 3033:3033 -v <your dir>:/downloads marcobaobao/yt-dlp-webui
|
||||
@@ -150,7 +115,17 @@ services:
|
||||
restart: unless-stopped
|
||||
```
|
||||
|
||||
## [Prebuilt binaries](https://github.com/marcopeocchi/yt-dlp-web-ui/releases) installation
|
||||
### ⚡ One-Click Deploy
|
||||
|
||||
| Cloud Provider | Deploy Button |
|
||||
|----------------|---------------|
|
||||
| AWS | <a href="https://deploystack.io/deploy/marcopiovanello-yt-dlp-web-ui?provider=aws&language=cfn"><img src="https://raw.githubusercontent.com/deploystackio/deploy-templates/refs/heads/main/.assets/img/aws.svg" height="38"></a> |
|
||||
| DigitalOcean | <a href="https://deploystack.io/deploy/marcopiovanello-yt-dlp-web-ui?provider=do&language=dop"><img src="https://raw.githubusercontent.com/deploystackio/deploy-templates/refs/heads/main/.assets/img/do.svg" height="38"></a> |
|
||||
| Render | <a href="https://deploystack.io/deploy/marcopiovanello-yt-dlp-web-ui?provider=rnd&language=rnd"><img src="https://raw.githubusercontent.com/deploystackio/deploy-templates/refs/heads/main/.assets/img/rnd.svg" height="38"></a> |
|
||||
|
||||
<sub>Generated by <a href="https://deploystack.io/c/marcopiovanello-yt-dlp-web-ui" target="_blank">DeployStack.io</a></sub>
|
||||
|
||||
## [Prebuilt binaries](https://github.com/marcopiovanello/yt-dlp-web-ui/releases) installation
|
||||
|
||||
```sh
|
||||
# download the latest release from the releases page
|
||||
@@ -172,26 +147,37 @@ Usage yt-dlp-webui:
|
||||
-auth
|
||||
Enable RPC authentication
|
||||
-conf string
|
||||
Config file path
|
||||
Config file path (default "./config.yml")
|
||||
-db string
|
||||
local database path (default "local.db")
|
||||
-driver string
|
||||
yt-dlp executable path (default "yt-dlp")
|
||||
-out string
|
||||
Where files will be saved (default ".")
|
||||
-fl
|
||||
enable file based logging
|
||||
-host string
|
||||
Host where server will listen at (default "0.0.0.0")
|
||||
-lf string
|
||||
set log file location (default "yt-dlp-webui.log")
|
||||
-out string
|
||||
Where files will be saved (default ".")
|
||||
-pass string
|
||||
Password required for auth
|
||||
-port int
|
||||
Port where server will listen at (default 3033)
|
||||
-qs int
|
||||
Download queue size (default 8)
|
||||
Queue size (concurrent downloads) (default 2)
|
||||
-session string
|
||||
session file path (default ".")
|
||||
-user string
|
||||
Username required for auth
|
||||
-pass string
|
||||
Password required for auth
|
||||
-web string
|
||||
frontend web resources path
|
||||
```
|
||||
|
||||
### Config file
|
||||
By running `yt-dlp-webui` in standalone mode you have the ability to also specify a config file.
|
||||
The config file **will overwrite what have been passed as cli argument**.
|
||||
With Docker, inside the mounted `/conf` volume inside there must be a file named `config.yml`.
|
||||
|
||||
```yaml
|
||||
# Simple configuration file for yt-dlp webui
|
||||
@@ -211,17 +197,26 @@ require_auth: true
|
||||
username: my_username
|
||||
password: my_random_secret
|
||||
|
||||
# [optional] The download queue size (default: 8)
|
||||
queue_size: 4
|
||||
# [optional] The download queue size (default: logical cpu cores)
|
||||
queue_size: 4 # min. 2
|
||||
|
||||
# [optional] Full path to the yt-dlp (default: "yt-dlp")
|
||||
downloaderPath: /usr/local/bin/yt-dlp
|
||||
#downloaderPath: /usr/local/bin/yt-dlp
|
||||
|
||||
# [optional] Enable file based logging with rotation (default: false)
|
||||
#enable_file_logging: false
|
||||
|
||||
# [optional] Directory where the log file will be stored (default: ".")
|
||||
#log_path: .
|
||||
|
||||
# [optional] Directory where the session database file will be stored (default: ".")
|
||||
#session_file_path: .
|
||||
|
||||
# [optional] Path where the sqlite database will be created/opened (default: "./local.db")
|
||||
#local_database_path
|
||||
|
||||
# [optional] Path where a custom frontend will be loaded (instead of the embedded one)
|
||||
#frontend_path: ./web/solid-frontend
|
||||
```
|
||||
|
||||
### Systemd integration
|
||||
@@ -270,13 +265,9 @@ ExecStart=/usr/local/bin/yt-dlp-webui --conf /home/your_user/yt-dlp-webui-workin
|
||||
|
||||
## Manual installation
|
||||
```sh
|
||||
# the dependencies are: python3, ffmpeg, nodejs, psmisc, go.
|
||||
# the dependencies are: yt-dlp, ffmpeg, nodejs, go, make.
|
||||
|
||||
cd frontend
|
||||
npm i
|
||||
npm run build
|
||||
|
||||
go build -o yt-dlp-webui main.go
|
||||
make all
|
||||
```
|
||||
## Open-API
|
||||
Navigate to `/openapi` to see the related swagger.
|
||||
@@ -289,17 +280,33 @@ Want to build your own frontend? We got you covered 🤠
|
||||
`yt-dlp-webui` now exposes a nice **JSON-RPC 1.0** interface through Websockets and HTTP-POST
|
||||
It is **planned** to also expose a **gRPC** server.
|
||||
|
||||
Just as an overview, these are the available methods:
|
||||
- Service.Exec
|
||||
- Service.Progress
|
||||
- Service.Formats
|
||||
- Service.Pending
|
||||
- Service.Running
|
||||
- Service.Kill
|
||||
- Service.KillAll
|
||||
- Service.Clear
|
||||
|
||||
For more information open an issue on GitHub and I will provide more info ASAP.
|
||||
|
||||
## Custom frontend
|
||||
To load a custom frontend you need to specify its path either in the config file ([see config file](#config-file)) or via flags.
|
||||
|
||||
The frontend needs to follow this structure:
|
||||
```
|
||||
path/to/my/frontend
|
||||
├── assets
|
||||
│ ├── js-chunk-1.js (example)
|
||||
│ ├── js-chunk-2.js (example)
|
||||
│ ├── style.css (example)
|
||||
└── index.html
|
||||
```
|
||||
|
||||
`assets` is where the resources will be loaded.
|
||||
`index.html` is the entrypoint.
|
||||
|
||||
## Nix
|
||||
This repo adds support for Nix(OS) in various ways through a `flake-parts` flake.
|
||||
For more info, please refer to the [official documentation](https://nixos.org/learn/).
|
||||
|
||||
## What yt-dlp-webui is not
|
||||
`yt-dlp-webui` isn't your ordinary website where to download stuff from the internet, so don't try asking for links of where this is hosted. It's a self hosted platform for a Linux NAS.
|
||||
|
||||
## Troubleshooting
|
||||
- **It says that it isn't connected.**
|
||||
- In some circumstances, you must set the server ip address or hostname in the settings section (gear icon).
|
||||
- **The download doesn't start.**
|
||||
- Simply, yt-dlp process takes a lot of time to fire up. (yt-dlp isn't fast especially if you have a lower-end/low-power NAS/server/desktop. Furthermore some yt-dlp builds are slower than others)
|
||||
|
||||
@@ -5,6 +5,7 @@ services:
|
||||
- 3033:3033
|
||||
volumes:
|
||||
- <your dir>:/downloads # replace <your dir> with a directory on your host system
|
||||
- <your dir>:/config # directory where config.yml will be stored
|
||||
healthcheck:
|
||||
test: curl -f http://localhost:3033 || exit 1
|
||||
restart: unless-stopped
|
||||
|
||||
4
env.nix
4
env.nix
@@ -1,4 +0,0 @@
|
||||
{ pkgs ? import <nixpkgs> {} }:
|
||||
pkgs.mkShell {
|
||||
nativeBuildInputs = with pkgs.buildPackages; [ yt-dlp nodejs_22 yarn-berry go ];
|
||||
}
|
||||
27
examples/docker-compose-nginx/app.conf
Normal file
27
examples/docker-compose-nginx/app.conf
Normal file
@@ -0,0 +1,27 @@
|
||||
map $http_upgrade $connection_upgrade {
|
||||
default upgrade;
|
||||
'' close;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
|
||||
location / {
|
||||
proxy_pass http://app:3033;
|
||||
proxy_redirect off;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
|
||||
client_max_body_size 20000m;
|
||||
proxy_connect_timeout 5000;
|
||||
proxy_send_timeout 5000;
|
||||
proxy_read_timeout 5000;
|
||||
send_timeout 5000;
|
||||
}
|
||||
}
|
||||
15
examples/docker-compose-nginx/docker-compose.yml
Normal file
15
examples/docker-compose-nginx/docker-compose.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
services:
|
||||
app:
|
||||
image: marcobaobao/yt-dlp-webui
|
||||
volumes:
|
||||
- ./downloads:/downloads
|
||||
restart: unless-stopped
|
||||
nginx:
|
||||
image: nginx:alpine
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./app.conf:/etc/nginx/conf.d/app.conf
|
||||
depends_on:
|
||||
- app
|
||||
ports:
|
||||
- 80:80
|
||||
149
flake.lock
generated
Normal file
149
flake.lock
generated
Normal file
@@ -0,0 +1,149 @@
|
||||
{
|
||||
"nodes": {
|
||||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1696426674,
|
||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1722555600,
|
||||
"narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "8471fe90ad337a8074e957b69ca4d0089218391d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"gitignore": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"pre-commit-hooks-nix",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709087332,
|
||||
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1723637854,
|
||||
"narHash": "sha256-med8+5DSWa2UnOqtdICndjDAEjxr5D7zaIiK4pn0Q7c=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c3aa7b8938b17aebd2deecf7be0636000d62a2b9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-lib": {
|
||||
"locked": {
|
||||
"lastModified": 1722555339,
|
||||
"narHash": "sha256-uFf2QeW7eAHlYXuDktm9c25OxOyCoUOQmh5SZ9amE5Q=",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz"
|
||||
}
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1720386169,
|
||||
"narHash": "sha256-NGKVY4PjzwAa4upkGtAMz1npHGoRzWotlSnVlqI40mo=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "194846768975b7ad2c4988bdb82572c00222c0d7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-24.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1719082008,
|
||||
"narHash": "sha256-jHJSUH619zBQ6WdC21fFAlDxHErKVDJ5fpN0Hgx4sjs=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9693852a2070b398ee123a329e68f0dab5526681",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"pre-commit-hooks-nix": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"gitignore": "gitignore",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nixpkgs-stable": "nixpkgs-stable"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1723803910,
|
||||
"narHash": "sha256-yezvUuFiEnCFbGuwj/bQcqg7RykIEqudOy/RBrId0pc=",
|
||||
"owner": "cachix",
|
||||
"repo": "pre-commit-hooks.nix",
|
||||
"rev": "bfef0ada09e2c8ac55bbcd0831bd0c9d42e651ba",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "cachix",
|
||||
"repo": "pre-commit-hooks.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"pre-commit-hooks-nix": "pre-commit-hooks-nix"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
51
flake.nix
Normal file
51
flake.nix
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
description = "A terrible web ui for yt-dlp. Designed to be self-hosted.";
|
||||
|
||||
inputs = {
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
pre-commit-hooks-nix.url = "github:cachix/pre-commit-hooks.nix";
|
||||
};
|
||||
|
||||
outputs = inputs@{ self, flake-parts, ... }:
|
||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
imports = [
|
||||
inputs.pre-commit-hooks-nix.flakeModule
|
||||
];
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
];
|
||||
perSystem = { config, self', pkgs, ... }: {
|
||||
|
||||
packages = {
|
||||
yt-dlp-web-ui-frontend = pkgs.callPackage ./nix/frontend.nix { };
|
||||
default = pkgs.callPackage ./nix/server.nix {
|
||||
inherit (self'.packages) yt-dlp-web-ui-frontend;
|
||||
};
|
||||
};
|
||||
|
||||
checks = import ./nix/tests { inherit self pkgs; };
|
||||
|
||||
pre-commit = {
|
||||
check.enable = true;
|
||||
settings = {
|
||||
hooks = {
|
||||
${self'.formatter.pname}.enable = true;
|
||||
deadnix.enable = true;
|
||||
nil.enable = true;
|
||||
statix.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
devShells.default = pkgs.callPackage ./nix/devShell.nix {
|
||||
inputsFrom = [ config.pre-commit.devShell ];
|
||||
};
|
||||
|
||||
formatter = pkgs.nixpkgs-fmt;
|
||||
};
|
||||
flake = {
|
||||
nixosModules.default = import ./nix/module.nix self.packages;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,39 +1,39 @@
|
||||
{
|
||||
"name": "yt-dlp-webui",
|
||||
"version": "3.0.9",
|
||||
"version": "3.2.5",
|
||||
"description": "Frontend compontent of yt-dlp-webui",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"dev": "vite --host 0.0.0.0",
|
||||
"build": "vite build"
|
||||
},
|
||||
"author": "marcopeocchi",
|
||||
"license": "MPL-2.0",
|
||||
"type": "module",
|
||||
"author": "marcopiovanello",
|
||||
"license": "GPL-3.0-only",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@emotion/react": "^11.11.4",
|
||||
"@emotion/styled": "^11.11.5",
|
||||
"@emotion/react": "^11.14.0",
|
||||
"@emotion/styled": "^11.14.0",
|
||||
"@fontsource/roboto": "^5.0.13",
|
||||
"@fontsource/roboto-mono": "^5.0.18",
|
||||
"@mui/icons-material": "^5.15.16",
|
||||
"@mui/material": "^5.15.16",
|
||||
"@mui/icons-material": "^6.2.0",
|
||||
"@mui/material": "^6.2.0",
|
||||
"fp-ts": "^2.16.5",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"react": "^19.0.0",
|
||||
"react-dom": "^19.0.0",
|
||||
"react-router-dom": "^6.23.1",
|
||||
"react-virtuoso": "^4.7.11",
|
||||
"recoil": "^0.7.7",
|
||||
"jotai": "^2.10.3",
|
||||
"rxjs": "^7.8.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@modyfi/vite-plugin-yaml": "^1.1.0",
|
||||
"@types/node": "^20.14.2",
|
||||
"@types/react": "^18.3.3",
|
||||
"@types/react-dom": "^18.2.18",
|
||||
"@types/react": "^19.0.1",
|
||||
"@types/react-dom": "^19.0.2",
|
||||
"@types/react-helmet": "^6.1.11",
|
||||
"@types/react-router-dom": "^5.3.3",
|
||||
"@vitejs/plugin-react-swc": "^3.7.0",
|
||||
"million": "^3.1.11",
|
||||
"typescript": "^5.4.5",
|
||||
"vite": "^5.2.11"
|
||||
"@vitejs/plugin-react-swc": "^3.7.2",
|
||||
"typescript": "^5.7.2",
|
||||
"vite": "^6.0.3"
|
||||
}
|
||||
}
|
||||
1697
frontend/pnpm-lock.yaml
generated
1697
frontend/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,11 @@
|
||||
import { RouterProvider } from 'react-router-dom'
|
||||
import { RecoilRoot } from 'recoil'
|
||||
import { Provider } from 'jotai'
|
||||
import { router } from './router'
|
||||
|
||||
export function App() {
|
||||
return (
|
||||
<RecoilRoot>
|
||||
<Provider>
|
||||
<RouterProvider router={router} />
|
||||
</RecoilRoot>
|
||||
</Provider>
|
||||
)
|
||||
}
|
||||
@@ -1,10 +1,12 @@
|
||||
import { ThemeProvider } from '@emotion/react'
|
||||
import ArchiveIcon from '@mui/icons-material/Archive'
|
||||
import ChevronLeft from '@mui/icons-material/ChevronLeft'
|
||||
import CloudDownloadIcon from '@mui/icons-material/CloudDownload'
|
||||
import Dashboard from '@mui/icons-material/Dashboard'
|
||||
import LiveTvIcon from '@mui/icons-material/LiveTv'
|
||||
import Menu from '@mui/icons-material/Menu'
|
||||
import SettingsIcon from '@mui/icons-material/Settings'
|
||||
import TerminalIcon from '@mui/icons-material/Terminal'
|
||||
import UpdateIcon from '@mui/icons-material/Update'
|
||||
import { Box, createTheme } from '@mui/material'
|
||||
import CssBaseline from '@mui/material/CssBaseline'
|
||||
import Divider from '@mui/material/Divider'
|
||||
@@ -16,9 +18,9 @@ import ListItemText from '@mui/material/ListItemText'
|
||||
import Toolbar from '@mui/material/Toolbar'
|
||||
import Typography from '@mui/material/Typography'
|
||||
import { grey } from '@mui/material/colors'
|
||||
import { useAtomValue } from 'jotai'
|
||||
import { useMemo, useState } from 'react'
|
||||
import { Link, Outlet } from 'react-router-dom'
|
||||
import { useRecoilValue } from 'recoil'
|
||||
import { settingsState } from './atoms/settings'
|
||||
import AppBar from './components/AppBar'
|
||||
import Drawer from './components/Drawer'
|
||||
@@ -28,22 +30,26 @@ import SocketSubscriber from './components/SocketSubscriber'
|
||||
import ThemeToggler from './components/ThemeToggler'
|
||||
import { useI18n } from './hooks/useI18n'
|
||||
import Toaster from './providers/ToasterProvider'
|
||||
import { getAccentValue } from './utils'
|
||||
|
||||
export default function Layout() {
|
||||
const [open, setOpen] = useState(false)
|
||||
|
||||
const settings = useRecoilValue(settingsState)
|
||||
const settings = useAtomValue(settingsState)
|
||||
|
||||
const mode = settings.theme
|
||||
const theme = useMemo(() =>
|
||||
createTheme({
|
||||
palette: {
|
||||
mode: settings.theme,
|
||||
primary: {
|
||||
main: getAccentValue(settings.accent, settings.theme)
|
||||
},
|
||||
background: {
|
||||
default: settings.theme === 'light' ? grey[50] : '#121212'
|
||||
},
|
||||
},
|
||||
}), [settings.theme]
|
||||
}), [settings.theme, settings.accent]
|
||||
)
|
||||
|
||||
const toggleDrawer = () => setOpen(state => !state)
|
||||
@@ -52,6 +58,7 @@ export default function Layout() {
|
||||
|
||||
return (
|
||||
<ThemeProvider theme={theme}>
|
||||
<title>{settings.appTitle}</title>
|
||||
<SocketSubscriber />
|
||||
<Box sx={{ display: 'flex' }}>
|
||||
<CssBaseline />
|
||||
@@ -108,7 +115,7 @@ export default function Layout() {
|
||||
<ListItemText primary={i18n.t('homeButtonLabel')} />
|
||||
</ListItemButton>
|
||||
</Link>
|
||||
<Link to={'/archive'} style={
|
||||
{/* <Link to={'/archive'} style={
|
||||
{
|
||||
textDecoration: 'none',
|
||||
color: mode === 'dark' ? '#ffffff' : '#000000DE'
|
||||
@@ -120,6 +127,45 @@ export default function Layout() {
|
||||
</ListItemIcon>
|
||||
<ListItemText primary={i18n.t('archiveButtonLabel')} />
|
||||
</ListItemButton>
|
||||
</Link> */}
|
||||
<Link to={'/filebrowser'} style={
|
||||
{
|
||||
textDecoration: 'none',
|
||||
color: mode === 'dark' ? '#ffffff' : '#000000DE'
|
||||
}
|
||||
}>
|
||||
<ListItemButton>
|
||||
<ListItemIcon>
|
||||
<CloudDownloadIcon />
|
||||
</ListItemIcon>
|
||||
<ListItemText primary={i18n.t('archiveButtonLabel')} />
|
||||
</ListItemButton>
|
||||
</Link>
|
||||
<Link to={'/subscriptions'} style={
|
||||
{
|
||||
textDecoration: 'none',
|
||||
color: mode === 'dark' ? '#ffffff' : '#000000DE'
|
||||
}
|
||||
}>
|
||||
<ListItemButton>
|
||||
<ListItemIcon>
|
||||
<UpdateIcon />
|
||||
</ListItemIcon>
|
||||
<ListItemText primary={i18n.t('subscriptionsButtonLabel')} />
|
||||
</ListItemButton>
|
||||
</Link>
|
||||
<Link to={'/monitor'} style={
|
||||
{
|
||||
textDecoration: 'none',
|
||||
color: mode === 'dark' ? '#ffffff' : '#000000DE'
|
||||
}
|
||||
}>
|
||||
<ListItemButton>
|
||||
<ListItemIcon>
|
||||
<LiveTvIcon />
|
||||
</ListItemIcon>
|
||||
<ListItemText primary={i18n.t('archiveButtonLabel')} />
|
||||
</ListItemButton>
|
||||
</Link>
|
||||
<Link to={'/log'} style={
|
||||
{
|
||||
|
||||
@@ -1,593 +1,22 @@
|
||||
---
|
||||
# Check the i18n src/assets/i18n folder.
|
||||
#
|
||||
# This file maps the language name to its translations file
|
||||
# english -> /src/assets/i18n/en_US.yaml
|
||||
|
||||
languages:
|
||||
english:
|
||||
urlInput: Video URL (one per line)
|
||||
statusTitle: Status
|
||||
statusReady: Ready
|
||||
selectFormatButton: Select format
|
||||
startButton: Start
|
||||
abortAllButton: Abort All
|
||||
updateBinButton: Update yt-dlp binary
|
||||
darkThemeButton: Dark theme
|
||||
lightThemeButton: Light theme
|
||||
settingsAnchor: Settings
|
||||
serverAddressTitle: Server address
|
||||
serverPortTitle: Port
|
||||
extractAudioCheckbox: Extract audio
|
||||
noMTimeCheckbox: Don't set file modification time
|
||||
bgReminder: Once you close this page the download will continue in the background.
|
||||
toastConnected: 'Connected to '
|
||||
toastUpdated: Updated yt-dlp binary!
|
||||
formatSelectionEnabler: Enable video/audio formats selection
|
||||
themeSelect: 'Theme'
|
||||
languageSelect: 'Language'
|
||||
overridesAnchor: Overrides
|
||||
pathOverrideOption: Enable output path overriding
|
||||
filenameOverrideOption: Enable output file name overriding
|
||||
customFilename: Custom filemame (leave blank to use default)
|
||||
customPath: Custom path
|
||||
customArgs: Enable custom yt-dlp args (great power = great responsabilities)
|
||||
customArgsInput: Custom yt-dlp arguments
|
||||
rpcConnErr: Error while conencting to RPC server
|
||||
splashText: No active downloads
|
||||
archiveTitle: Archive
|
||||
clipboardAction: Copied URL to clipboard
|
||||
playlistCheckbox: Download playlist (it will take time, after submitting you may close this window)
|
||||
restartAppMessage: Needs a page reload to take effect
|
||||
servedFromReverseProxyCheckbox: Is behind a reverse proxy
|
||||
urlBase: URL base, for reverse proxy support (subdir), defaults to empty
|
||||
newDownloadButton: New download
|
||||
homeButtonLabel: Home
|
||||
archiveButtonLabel: Archive
|
||||
settingsButtonLabel: Settings
|
||||
rpcAuthenticationLabel: RPC authentication
|
||||
themeTogglerLabel: Theme toggler
|
||||
loadingLabel: Loading...
|
||||
appTitle: App title
|
||||
savedTemplates: Saved templates
|
||||
templatesEditor: Templates editor
|
||||
templatesEditorNameLabel: Template name
|
||||
templatesEditorContentLabel: Template content
|
||||
logsTitle: 'Logs'
|
||||
awaitingLogs: 'Awaiting logs...'
|
||||
bulkDownload: 'Download files in a zip archive'
|
||||
rpcPollingTimeTitle: RPC polling time
|
||||
rpcPollingTimeDescription: A lower interval results in higher CPU usage (server and client side)
|
||||
german:
|
||||
urlInput: Video URL
|
||||
statusTitle: Status
|
||||
statusReady: Bereit
|
||||
selectFormatButton: Format auswählen
|
||||
startButton: Start
|
||||
abortAllButton: Alle Abbrechen
|
||||
updateBinButton: yt-dlp Binärdatei aktualisieren
|
||||
darkThemeButton: Dunkel Modus
|
||||
lightThemeButton: Hell Modus
|
||||
settingsAnchor: Einstellungen
|
||||
serverAddressTitle: Server Adresse
|
||||
serverPortTitle: Port
|
||||
extractAudioCheckbox: Audio extrahieren
|
||||
noMTimeCheckbox: Datei-Änderungszeitpunkt nicht festlegen
|
||||
bgReminder: Sobald Sie diese Seite schließen, wird der Download im Hintergrund fortgesetzt.
|
||||
toastConnected: 'Verbunden mit '
|
||||
toastUpdated: yt-dlp Binärdatei aktualisiert!
|
||||
formatSelectionEnabler: Video/Audio Format auswählbar
|
||||
themeSelect: 'Modus'
|
||||
languageSelect: 'Sprache'
|
||||
overridesAnchor: Überschreibungen
|
||||
pathOverrideOption: Ausgabe-Pfad Überschreibung aktivieren
|
||||
filenameOverrideOption: Ausgabe-Dateiname Überschreibung aktivieren
|
||||
customFilename: Custom filemame (leave blank to use default)
|
||||
customPath: Benutzerdefinierter Pfad
|
||||
customArgs: Benutzerdefinierte yt-dlp Argumente aktivieren (viel Macht = viel Verantwortung)
|
||||
customArgsInput: Benutzerdefinierte yt-dlp Argumente
|
||||
rpcConnErr: Fehler beim Verbinden mit RPC Server
|
||||
splashText: Keine aktiven Downloads
|
||||
archiveTitle: Archiv
|
||||
clipboardAction: URL in Zwischenablage kopiert
|
||||
playlistCheckbox: Playlist herunterladen (es wird einige Zeit dauern, nach dem Absenden können Sie dieses Fenster schließen)
|
||||
restartAppMessage: Erfordert ein Neuladen der Seite, um wirksam zu werden
|
||||
servedFromReverseProxyCheckbox: Ist hinter einem Reverse Proxy Unterordner
|
||||
newDownloadButton: Neuer Download
|
||||
homeButtonLabel: Home
|
||||
archiveButtonLabel: Archiv
|
||||
settingsButtonLabel: Einstellungen
|
||||
rpcAuthenticationLabel: RPC Authentifizierung
|
||||
themeTogglerLabel: Modus Umschalter
|
||||
loadingLabel: Lädt...
|
||||
appTitle: App Titel
|
||||
savedTemplates: Gespeicherte Vorlage
|
||||
templatesEditor: Vorlagen Bearbeiter
|
||||
templatesEditorNameLabel: Vorlagen Name
|
||||
templatesEditorContentLabel: Vorlagen Inhalt
|
||||
logsTitle: 'Logs'
|
||||
awaitingLogs: 'Awaiting logs...'
|
||||
bulkDownload: 'Download files in a zip archive'
|
||||
french:
|
||||
urlInput: URL vidéo de YouTube ou d'un autre service pris en charge
|
||||
statusTitle: Statut
|
||||
statusReady: Prêt
|
||||
selectFormatButton: Sélectionner le format
|
||||
startButton: Démarrer
|
||||
abortAllButton: Tout arrêter
|
||||
updateBinButton: Mettre à jour l'exécutable yt-dlp
|
||||
darkThemeButton: Thème sombre
|
||||
lightThemeButton: Thème clair
|
||||
settingsAnchor: Paramètres
|
||||
serverAddressTitle: Adresse du serveur
|
||||
serverPortTitle: Port
|
||||
extractAudioCheckbox: Extraire l'audio
|
||||
noMTimeCheckbox: Ne pas définir le temps de modification du fichier
|
||||
bgReminder: Une fois que vous aurez fermé cette page, le téléchargement continuera en arrière-plan.
|
||||
toastConnected: 'Connecté à '
|
||||
toastUpdated: L'exécutable yt-dlp a été mis à jour !
|
||||
formatSelectionEnabler: Activer la sélection des formats vidéo/audio
|
||||
themeSelect: 'Thème'
|
||||
languageSelect: 'Langue'
|
||||
overridesAnchor: Remplacer
|
||||
pathOverrideOption: Activer le remplacement du chemin de sortie
|
||||
filenameOverrideOption: Activer le remplacement du nom du fichier de sortie
|
||||
customFilename: Nom de fichier personnalisé (laisser vide pour utiliser le nom par défaut)
|
||||
customPath: Chemin personnalisé
|
||||
customArgs: Activer les args personnalisés yt-dlp (grand pouvoir = grandes responsabilités)
|
||||
customArgsInput: Arguments yt-dlp personnalisés
|
||||
rpcConnErr: Erreur lors de la connexion au serveur RPC
|
||||
splashText: Aucun téléchargement actif
|
||||
archiveTitle: Archive
|
||||
clipboardAction: URL copiée dans le presse-papiers
|
||||
playlistCheckbox: Télécharger la liste de lecture (cela prendra du temps, vous pouvez fermer cette fenêtre après l'avoir validée)
|
||||
restartAppMessage: Nécessite un rechargement de la page pour prendre effet
|
||||
servedFromReverseProxyCheckbox: Est derrière un sous-dossier de proxy inverse
|
||||
notConnectedText: not connected
|
||||
settingsLabel: Settings
|
||||
newDownloadButton: New download
|
||||
homeButtonLabel: Home
|
||||
archiveButtonLabel: Archive
|
||||
settingsButtonLabel: Settings
|
||||
rpcAuthenticationLabel: RPC authentication
|
||||
themeTogglerLabel: Theme toggler
|
||||
loadingLabel: Loading...
|
||||
appTitle: Nom de l'application
|
||||
savedTemplates: Saved templates
|
||||
templatesEditor: Templates editor
|
||||
templatesEditorNameLabel: Template name
|
||||
templatesEditorContentLabel: Template content
|
||||
logsTitle: 'Logs'
|
||||
awaitingLogs: 'Awaiting logs...'
|
||||
bulkDownload: 'Download files in a zip archive'
|
||||
italian:
|
||||
urlInput: URL Video (uno per linea)
|
||||
statusTitle: Stato
|
||||
startButton: Inizia
|
||||
statusReady: Pronto
|
||||
abortAllButton: Termina tutto
|
||||
updateBinButton: Aggiorna yt-dlp
|
||||
darkThemeButton: Tema scuro
|
||||
lightThemeButton: Tema chiaro
|
||||
settingsAnchor: Impostazioni
|
||||
serverAddressTitle: Indirizzo server
|
||||
serverPortTitle: Porta
|
||||
extractAudioCheckbox: Estrai l'audio
|
||||
noMTimeCheckbox: Non impostare la proprietà "Data ultima modifica"
|
||||
bgReminder: Chiusa questa UI il download continuerà in background.
|
||||
toastConnected: 'Connesso a '
|
||||
toastUpdated: yt-dlp aggiornato con successo!
|
||||
formatSelectionEnabler: Abilita la selezione dei formati audio/video
|
||||
themeSelect: 'Tema'
|
||||
languageSelect: 'Lingua'
|
||||
overridesAnchor: Sovrascritture
|
||||
pathOverrideOption: Abilita sovrascrittura percorso di output
|
||||
filenameOverrideOption: Abilita sovrascrittura del nome del file di output
|
||||
customFilename: Custom filemame (leave blank to use default)
|
||||
customPath: Custom path
|
||||
customArgs: Enable custom yt-dlp args (great power = great responsabilities)
|
||||
customArgsInput: Custom yt-dlp arguments
|
||||
rpcConnErr: Error nella connessione al server RPC
|
||||
splashText: Nessun download attivo
|
||||
archiveTitle: Archivio
|
||||
clipboardAction: URL copiato negli appunti
|
||||
playlistCheckbox: Download playlist (richiederà tempo, puoi chiudere la finestra dopo l'inoltro)
|
||||
restartAppMessage: La finestra deve essere ricaricata perché abbia effetto
|
||||
servedFromReverseProxyCheckbox: Is behind a reverse proxy
|
||||
newDownloadButton: Nuovo download
|
||||
homeButtonLabel: Home
|
||||
archiveButtonLabel: Archive
|
||||
settingsButtonLabel: Settings
|
||||
rpcAuthenticationLabel: RPC authentication
|
||||
themeTogglerLabel: Theme toggler
|
||||
loadingLabel: Loading...
|
||||
appTitle: Titolo applicazione
|
||||
savedTemplates: Template salvati
|
||||
templatesEditor: Editor template
|
||||
templatesEditorNameLabel: Nome template
|
||||
templatesEditorContentLabel: Contentunto template
|
||||
logsTitle: 'Logs'
|
||||
awaitingLogs: 'Awaiting logs...'
|
||||
bulkDownload: 'Download files in a zip archive'
|
||||
chinese:
|
||||
urlInput: 视频 URL
|
||||
statusTitle: 状态
|
||||
statusReady: 就绪
|
||||
selectFormatButton: 选择格式
|
||||
startButton: 开始
|
||||
abortAllButton: 全部中止
|
||||
updateBinButton: 更新 yt-dlp 可执行文件
|
||||
darkThemeButton: 黑暗主题
|
||||
lightThemeButton: 明亮主题
|
||||
settingsAnchor: 设置
|
||||
serverAddressTitle: 服务器地址
|
||||
serverPortTitle: 端口
|
||||
extractAudioCheckbox: 提取音频
|
||||
noMTimeCheckbox: 不设置文件修改时间
|
||||
bgReminder: 关闭页面后,下载会继续在后台运行。
|
||||
toastConnected: '已连接到 '
|
||||
toastUpdated: 已更新 yt-dlp 可执行文件!
|
||||
formatSelectionEnabler: 启用视频/音频格式选择
|
||||
themeSelect: '主题'
|
||||
languageSelect: '语言'
|
||||
overridesAnchor: 覆盖
|
||||
pathOverrideOption: 启用输出路径覆盖
|
||||
filenameOverrideOption: 启用输出文件名覆盖
|
||||
customFilename: 自定义文件名(留空使用默认值)
|
||||
customPath: 自定义路径
|
||||
customArgs: 启用自定义 yt-dlp 参数(能力越大 = 责任越大)
|
||||
customArgsInput: 自定义 yt-dlp 参数
|
||||
rpcConnErr: 连接 RPC 服务器发生错误
|
||||
splashText: 没有正在进行的下载
|
||||
archiveTitle: 归档
|
||||
clipboardAction: 复制 URL 到剪贴板
|
||||
playlistCheckbox: 下载播放列表(可能需要一段时间,提交后可以关闭页面等待)
|
||||
restartAppMessage: 需要刷新页面才能生效
|
||||
servedFromReverseProxyCheckbox: 处于反向代理的子目录后
|
||||
newDownloadButton: 新下载
|
||||
homeButtonLabel: 主页
|
||||
archiveButtonLabel: 归档
|
||||
settingsButtonLabel: 设置
|
||||
rpcAuthenticationLabel: RPC 身份验证
|
||||
themeTogglerLabel: 主题切换
|
||||
loadingLabel: 正在加载…
|
||||
appTitle: App 标题
|
||||
savedTemplates: 保存模板
|
||||
templatesEditor: 模板编辑器
|
||||
templatesEditorNameLabel: 模板名称
|
||||
templatesEditorContentLabel: 模板内容
|
||||
logsTitle: '日志'
|
||||
awaitingLogs: '正在等待日志…'
|
||||
bulkDownload: 'Download files in a zip archive'
|
||||
spanish:
|
||||
urlInput: URL de YouTube u otro servicio compatible
|
||||
statusTitle: Estado
|
||||
startButton: Iniciar
|
||||
statusReady: Listo
|
||||
abortAllButton: Cancelar Todo
|
||||
updateBinButton: Actualizar el binario yt-dlp
|
||||
darkThemeButton: Tema oscuro
|
||||
lightThemeButton: Tema claro
|
||||
settingsAnchor: Ajustes
|
||||
serverAddressTitle: Dirección del servidor
|
||||
serverPortTitle: Puerto
|
||||
extractAudioCheckbox: Extraer audio
|
||||
noMTimeCheckbox: No guardar el tiempo de modificación del archivo
|
||||
bgReminder: Si cierras esta página, la descarga continuará en segundo plano.
|
||||
toastConnected: 'Conectado a'
|
||||
toastUpdated: ¡El binario yt-dlp está actualizado!
|
||||
formatSelectionEnabler: Habilitar la selección de formatos de video/audio
|
||||
themeSelect: 'Tema'
|
||||
languageSelect: 'Idiomas'
|
||||
overridesAnchor: Anulaciones
|
||||
pathOverrideOption: Sobreescribir en la ruta de salida
|
||||
filenameOverrideOption: Sobreescribir el nombre del fichero
|
||||
customFilename: Nombre de archivo personalizado (en blanco para usar el predeterminado)
|
||||
customPath: Ruta personalizada
|
||||
customArgs: Habilitar los argumentos yt-dlp personalizados (un gran poder conlleva una gran responsabilidad)
|
||||
customArgsInput: Argumentos yt-dlp personalizados
|
||||
rpcConnErr: Error al conectarse al servidor RPC
|
||||
splashText: No active downloads
|
||||
archiveTitle: Archive
|
||||
clipboardAction: Copied URL to clipboard
|
||||
playlistCheckbox: Download playlist (it will take time, after submitting you may even close this window)
|
||||
servedFromReverseProxyCheckbox: Is behind a reverse proxy subfolder
|
||||
newDownloadButton: New download
|
||||
homeButtonLabel: Home
|
||||
archiveButtonLabel: Archive
|
||||
settingsButtonLabel: Settings
|
||||
rpcAuthenticationLabel: RPC authentication
|
||||
themeTogglerLabel: Theme toggler
|
||||
loadingLabel: Loading...
|
||||
appTitle: App title
|
||||
savedTemplates: Saved templates
|
||||
templatesEditor: Templates editor
|
||||
templatesEditorNameLabel: Template name
|
||||
templatesEditorContentLabel: Template content
|
||||
logsTitle: 'Logs'
|
||||
awaitingLogs: 'Awaiting logs...'
|
||||
bulkDownload: 'Download files in a zip archive'
|
||||
russian:
|
||||
urlInput: URL-адрес YouTube или любого другого поддерживаемого сервиса
|
||||
statusTitle: Статус
|
||||
startButton: Начать
|
||||
statusReady: Готово
|
||||
abortAllButton: Прервать все
|
||||
updateBinButton: Обновить бинарный файл yt-dlp
|
||||
darkThemeButton: Темная тема
|
||||
lightThemeButton: Светлая тема
|
||||
settingsAnchor: Настройки
|
||||
serverAddressTitle: Адрес сервера
|
||||
serverPortTitle: Порт
|
||||
extractAudioCheckbox: Извлечь аудио
|
||||
noMTimeCheckbox: Не устанавливать время модификации файла
|
||||
bgReminder: Как только вы закроете эту страницу, загрузка продолжится в фоновом режиме.
|
||||
toastConnected: 'Подключен к '
|
||||
toastUpdated: Бинарный файл yt-dlp обновлен!
|
||||
formatSelectionEnabler: Активировать выбор видео/аудио форматов
|
||||
themeSelect: 'Тема'
|
||||
languageSelect: 'Язык'
|
||||
overridesAnchor: Переопределить
|
||||
pathOverrideOption: Активировать переопределение выходного пути
|
||||
filenameOverrideOption: Активировать переопределение имени выходного файла
|
||||
customFilename: Задать имя файла (оставьте пустым, чтобы использовать значение по умолчанию)
|
||||
customPath: Задать путь
|
||||
customArgs: Включить настраиваемые аргументы yt-dlp (большая сила = большая ответственность)
|
||||
customArgsInput: Пользовательские аргументы yt-dlp
|
||||
rpcConnErr: Ошибка при подключении к серверу RPC
|
||||
splashText: Нет активных загрузок
|
||||
archiveTitle: Архив
|
||||
clipboardAction: URL скопирован в буфер обмена
|
||||
playlistCheckbox: Download playlist (it will take time, after submitting you may even close this window)
|
||||
servedFromReverseProxyCheckbox: Is behind a reverse proxy subfolder
|
||||
newDownloadButton: New download
|
||||
homeButtonLabel: Home
|
||||
archiveButtonLabel: Archive
|
||||
settingsButtonLabel: Settings
|
||||
rpcAuthenticationLabel: RPC authentication
|
||||
themeTogglerLabel: Theme toggler
|
||||
loadingLabel: Loading...
|
||||
appTitle: App title
|
||||
savedTemplates: Saved templates
|
||||
templatesEditor: Templates editor
|
||||
templatesEditorNameLabel: Template name
|
||||
templatesEditorContentLabel: Template content
|
||||
logsTitle: 'Logs'
|
||||
awaitingLogs: 'Awaiting logs...'
|
||||
bulkDownload: 'Download files in a zip archive'
|
||||
korean:
|
||||
urlInput: YouTube나 다른 지원되는 사이트의 URL
|
||||
statusTitle: 상태
|
||||
startButton: 시작
|
||||
statusReady: 준비됨
|
||||
abortAllButton: 모두 중단
|
||||
updateBinButton: yt-dlp 바이너리 업데이트
|
||||
darkThemeButton: 다크 모드
|
||||
lightThemeButton: 라이트 모드
|
||||
settingsAnchor: 설정
|
||||
serverAddressTitle: 서버 주소
|
||||
serverPortTitle: Port
|
||||
extractAudioCheckbox: 오디오 추출
|
||||
noMTimeCheckbox: 파일 수정 시간을 설정하지 않음
|
||||
bgReminder: 이 페이지를 닫아도 백그라운드에서 다운로드가 계속됩니다
|
||||
toastConnected: '다음으로 연결됨 '
|
||||
toastUpdated: yt-dlp 바이너리를 업데이트 했습니다
|
||||
formatSelectionEnabler: 비디오/오디오 포멧 옵션 표시
|
||||
themeSelect: 'Theme'
|
||||
languageSelect: 'Language'
|
||||
overridesAnchor: Overrides
|
||||
pathOverrideOption: Enable output path overriding
|
||||
filenameOverrideOption: Enable output file name overriding
|
||||
customFilename: Custom filemame (leave blank to use default)
|
||||
customPath: Custom path
|
||||
customArgs: Enable custom yt-dlp args (great power = great responsabilities)
|
||||
customArgsInput: Custom yt-dlp arguments
|
||||
rpcConnErr: Error while conencting to RPC server
|
||||
splashText: No active downloads
|
||||
archiveTitle: Archive
|
||||
clipboardAction: Copied URL to clipboard
|
||||
playlistCheckbox: Download playlist (it will take time, after submitting you may even close this window)
|
||||
servedFromReverseProxyCheckbox: Is behind a reverse proxy subfolder
|
||||
newDownloadButton: New download
|
||||
homeButtonLabel: Home
|
||||
archiveButtonLabel: Archive
|
||||
settingsButtonLabel: Settings
|
||||
rpcAuthenticationLabel: RPC authentication
|
||||
themeTogglerLabel: Theme toggler
|
||||
loadingLabel: Loading...
|
||||
appTitle: App title
|
||||
savedTemplates: Saved templates
|
||||
templatesEditor: Templates editor
|
||||
templatesEditorNameLabel: Template name
|
||||
templatesEditorContentLabel: Template content
|
||||
logsTitle: 'Logs'
|
||||
awaitingLogs: 'Awaiting logs...'
|
||||
bulkDownload: 'Download files in a zip archive'
|
||||
japanese:
|
||||
urlInput: YouTubeまたはサポート済み動画のURL
|
||||
statusTitle: 状態
|
||||
statusReady: 準備
|
||||
selectFormatButton: フォーマット選択
|
||||
startButton: 開始
|
||||
abortAllButton: すべて中止
|
||||
updateBinButton: yt-dlp更新
|
||||
darkThemeButton: 黒テーマ
|
||||
lightThemeButton: 白テーマ
|
||||
settingsAnchor: 設定
|
||||
serverAddressTitle: サーバーアドレス
|
||||
serverPortTitle: ポート番号
|
||||
extractAudioCheckbox: 音質
|
||||
noMTimeCheckbox: ファイル時間の修正をしない
|
||||
bgReminder: このページを閉じてもバックグラウンドでダウンロードを続けます
|
||||
toastConnected: '接続中 '
|
||||
toastUpdated: yt-dlpを更新しました!
|
||||
formatSelectionEnabler: 選択可能な動画/音源
|
||||
themeSelect: 'テーマ'
|
||||
languageSelect: '言語'
|
||||
overridesAnchor: 上書き
|
||||
pathOverrideOption: 保存するディレクトリ
|
||||
filenameOverrideOption: ファイル名の上書き
|
||||
customFilename: (空白の場合は元のファイル名)
|
||||
customPath: 保存先
|
||||
customArgs: yt-dlpのオプションの有効化 (最適設定にする場合)
|
||||
customArgsInput: yt-dlpのオプション
|
||||
rpcConnErr: Error while conencting to RPC server
|
||||
splashText: No active downloads
|
||||
archiveTitle: Archive
|
||||
clipboardAction: Copied URL to clipboard
|
||||
playlistCheckbox: Download playlist (it will take time, after submitting you may even close this window)
|
||||
servedFromReverseProxyCheckbox: Is behind a reverse proxy subfolder
|
||||
newDownloadButton: New download
|
||||
homeButtonLabel: Home
|
||||
archiveButtonLabel: Archive
|
||||
settingsButtonLabel: Settings
|
||||
rpcAuthenticationLabel: RPC authentication
|
||||
themeTogglerLabel: Theme toggler
|
||||
loadingLabel: Loading...
|
||||
appTitle: App title
|
||||
savedTemplates: Saved templates
|
||||
templatesEditor: Templates editor
|
||||
templatesEditorNameLabel: Template name
|
||||
templatesEditorContentLabel: Template content
|
||||
logsTitle: 'Logs'
|
||||
awaitingLogs: 'Awaiting logs...'
|
||||
bulkDownload: 'Download files in a zip archive'
|
||||
catalan:
|
||||
urlInput: URL de YouTube o d'un altre servei compatible
|
||||
statusTitle: Estat
|
||||
startButton: Iniciar
|
||||
statusReady: Llest
|
||||
abortAllButton: Cancel·lar Tot
|
||||
updateBinButton: Actualitzar el binari yt-dlp
|
||||
darkThemeButton: Tema fosc
|
||||
lightThemeButton: Tema clar
|
||||
settingsAnchor: Configuració
|
||||
serverAddressTitle: Direcció del servidor
|
||||
serverPortTitle: Port
|
||||
extractAudioCheckbox: Extreure àudio
|
||||
noMTimeCheckbox: No guardar el temps de modificació de l'arxiu
|
||||
bgReminder: Si tanques aquesta pàgina, la descàrrega continuarà en segon pla.
|
||||
toastConnected: 'Connectat a'
|
||||
toastUpdated: El binari yt-dlp està actualitzat!
|
||||
formatSelectionEnabler: Habilitar la selecció de formats de vídeo/àudio
|
||||
themeSelect: 'Tema'
|
||||
languageSelect: 'Idiomes'
|
||||
overridesAnchor: Anul·lacions
|
||||
pathOverrideOption: Sobreescriure en la ruta de sortida
|
||||
filenameOverrideOption: Sobreescriure el nom del fitxer
|
||||
customFilename: Nom d'arxiu personalitzat (en blanc per utilitzar el predeterminat)
|
||||
customPath: Ruta personalitzada
|
||||
customArgs: Habilitar els arguments yt-dlp personalitzats (un gran poder comporta una gran responsabilitat)
|
||||
customArgsInput: Arguments yt-dlp personalitzats
|
||||
rpcConnErr: Error en connectar-se al servidor RPC
|
||||
splashText: No active downloads
|
||||
archiveTitle: Archive
|
||||
clipboardAction: Copied URL to clipboard
|
||||
playlistCheckbox: Download playlist (it will take time, after submitting you may even close this window)
|
||||
servedFromReverseProxyCheckbox: Is behind a reverse proxy subfolder
|
||||
newDownloadButton: New download
|
||||
homeButtonLabel: Home
|
||||
archiveButtonLabel: Archive
|
||||
settingsButtonLabel: Settings
|
||||
rpcAuthenticationLabel: RPC authentication
|
||||
themeTogglerLabel: Theme toggler
|
||||
loadingLabel: Loading...
|
||||
appTitle: App title
|
||||
savedTemplates: Saved templates
|
||||
templatesEditor: Templates editor
|
||||
templatesEditorNameLabel: Template name
|
||||
templatesEditorContentLabel: Template content
|
||||
logsTitle: 'Logs'
|
||||
awaitingLogs: 'Awaiting logs...'
|
||||
bulkDownload: 'Download files in a zip archive'
|
||||
ukrainian:
|
||||
urlInput: URL-адреса YouTube або будь-якого іншого підтримуваного сервісу
|
||||
statusTitle: Статус
|
||||
startButton: Почати
|
||||
statusReady: Готово
|
||||
abortAllButton: Перервати все
|
||||
updateBinButton: Оновити бінарний файл yt-dlp
|
||||
darkThemeButton: Темна тема
|
||||
lightThemeButton: Світла тема
|
||||
settingsAnchor: Налаштування
|
||||
serverAddressTitle: Адреса сервера
|
||||
serverPortTitle: Порт
|
||||
extractAudioCheckbox: Витягти аудіо
|
||||
noMTimeCheckbox: Не встановлювати час модифікації файлу
|
||||
bgReminder: Як тільки ви закриєте цю сторінку, завантаження продовжиться у фоновому режимі.
|
||||
toastConnected: 'Підключений до '
|
||||
toastUpdated: Бінарний файл yt-dlp оновлено!
|
||||
formatSelectionEnabler: Активувати вибір відео/аудіо форматів
|
||||
themeSelect: 'Тема'
|
||||
languageSelect: 'Мова'
|
||||
overridesAnchor: Перевизначити
|
||||
pathOverrideOption: Активувати перевизначення вихідного шляху
|
||||
filenameOverrideOption: Активувати перевизначення імені вихідного файлу
|
||||
customFilename: Введіть ім'я файлу (залишіть порожнім, щоб використовувати значення за замовчуванням)
|
||||
customPath: Задати шлях
|
||||
customArgs: Включити аргументи, що настроюються yt-dlp (велика сила = велика відповідальність)
|
||||
customArgsInput: Користувальницькі аргументи yt-dlp
|
||||
rpcConnErr: Помилка при підключенні до сервера RPC
|
||||
splashText: Немає активних завантажень
|
||||
archiveTitle: Архів
|
||||
clipboardAction: URL скопійовано в буфер обміну
|
||||
playlistCheckbox: Download playlist (it will take time, after submitting you may even close this window)
|
||||
servedFromReverseProxyCheckbox: Is behind a reverse proxy subfolder
|
||||
newDownloadButton: New download
|
||||
homeButtonLabel: Home
|
||||
archiveButtonLabel: Archive
|
||||
settingsButtonLabel: Settings
|
||||
rpcAuthenticationLabel: RPC authentication
|
||||
themeTogglerLabel: Theme toggler
|
||||
loadingLabel: Loading...
|
||||
appTitle: App title
|
||||
savedTemplates: Saved templates
|
||||
templatesEditor: Templates editor
|
||||
templatesEditorNameLabel: Template name
|
||||
templatesEditorContentLabel: Template content
|
||||
logsTitle: 'Logs'
|
||||
awaitingLogs: 'Awaiting logs...'
|
||||
bulkDownload: 'Download files in a zip archive'
|
||||
polish:
|
||||
urlInput: Adres URL YouTube lub innej obsługiwanej usługi
|
||||
statusTitle: Status
|
||||
startButton: Początek
|
||||
statusReady: Gotowy
|
||||
abortAllButton: Anuluj wszystko
|
||||
updateBinButton: Zaktualizuj plik binarny yt-dlp
|
||||
darkThemeButton: Ciemny motyw
|
||||
lightThemeButton: Światło motyw
|
||||
settingsAnchor: Ustawienia
|
||||
serverAddressTitle: Adres serwera
|
||||
serverPortTitle: Port
|
||||
extractAudioCheckbox: Wyodrębnij dźwięk
|
||||
noMTimeCheckbox: Nie ustawiaj czasu modyfikacji pliku
|
||||
bgReminder: Po zamknięciu tej strony pobieranie będzie kontynuowane w tle.
|
||||
toastConnected: 'Połączony z '
|
||||
toastUpdated: Zaktualizowano plik binarny yt-dlp!
|
||||
formatSelectionEnabler: Aktywuj wybór formatów wideo/audio
|
||||
themeSelect: 'Motyw'
|
||||
languageSelect: 'Język'
|
||||
overridesAnchor: Przedefiniuj
|
||||
pathOverrideOption: Aktywuj zastąpienie ścieżki źródłowej
|
||||
filenameOverrideOption: Aktywuj zastępowanie nazwy pliku źródłowego
|
||||
customFilename: Wprowadź nazwę pliku (pozostaw puste, aby użyć nazwy domyślnej)
|
||||
customPath: Ustaw ścieżkę
|
||||
customArgs: Uwzględnij konfigurowalne argumenty yt-dlp (wielka moc = wielka odpowiedzialność)
|
||||
customArgsInput: Niestandardowe argumenty yt-dlp
|
||||
rpcConnErr: Wystąpił błąd podczas łączenia z serwerem RPC
|
||||
splashText: Brak aktywnych pobrań
|
||||
archiveTitle: Archiwum
|
||||
clipboardAction: Adres URL zostanie skopiowany do schowka
|
||||
playlistCheckbox: Download playlist (it will take time, after submitting you may even close this window)
|
||||
servedFromReverseProxyCheckbox: Is behind a reverse proxy subfolder
|
||||
newDownloadButton: New download
|
||||
homeButtonLabel: Home
|
||||
archiveButtonLabel: Archive
|
||||
settingsButtonLabel: Settings
|
||||
rpcAuthenticationLabel: RPC authentication
|
||||
themeTogglerLabel: Theme toggler
|
||||
loadingLabel: Loading...
|
||||
appTitle: App title
|
||||
savedTemplates: Saved templates
|
||||
templatesEditor: Templates editor
|
||||
templatesEditorNameLabel: Template name
|
||||
templatesEditorContentLabel: Template content
|
||||
logsTitle: 'Logs'
|
||||
awaitingLogs: 'Awaiting logs...'
|
||||
bulkDownload: 'Download files in a zip archive'
|
||||
catalan: ca.yaml
|
||||
german: de.yaml
|
||||
english: en_US.yaml
|
||||
spanish: es.yaml
|
||||
french: fr.yaml
|
||||
italian: it_IT.yaml
|
||||
japanese: ja.yaml
|
||||
korean: ko.yaml
|
||||
polish: pl.yaml
|
||||
portuguese-br: pt_BR.yaml
|
||||
russian: ru.yaml
|
||||
swedish: sv.yaml
|
||||
ukrainian: uk.yaml
|
||||
chinese: zh_CN.yaml
|
||||
hungarian: hu.yaml
|
||||
80
frontend/src/assets/i18n/ca.yaml
Normal file
80
frontend/src/assets/i18n/ca.yaml
Normal file
@@ -0,0 +1,80 @@
|
||||
keys:
|
||||
urlInput: URL de YouTube o d'un altre servei compatible
|
||||
statusTitle: Estat
|
||||
startButton: Iniciar
|
||||
statusReady: Llest
|
||||
abortAllButton: Cancel·lar Tot
|
||||
updateBinButton: Actualitzar el binari yt-dlp
|
||||
darkThemeButton: Tema fosc
|
||||
lightThemeButton: Tema clar
|
||||
settingsAnchor: Configuració
|
||||
serverAddressTitle: Direcció del servidor
|
||||
serverPortTitle: Port
|
||||
extractAudioCheckbox: Extreure àudio
|
||||
noMTimeCheckbox: No guardar el temps de modificació de l'arxiu
|
||||
bgReminder: Si tanques aquesta pàgina, la descàrrega continuarà en segon pla.
|
||||
toastConnected: 'Connectat a'
|
||||
toastUpdated: El binari yt-dlp està actualitzat!
|
||||
formatSelectionEnabler: Habilitar la selecció de formats de vídeo/àudio
|
||||
themeSelect: 'Tema'
|
||||
languageSelect: 'Idiomes'
|
||||
overridesAnchor: Anul·lacions
|
||||
pathOverrideOption: Sobreescriure en la ruta de sortida
|
||||
filenameOverrideOption: Sobreescriure el nom del fitxer
|
||||
autoFileExtensionOption: Afegeix l'extensió de fitxer automàticament
|
||||
customFilename: Nom d'arxiu personalitzat (en blanc per utilitzar el predeterminat)
|
||||
customPath: Ruta personalitzada
|
||||
customArgs: Habilitar els arguments yt-dlp personalitzats (un gran poder comporta una gran responsabilitat)
|
||||
customArgsInput: Arguments yt-dlp personalitzats
|
||||
rpcConnErr: Error en connectar-se al servidor RPC
|
||||
splashText: No active downloads
|
||||
archiveTitle: Archive
|
||||
clipboardAction: Copied URL to clipboard
|
||||
playlistCheckbox: Download playlist (it will take time, after submitting you may even close this window)
|
||||
servedFromReverseProxyCheckbox: Is behind a reverse proxy subfolder
|
||||
newDownloadButton: New download
|
||||
homeButtonLabel: Home
|
||||
archiveButtonLabel: Archive
|
||||
settingsButtonLabel: Settings
|
||||
rpcAuthenticationLabel: RPC authentication
|
||||
themeTogglerLabel: Theme toggler
|
||||
loadingLabel: Loading...
|
||||
appTitle: App title
|
||||
savedTemplates: Saved templates
|
||||
templatesEditor: Templates editor
|
||||
templatesEditorNameLabel: Template name
|
||||
templatesEditorContentLabel: Template content
|
||||
logsTitle: 'Logs'
|
||||
awaitingLogs: 'Awaiting logs...'
|
||||
bulkDownload: 'Download files in a zip archive'
|
||||
templatesReloadInfo: To register a new template it might need a page reload.
|
||||
livestreamURLInput: Livestream URL
|
||||
livestreamStatusWaiting: Waiting/Wait start
|
||||
livestreamStatusDownloading: Downloading
|
||||
livestreamStatusCompleted: Completed
|
||||
livestreamStatusErrored: Errored
|
||||
livestreamStatusUnknown: Unknown
|
||||
livestreamNoMonitoring: No livestreams monitored
|
||||
livestreamDownloadInfo: |
|
||||
This will monitor yet to start livestream. Each process will be executed with --wait-for-video 10.
|
||||
If an already started livestream is provided it will be still downloaded but its progress will not be tracked.
|
||||
Once started the livestream will be migrated to the downloads page.
|
||||
livestreamExperimentalWarning: This feature is still experimental. Something might break!
|
||||
accentSelect: 'Accent'
|
||||
urlBase: URL base, for reverse proxy support (subdir), defaults to empty
|
||||
rpcPollingTimeTitle: RPC polling time
|
||||
rpcPollingTimeDescription: A lower interval results in higher CPU usage (server and client side)
|
||||
generalDownloadSettings: 'Ajustes generales de descarga'
|
||||
deleteCookies: Delete Cookies
|
||||
noFilesFound: 'No Files Found'
|
||||
tableView: 'Table View'
|
||||
deleteSelected: 'Delete selected'
|
||||
subscriptionsButtonLabel: 'Subscriptions'
|
||||
subscriptionsEmptyLabel: 'No subscriptions'
|
||||
subscriptionsURLInput: 'Channel URL'
|
||||
subscriptionsInfo: |
|
||||
Subscribes to a defined channel. Only the last video will be downloaded.
|
||||
The monitor job will be scheduled/triggered by a defined cron expression (defaults to every 5 minutes if left blank).
|
||||
cronExpressionLabel: 'Cron expression'
|
||||
editButtonLabel: 'Edit'
|
||||
newSubscriptionButton: New subscription
|
||||
82
frontend/src/assets/i18n/de.yaml
Normal file
82
frontend/src/assets/i18n/de.yaml
Normal file
@@ -0,0 +1,82 @@
|
||||
keys:
|
||||
urlInput: Video URL
|
||||
statusTitle: Status
|
||||
statusReady: Bereit
|
||||
selectFormatButton: Format auswählen
|
||||
startButton: Start
|
||||
abortAllButton: Alle Abbrechen
|
||||
updateBinButton: yt-dlp Binärdatei aktualisieren
|
||||
darkThemeButton: Dunkler Modus
|
||||
lightThemeButton: Heller Modus
|
||||
settingsAnchor: Einstellungen
|
||||
serverAddressTitle: Adresse des Servers
|
||||
serverPortTitle: Port
|
||||
extractAudioCheckbox: Audio extrahieren
|
||||
noMTimeCheckbox: Datei-Änderungszeitpunkt nicht festlegen
|
||||
bgReminder: Sobald Sie diese Seite schließen, wird der Download im Hintergrund fortgesetzt.
|
||||
toastConnected: 'Verbunden mit '
|
||||
toastUpdated: yt-dlp Binärdatei aktualisiert!
|
||||
formatSelectionEnabler: Video/Audio Format auswählbar
|
||||
themeSelect: 'Modus'
|
||||
languageSelect: 'Sprache'
|
||||
overridesAnchor: Überschreibungen
|
||||
pathOverrideOption: Ausgabe-Pfad Überschreibung aktivieren
|
||||
filenameOverrideOption: Ausgabe-Dateiname Überschreibung aktivieren
|
||||
autoFileExtensionOption: Dateierweiterung automatisch hinzufügen
|
||||
customFilename: Benutzerdefinierter Dateiname (Leer lassen um Standardwert zu nutzen)
|
||||
customPath: Benutzerdefinierter Pfad
|
||||
customArgs: Benutzerdefinierte yt-dlp Argumente aktivieren (Auf viel Macht folgt große Verantwortung)
|
||||
customArgsInput: Benutzerdefinierte yt-dlp Argumente
|
||||
rpcConnErr: Fehler beim Verbinden mit RPC Server
|
||||
splashText: Keine aktiven Downloads
|
||||
archiveTitle: Archiv
|
||||
clipboardAction: URL in Zwischenablage kopiert
|
||||
playlistCheckbox: Playlist herunterladen (es wird einige Zeit dauern, nach dem Absenden können Sie dieses Fenster schließen)
|
||||
restartAppMessage: Erfordert ein Neuladen der Seite, um wirksam zu werden
|
||||
servedFromReverseProxyCheckbox: Ist hinter einem Reverse Proxy Unterordner
|
||||
newDownloadButton: Neuer Download
|
||||
homeButtonLabel: Home
|
||||
archiveButtonLabel: Archiv
|
||||
settingsButtonLabel: Einstellungen
|
||||
rpcAuthenticationLabel: RPC Authentifizierung
|
||||
themeTogglerLabel: Modus Umschalter
|
||||
loadingLabel: Lädt...
|
||||
appTitle: App Titel
|
||||
savedTemplates: Gespeicherte Vorlage
|
||||
templatesEditor: Vorlageneditor
|
||||
templatesEditorNameLabel: Vorlagen Name
|
||||
templatesEditorContentLabel: Vorlagen Inhalt
|
||||
logsTitle: 'Logausgabe'
|
||||
awaitingLogs: 'Warte auf Log ...'
|
||||
bulkDownload: 'Alles in einem ZIP-Archiv herunterladen'
|
||||
rpcPollingTimeTitle: RPC-Abfragezeit
|
||||
rpcPollingTimeDescription: Ein kürzerer Intervall führt zu einer höheren CPU-Auslastung (Server- und Clientseite)
|
||||
templatesReloadInfo: Um eine neue Vorlage zu registrieren, muss die Seite möglicherweise neu geladen werden.
|
||||
livestreamURLInput: Livestream URL
|
||||
livestreamStatusWaiting: Warte auf Start
|
||||
livestreamStatusDownloading: Herunterladen
|
||||
livestreamStatusCompleted: Abgeschlossen
|
||||
livestreamStatusErrored: Fehlerhaft
|
||||
livestreamStatusUnknown: Status unbekannt
|
||||
livestreamNoMonitoring: Aktuell wird kein Livestream überwacht
|
||||
livestreamDownloadInfo: |
|
||||
Damit wird der noch nicht gestartete Livestream überwacht. Jeder Prozess wird mit --wait-for-video 10 ausgeführt.
|
||||
Wenn ein bereits gestarteter Livestream vorhanden ist, wird er zwar heruntergeladen, aber sein Fortschritt wird nicht verfolgt.
|
||||
Sobald der Livestream gestartet ist, wird er auf der Download-Seite angezeigt.
|
||||
livestreamExperimentalWarning: Dieses Feature ist aktuell noch experimentell, sei vorsichtig, denn es könnte sein, dass etwas nicht genau funktioniert!
|
||||
accentSelect: 'Farbtöne'
|
||||
urlBase: URL-Basis für Reverse-Proxy-Unterstützung (Unterverzeichnis), standardmäßig leer
|
||||
generalDownloadSettings: 'Allgemeine Download Einstellungen'
|
||||
deleteCookies: 'Cookies löschen'
|
||||
noFilesFound: 'Keine Dateien gefunden'
|
||||
tableView: 'Tabellenansicht'
|
||||
deleteSelected: 'Ausgewählte löschen'
|
||||
subscriptionsButtonLabel: 'Subscriptions'
|
||||
subscriptionsEmptyLabel: 'No subscriptions'
|
||||
subscriptionsURLInput: 'Channel URL'
|
||||
subscriptionsInfo: |
|
||||
Subscribes to a defined channel. Only the last video will be downloaded.
|
||||
The monitor job will be scheduled/triggered by a defined cron expression (defaults to every 5 minutes if left blank).
|
||||
cronExpressionLabel: 'Cron expression'
|
||||
editButtonLabel: 'Edit'
|
||||
newSubscriptionButton: New subscription
|
||||
83
frontend/src/assets/i18n/en_US.yaml
Normal file
83
frontend/src/assets/i18n/en_US.yaml
Normal file
@@ -0,0 +1,83 @@
|
||||
keys:
|
||||
urlInput: Video URL (one per line)
|
||||
statusTitle: Status
|
||||
statusReady: Ready
|
||||
selectFormatButton: Select format
|
||||
startButton: Start
|
||||
abortAllButton: Abort All
|
||||
updateBinButton: Update yt-dlp binary
|
||||
darkThemeButton: Dark theme
|
||||
lightThemeButton: Light theme
|
||||
settingsAnchor: Settings
|
||||
serverAddressTitle: Server address
|
||||
serverPortTitle: Port
|
||||
extractAudioCheckbox: Extract audio
|
||||
noMTimeCheckbox: Don't set file modification time
|
||||
bgReminder: Once you close this page the download will continue in the background.
|
||||
toastConnected: 'Connected to '
|
||||
toastUpdated: Updated yt-dlp binary!
|
||||
formatSelectionEnabler: Enable video/audio formats selection
|
||||
themeSelect: 'Theme'
|
||||
languageSelect: 'Language'
|
||||
overridesAnchor: Overrides
|
||||
pathOverrideOption: Enable output path overriding
|
||||
filenameOverrideOption: Enable output file name overriding
|
||||
autoFileExtensionOption: Automatically add file extension
|
||||
customFilename: Custom filename (leave blank to use default)
|
||||
customPath: Custom path
|
||||
customArgs: Enable custom yt-dlp args (great power = great responsibilities)
|
||||
customArgsInput: Custom yt-dlp arguments
|
||||
rpcConnErr: Error while connecting to RPC server
|
||||
splashText: No active downloads
|
||||
archiveTitle: Archive
|
||||
clipboardAction: Copied URL to clipboard
|
||||
playlistCheckbox: Download playlist
|
||||
restartAppMessage: Needs a page reload to take effect
|
||||
servedFromReverseProxyCheckbox: Is behind a reverse proxy
|
||||
urlBase: URL base, for reverse proxy support (subdir), defaults to empty
|
||||
newDownloadButton: New download
|
||||
homeButtonLabel: Home
|
||||
archiveButtonLabel: Archive
|
||||
settingsButtonLabel: Settings
|
||||
rpcAuthenticationLabel: RPC authentication
|
||||
themeTogglerLabel: Theme toggler
|
||||
loadingLabel: Loading...
|
||||
appTitle: App title
|
||||
savedTemplates: Saved templates
|
||||
templatesEditor: Templates editor
|
||||
templatesEditorNameLabel: Template name
|
||||
templatesEditorContentLabel: Template content
|
||||
logsTitle: 'Logs'
|
||||
awaitingLogs: 'Awaiting logs...'
|
||||
bulkDownload: 'Download files in a zip archive'
|
||||
rpcPollingTimeTitle: RPC polling time
|
||||
rpcPollingTimeDescription: A lower interval results in higher CPU usage (server and client side)
|
||||
templatesReloadInfo: To register a new template it might need a page reload.
|
||||
livestreamURLInput: Livestream URL
|
||||
livestreamStatusWaiting: Waiting/Wait start
|
||||
livestreamStatusDownloading: Downloading
|
||||
livestreamStatusCompleted: Completed
|
||||
livestreamStatusErrored: Errored
|
||||
livestreamStatusUnknown: Unknown
|
||||
livestreamNoMonitoring: No livestreams monitored
|
||||
livestreamDownloadInfo: |
|
||||
This will monitor yet to start livestream. Each process will be executed with --wait-for-video 10.
|
||||
If an already started livestream is provided it will be still downloaded but its progress will not be tracked.
|
||||
Once started the livestream will be migrated to the downloads page.
|
||||
livestreamExperimentalWarning: This feature is still experimental. Something might break!
|
||||
accentSelect: 'Accent'
|
||||
generalDownloadSettings: 'General Download Settings'
|
||||
deleteCookies: Delete Cookies
|
||||
noFilesFound: 'No Files Found'
|
||||
tableView: 'Table View'
|
||||
deleteSelected: 'Delete selected'
|
||||
subscriptionsButtonLabel: 'Subscriptions'
|
||||
subscriptionsEmptyLabel: 'No subscriptions'
|
||||
subscriptionsURLInput: 'Channel URL'
|
||||
subscriptionsInfo: |
|
||||
Subscribes to a defined channel. Only the last video will be downloaded.
|
||||
The monitor job will be scheduled/triggered by a defined cron expression (defaults to every 5 minutes if left blank).
|
||||
cronExpressionLabel: 'Cron expression'
|
||||
editButtonLabel: 'Edit'
|
||||
newSubscriptionButton: New subscription
|
||||
clearCompletedButton: 'Clear completed'
|
||||
80
frontend/src/assets/i18n/es.yaml
Normal file
80
frontend/src/assets/i18n/es.yaml
Normal file
@@ -0,0 +1,80 @@
|
||||
keys:
|
||||
urlInput: URL de YouTube u otro servicio compatible
|
||||
statusTitle: Estado
|
||||
startButton: Iniciar
|
||||
statusReady: Listo
|
||||
abortAllButton: Cancelar Todo
|
||||
updateBinButton: Actualizar el binario yt-dlp
|
||||
darkThemeButton: Tema oscuro
|
||||
lightThemeButton: Tema claro
|
||||
settingsAnchor: Ajustes
|
||||
serverAddressTitle: Dirección del servidor
|
||||
serverPortTitle: Puerto
|
||||
extractAudioCheckbox: Extraer audio
|
||||
noMTimeCheckbox: No guardar el tiempo de modificación del archivo
|
||||
bgReminder: Si cierras esta página, la descarga continuará en segundo plano.
|
||||
toastConnected: 'Conectado a'
|
||||
toastUpdated: ¡El binario yt-dlp está actualizado!
|
||||
formatSelectionEnabler: Habilitar la selección de formatos de video/audio
|
||||
themeSelect: 'Tema'
|
||||
languageSelect: 'Idiomas'
|
||||
overridesAnchor: Anulaciones
|
||||
pathOverrideOption: Sobreescribir en la ruta de salida
|
||||
filenameOverrideOption: Sobreescribir el nombre del fichero
|
||||
autoFileExtensionOption: Agregar extensión de archivo automáticamente
|
||||
customFilename: Nombre de archivo personalizado (en blanco para usar el predeterminado)
|
||||
customPath: Ruta personalizada
|
||||
customArgs: Habilitar los argumentos yt-dlp personalizados (un gran poder conlleva una gran responsabilidad)
|
||||
customArgsInput: Argumentos yt-dlp personalizados
|
||||
rpcConnErr: Error al conectarse al servidor RPC
|
||||
splashText: No active downloads
|
||||
archiveTitle: Archive
|
||||
clipboardAction: Copied URL to clipboard
|
||||
playlistCheckbox: Download playlist (it will take time, after submitting you may even close this window)
|
||||
servedFromReverseProxyCheckbox: Is behind a reverse proxy subfolder
|
||||
newDownloadButton: New download
|
||||
homeButtonLabel: Home
|
||||
archiveButtonLabel: Archive
|
||||
settingsButtonLabel: Settings
|
||||
rpcAuthenticationLabel: RPC authentication
|
||||
themeTogglerLabel: Theme toggler
|
||||
loadingLabel: Loading...
|
||||
appTitle: App title
|
||||
savedTemplates: Saved templates
|
||||
templatesEditor: Templates editor
|
||||
templatesEditorNameLabel: Template name
|
||||
templatesEditorContentLabel: Template content
|
||||
logsTitle: 'Logs'
|
||||
awaitingLogs: 'Awaiting logs...'
|
||||
bulkDownload: 'Download files in a zip archive'
|
||||
templatesReloadInfo: To register a new template it might need a page reload.
|
||||
livestreamURLInput: Livestream URL
|
||||
livestreamStatusWaiting: Waiting/Wait start
|
||||
livestreamStatusDownloading: Downloading
|
||||
livestreamStatusCompleted: Completed
|
||||
livestreamStatusErrored: Errored
|
||||
livestreamStatusUnknown: Unknown
|
||||
livestreamNoMonitoring: No livestreams monitored
|
||||
livestreamDownloadInfo: |
|
||||
This will monitor yet to start livestream. Each process will be executed with --wait-for-video 10.
|
||||
If an already started livestream is provided it will be still downloaded but its progress will not be tracked.
|
||||
Once started the livestream will be migrated to the downloads page.
|
||||
livestreamExperimentalWarning: This feature is still experimental. Something might break!
|
||||
accentSelect: 'Accent'
|
||||
urlBase: URL base, for reverse proxy support (subdir), defaults to empty
|
||||
rpcPollingTimeTitle: RPC polling time
|
||||
rpcPollingTimeDescription: A lower interval results in higher CPU usage (server and client side)
|
||||
generalDownloadSettings: 'General Download Settings'
|
||||
deleteCookies: Delete Cookies
|
||||
noFilesFound: 'No Files Found'
|
||||
tableView: 'Table View'
|
||||
deleteSelected: 'Delete selected'
|
||||
subscriptionsButtonLabel: 'Subscriptions'
|
||||
subscriptionsEmptyLabel: 'No subscriptions'
|
||||
subscriptionsURLInput: 'Channel URL'
|
||||
subscriptionsInfo: |
|
||||
Subscribes to a defined channel. Only the last video will be downloaded.
|
||||
The monitor job will be scheduled/triggered by a defined cron expression (defaults to every 5 minutes if left blank).
|
||||
cronExpressionLabel: 'Cron expression'
|
||||
editButtonLabel: 'Edit'
|
||||
newSubscriptionButton: New subscription
|
||||
84
frontend/src/assets/i18n/fr.yaml
Normal file
84
frontend/src/assets/i18n/fr.yaml
Normal file
@@ -0,0 +1,84 @@
|
||||
keys:
|
||||
urlInput: URL vidéo de YouTube ou d'un autre service pris en charge
|
||||
statusTitle: Statut
|
||||
statusReady: Prêt
|
||||
selectFormatButton: Sélectionner le format
|
||||
startButton: Démarrer
|
||||
abortAllButton: Tout arrêter
|
||||
updateBinButton: Mettre à jour l'exécutable yt-dlp
|
||||
darkThemeButton: Thème sombre
|
||||
lightThemeButton: Thème clair
|
||||
settingsAnchor: Paramètres
|
||||
serverAddressTitle: Adresse du serveur
|
||||
serverPortTitle: Port
|
||||
extractAudioCheckbox: Extraire l'audio
|
||||
noMTimeCheckbox: Ne pas définir le temps de modification du fichier
|
||||
bgReminder: Une fois que vous aurez fermé cette page, le téléchargement continuera en arrière-plan.
|
||||
toastConnected: 'Connecté à '
|
||||
toastUpdated: L'exécutable yt-dlp a été mis à jour !
|
||||
formatSelectionEnabler: Activer la sélection des formats vidéo/audio
|
||||
themeSelect: 'Thème'
|
||||
languageSelect: 'Langue'
|
||||
overridesAnchor: Remplacer
|
||||
pathOverrideOption: Activer le remplacement du chemin de sortie
|
||||
filenameOverrideOption: Activer le remplacement du nom du fichier de sortie
|
||||
autoFileExtensionOption: Ajouter automatiquement l'extension de fichier
|
||||
customFilename: Nom de fichier personnalisé (laisser vide pour utiliser le nom par défaut)
|
||||
customPath: Chemin personnalisé
|
||||
customArgs: Activer les args personnalisés yt-dlp (grand pouvoir = grandes responsabilités)
|
||||
customArgsInput: Arguments yt-dlp personnalisés
|
||||
rpcConnErr: Erreur lors de la connexion au serveur RPC
|
||||
splashText: Aucun téléchargement actif
|
||||
archiveTitle: Archive
|
||||
clipboardAction: URL copiée dans le presse-papiers
|
||||
playlistCheckbox: Télécharger la liste de lecture (cela prendra du temps, vous pouvez fermer cette fenêtre après l'avoir validée)
|
||||
restartAppMessage: Nécessite un rechargement de la page pour prendre effet
|
||||
servedFromReverseProxyCheckbox: Est derrière un sous-dossier de proxy inverse
|
||||
notConnectedText: not connected
|
||||
settingsLabel: Settings
|
||||
newDownloadButton: New download
|
||||
homeButtonLabel: Home
|
||||
archiveButtonLabel: Archive
|
||||
settingsButtonLabel: Settings
|
||||
rpcAuthenticationLabel: RPC authentication
|
||||
themeTogglerLabel: Theme toggler
|
||||
loadingLabel: Loading...
|
||||
appTitle: Nom de l'application
|
||||
savedTemplates: Saved templates
|
||||
templatesEditor: Templates editor
|
||||
templatesEditorNameLabel: Template name
|
||||
templatesEditorContentLabel: Template content
|
||||
logsTitle: 'Logs'
|
||||
awaitingLogs: 'Awaiting logs...'
|
||||
bulkDownload: 'Download files in a zip archive'
|
||||
templatesReloadInfo: To register a new template it might need a page reload.
|
||||
livestreamURLInput: Livestream URL
|
||||
livestreamStatusWaiting: Waiting/Wait start
|
||||
livestreamStatusDownloading: Downloading
|
||||
livestreamStatusCompleted: Completed
|
||||
livestreamStatusErrored: Errored
|
||||
livestreamStatusUnknown: Unknown
|
||||
livestreamNoMonitoring: No livestreams monitored
|
||||
livestreamDownloadInfo: |
|
||||
This will monitor yet to start livestream. Each process will be executed with --wait-for-video 10.
|
||||
If an already started livestream is provided it will be still downloaded but its progress will not be tracked.
|
||||
Once started the livestream will be migrated to the downloads page.
|
||||
livestreamExperimentalWarning: This feature is still experimental. Something might break!
|
||||
accentSelect: 'Accent'
|
||||
urlBase: URL base, for reverse proxy support (subdir), defaults to empty
|
||||
rpcPollingTimeTitle: RPC polling time
|
||||
rpcPollingTimeDescription: A lower interval results in higher CPU usage (server and client side)
|
||||
generalDownloadSettings: 'General Download Settings'
|
||||
deleteCookies: Delete Cookies
|
||||
noFilesFound: 'No Files Found'
|
||||
tableView: 'Table View'
|
||||
deleteSelected: 'Delete selected'
|
||||
subscriptionsButtonLabel: 'Subscriptions'
|
||||
subscriptionsEmptyLabel: 'No subscriptions'
|
||||
subscriptionsURLInput: 'Channel URL'
|
||||
subscriptionsInfo: |
|
||||
Subscribes to a defined channel. Only the last video will be downloaded.
|
||||
The monitor job will be scheduled/triggered by a defined cron expression (defaults to every 5 minutes if left blank).
|
||||
cronExpressionLabel: 'Cron expression'
|
||||
editButtonLabel: 'Edit'
|
||||
newSubscriptionButton: New subscription
|
||||
82
frontend/src/assets/i18n/hu.yaml
Normal file
82
frontend/src/assets/i18n/hu.yaml
Normal file
@@ -0,0 +1,82 @@
|
||||
keys:
|
||||
urlInput: Video URL (soronként egy)
|
||||
statusTitle: Állapot
|
||||
statusReady: Előkészítve
|
||||
selectFormatButton: Válassz formátumot
|
||||
startButton: Indítás
|
||||
abortAllButton: Összes megszakítása
|
||||
updateBinButton: yt-dlp bináris frissítése
|
||||
darkThemeButton: Sötét téma
|
||||
lightThemeButton: Világos téma
|
||||
settingsAnchor: Beállítások
|
||||
serverAddressTitle: Szerver címe
|
||||
serverPortTitle: Port
|
||||
extractAudioCheckbox: Audio konvertálása
|
||||
noMTimeCheckbox: Fájl módosítás időpontja ne legyen beállítva
|
||||
bgReminder: Miután a lap bezárásra kerül, a letöltés folytatódni fog a háttérben.
|
||||
toastConnected: 'Kapcsolódva: '
|
||||
toastUpdated: yt-dlp bináris frissítése sikeres volt!
|
||||
formatSelectionEnabler: Video/audio formátum manuális kiválasztásának engedélyezése
|
||||
themeSelect: 'Téma'
|
||||
languageSelect: 'Nyelv'
|
||||
overridesAnchor: Felülbírálások
|
||||
pathOverrideOption: Letöltési útvonal felülbírálása
|
||||
filenameOverrideOption: Letöltési fájlnév felülbírálása
|
||||
autoFileExtensionOption: Automatikus fájlkiterjesztés
|
||||
customFilename: Egyedi fájlnév (hagyd üresen, hogy a fájlnév automatikusan generálódjon)
|
||||
customPath: Egyedi útvonal
|
||||
customArgs: Egyedi yt-dlp argumentumok (Nagy hatalommal nagy felelősség jár.)
|
||||
customArgsInput: Egyedi yt-dlp argumentumok
|
||||
rpcConnErr: Hiba történt az RPC szerver történő kapcsolódáskor
|
||||
splashText: Nincs aktív letöltés
|
||||
archiveTitle: Archívum
|
||||
clipboardAction: URL a vágólapra másolva.
|
||||
playlistCheckbox: Lejátszási lista letöltése (Több időt vehet igénybe. A letöltés a háttérben történik, a böngészőablak szabadon bezárható.)
|
||||
restartAppMessage: Az oldal újratöltése lehet szükséges a változtatások megjelenítéséhez.
|
||||
servedFromReverseProxyCheckbox: Reverse proxy mögötti működés
|
||||
urlBase: URL base, reverse proxy támogatásához (subdir), alapból üres
|
||||
newDownloadButton: Új letöltés
|
||||
homeButtonLabel: Kezdőlap
|
||||
archiveButtonLabel: Archívum
|
||||
settingsButtonLabel: Beállítások
|
||||
rpcAuthenticationLabel: RPC bejelentkezés
|
||||
themeTogglerLabel: Témaválasztó
|
||||
loadingLabel: Betöltés...
|
||||
appTitle: Alkalmazás címe
|
||||
savedTemplates: Mentett sablonok
|
||||
templatesEditor: Sablonszerkesztő
|
||||
templatesEditorNameLabel: Sablon neve
|
||||
templatesEditorContentLabel: Sablon tartalma
|
||||
logsTitle: 'Naplók'
|
||||
awaitingLogs: 'Napló letöltése...'
|
||||
bulkDownload: 'Fájlok letöltése ZIP archívumként'
|
||||
rpcPollingTimeTitle: RPC lekérdezési időköz
|
||||
rpcPollingTimeDescription: Rövidebb időköz nagyobb processzor terheléssel járhat (mind szerver és böngésző oldalon is)
|
||||
templatesReloadInfo: Az új sablon megjelenéséhez újra kell tölteni az oldalt.
|
||||
livestreamURLInput: Élő stream URL
|
||||
livestreamStatusWaiting: Várakozás a kezdésre
|
||||
livestreamStatusDownloading: Letöltés
|
||||
livestreamStatusCompleted: Letöltve
|
||||
livestreamStatusErrored: Hiba
|
||||
livestreamStatusUnknown: Ismeretlen
|
||||
livestreamNoMonitoring: Nincsenek figyelt élő adások
|
||||
livestreamDownloadInfo: |
|
||||
Ez figyelni fog egy még el nem indított élő közvetítést. Minden folyamat a --wait-for-video 10 paraméterrel lesz végrehajtva.
|
||||
Ha egy már elindított élő közvetítés van megadva, az továbbra is letöltésre kerül, de a folyamatát nem követi nyomon.
|
||||
Amint elindul, az élő közvetítés átkerül a letöltések oldalra..
|
||||
livestreamExperimentalWarning: Ez a funkció még kísérleti. Nem garantált a hibamentes működés.
|
||||
accentSelect: 'Kiemelt szín'
|
||||
generalDownloadSettings: 'Általános letöltési beállítások'
|
||||
deleteCookies: Sütik törlése
|
||||
noFilesFound: 'Nem található fájlok'
|
||||
tableView: 'Táblázatos Nézet'
|
||||
deleteSelected: 'Kiválasztottak törlése'
|
||||
subscriptionsButtonLabel: 'Subscriptions'
|
||||
subscriptionsEmptyLabel: 'No subscriptions'
|
||||
subscriptionsURLInput: 'Channel URL'
|
||||
subscriptionsInfo: |
|
||||
Subscribes to a defined channel. Only the last video will be downloaded.
|
||||
The monitor job will be scheduled/triggered by a defined cron expression (defaults to every 5 minutes if left blank).
|
||||
cronExpressionLabel: 'Cron expression'
|
||||
editButtonLabel: 'Edit'
|
||||
newSubscriptionButton: New subscription
|
||||
82
frontend/src/assets/i18n/it_IT.yaml
Normal file
82
frontend/src/assets/i18n/it_IT.yaml
Normal file
@@ -0,0 +1,82 @@
|
||||
keys:
|
||||
urlInput: URL Video (uno per linea)
|
||||
statusTitle: Stato
|
||||
statusReady: Pronto
|
||||
selectFormatButton: Seziona formato
|
||||
startButton: Inizia
|
||||
abortAllButton: Termina tutto
|
||||
updateBinButton: Aggiorna yt-dlp
|
||||
darkThemeButton: Tema scuro
|
||||
lightThemeButton: Tema chiaro
|
||||
settingsAnchor: Impostazioni
|
||||
serverAddressTitle: Indirizzo server
|
||||
serverPortTitle: Porta
|
||||
extractAudioCheckbox: Estrai l'audio
|
||||
noMTimeCheckbox: Non impostare la proprietà "Data ultima modifica"
|
||||
bgReminder: Chiusa questa UI il download continuerà in background.
|
||||
toastConnected: 'Connesso a '
|
||||
toastUpdated: yt-dlp aggiornato con successo!
|
||||
formatSelectionEnabler: Abilita la selezione dei formati audio/video
|
||||
themeSelect: 'Tema'
|
||||
languageSelect: 'Lingua'
|
||||
overridesAnchor: Sovrascritture
|
||||
pathOverrideOption: Abilita sovrascrittura percorso di output
|
||||
filenameOverrideOption: Abilita sovrascrittura del nome del file di output
|
||||
autoFileExtensionOption: Aggiungi estensione automaticamente
|
||||
customFilename: Nome file personalizzato (lascia vuoto per utilizzare quello predefinito)
|
||||
customPath: Percorso personalizzato
|
||||
customArgs: Abilita argomenti yt-dlp personalizzati (grande potere = grandi responsabilità)
|
||||
customArgsInput: Argomenti yt-dlp personalizzati
|
||||
rpcConnErr: Errore nella connessione al server RPC
|
||||
splashText: Nessun download attivo
|
||||
archiveTitle: Archivio
|
||||
clipboardAction: URL copiato negli appunti
|
||||
playlistCheckbox: Download playlist (richiederà tempo, puoi chiudere la finestra dopo l'inoltro)
|
||||
restartAppMessage: La finestra deve essere ricaricata affinché abbia effetto
|
||||
servedFromReverseProxyCheckbox: È dietro un reverse proxy
|
||||
urlBase: base URL, per supporto a reverse proxy (subdir), default vuoto
|
||||
newDownloadButton: Nuovo download
|
||||
homeButtonLabel: Home
|
||||
archiveButtonLabel: Archivio
|
||||
settingsButtonLabel: Impostazioni
|
||||
rpcAuthenticationLabel: Autenticazione RPC
|
||||
themeTogglerLabel: Selettore Tema
|
||||
loadingLabel: Caricamento...
|
||||
appTitle: Titolo applicazione
|
||||
savedTemplates: Modelli salvati
|
||||
templatesEditor: Editor modelli
|
||||
templatesEditorNameLabel: Nome modello
|
||||
templatesEditorContentLabel: Contenuto del modello
|
||||
logsTitle: 'Logs'
|
||||
awaitingLogs: 'Awaiting logs...'
|
||||
bulkDownload: 'Scaricare i file in un archivio zip'
|
||||
rpcPollingTimeTitle: Intervallo di polling RPC
|
||||
rpcPollingTimeDescription: Un intervallo più corto implica un maggior utilizzo di CPU (lato client e server)
|
||||
templatesReloadInfo: Per registrare un nuovo modello potrebbe essere necessario ricaricare la pagina.
|
||||
livestreamURLInput: Livestream URL
|
||||
livestreamStatusWaiting: Attesa inizio
|
||||
livestreamStatusDownloading: Downloading
|
||||
livestreamStatusCompleted: Completato
|
||||
livestreamStatusErrored: Errore
|
||||
livestreamStatusUnknown: Sconosciuto
|
||||
livestreamNoMonitoring: Nessun livestream monitorato
|
||||
livestreamDownloadInfo: |
|
||||
Questo monitorerà il livestream ancora da avviare. Ogni processo verrà eseguito con --wait-for-video 10.
|
||||
Se viene fornito un livestream già avviato, questo verrà comunque scaricato, ma il suo progresso non verrà monitorato.
|
||||
Una volta avviato, il livestream verrà migrato nella pagina dei download.
|
||||
livestreamExperimentalWarning: Questa funzione è ancora sperimentale. Qualcosa potrebbe rompersi!
|
||||
accentSelect: 'Accent'
|
||||
generalDownloadSettings: 'Impostazioni generali di download'
|
||||
deleteCookies: Elimina Cookies
|
||||
noFilesFound: 'Nessun file trovato'
|
||||
tableView: 'Vista Tabella'
|
||||
deleteSelected: 'Elimina selezionati'
|
||||
subscriptionsButtonLabel: 'Abbonamenti'
|
||||
subscriptionsEmptyLabel: 'Nessuna iscrizione'
|
||||
subscriptionsURLInput: 'URL Canale'
|
||||
subscriptionsInfo: |
|
||||
Iscrive a un canale definito. Verrà scaricato solo l'ultimo video.
|
||||
Il lavoro di monitoraggio sarà programmato/attivato da un'espressione cron definita (se lasciata vuota, l'impostazione predefinita è ogni 5 minuti).
|
||||
cronExpressionLabel: 'Espressione Cron'
|
||||
editButtonLabel: 'Modifica'
|
||||
newSubscriptionButton: Nuova iscrizione
|
||||
81
frontend/src/assets/i18n/ja.yaml
Normal file
81
frontend/src/assets/i18n/ja.yaml
Normal file
@@ -0,0 +1,81 @@
|
||||
keys:
|
||||
urlInput: YouTubeまたはサポート済み動画のURL
|
||||
statusTitle: 状態
|
||||
statusReady: 準備
|
||||
selectFormatButton: フォーマット選択
|
||||
startButton: 開始
|
||||
abortAllButton: すべて中止
|
||||
updateBinButton: yt-dlp更新
|
||||
darkThemeButton: 黒テーマ
|
||||
lightThemeButton: 白テーマ
|
||||
settingsAnchor: 設定
|
||||
serverAddressTitle: サーバーアドレス
|
||||
serverPortTitle: ポート番号
|
||||
extractAudioCheckbox: 音質
|
||||
noMTimeCheckbox: ファイル時間の修正をしない
|
||||
bgReminder: このページを閉じてもバックグラウンドでダウンロードを続けます
|
||||
toastConnected: '接続中 '
|
||||
toastUpdated: yt-dlpを更新しました!
|
||||
formatSelectionEnabler: 選択可能な動画/音源
|
||||
themeSelect: 'テーマ'
|
||||
languageSelect: '言語'
|
||||
overridesAnchor: 上書き
|
||||
pathOverrideOption: 保存するディレクトリ
|
||||
filenameOverrideOption: ファイル名の上書き
|
||||
autoFileExtensionOption: 自動ファイル拡張子
|
||||
customFilename: (空白の場合は元のファイル名)
|
||||
customPath: 保存先
|
||||
customArgs: yt-dlpのオプションの有効化 (最適設定にする場合)
|
||||
customArgsInput: yt-dlpのオプション
|
||||
rpcConnErr: RPCサーバーへの接続中にエラーが発生しました
|
||||
splashText: アクティブなダウンロードはありません
|
||||
archiveTitle: アーカイブ
|
||||
clipboardAction: URLをクリップボードにコピーしました
|
||||
playlistCheckbox: プレイリストをダウンロード (これには時間がかかりますが、処理中はウィンドウを閉じることができます)
|
||||
servedFromReverseProxyCheckbox: リバースプロキシのサブフォルダにあります
|
||||
newDownloadButton: 新しくダウンロード
|
||||
homeButtonLabel: ホーム
|
||||
archiveButtonLabel: アーカイブ
|
||||
settingsButtonLabel: 設定
|
||||
rpcAuthenticationLabel: RPC認証
|
||||
themeTogglerLabel: テーマ切り替え
|
||||
loadingLabel: 読み込み中...
|
||||
appTitle: アプリタイトル
|
||||
savedTemplates: 保存したテンプレート
|
||||
templatesEditor: テンプレートエディター
|
||||
templatesEditorNameLabel: テンプレート名
|
||||
templatesEditorContentLabel: テンプレート内容
|
||||
logsTitle: 'ログ'
|
||||
awaitingLogs: 'ログを待機中...'
|
||||
bulkDownload: 'ダウンロードしたファイルをZIPで保存'
|
||||
templatesReloadInfo: To register a new template it might need a page reload.
|
||||
livestreamURLInput: ライブストリームURL
|
||||
livestreamStatusWaiting: 開始を待っています
|
||||
livestreamStatusDownloading: ダウンロード中
|
||||
livestreamStatusCompleted: 完了
|
||||
livestreamStatusErrored: エラー
|
||||
livestreamStatusUnknown: 不明
|
||||
livestreamNoMonitoring: No livestreams monitored
|
||||
livestreamDownloadInfo: |
|
||||
まだ開始されていないライブストリームを監視します。各プロセスは、--wait-for-video 10 で実行されます。
|
||||
すでに開始されているライブストリームが提供された場合、ダウンロードは継続されますが進行状況は追跡されません。
|
||||
ライブストリームが開始されると、ダウンロードページに移動されます。
|
||||
livestreamExperimentalWarning: この機能は実験的なものです。何かが壊れるかもしれません!
|
||||
accentSelect: 'Accent'
|
||||
urlBase: URL base, for reverse proxy support (subdir), defaults to empty
|
||||
rpcPollingTimeTitle: RPC polling time
|
||||
rpcPollingTimeDescription: A lower interval results in higher CPU usage (server and client side)
|
||||
generalDownloadSettings: 'General Download Settings'
|
||||
deleteCookies: Delete Cookies
|
||||
noFilesFound: 'No Files Found'
|
||||
tableView: 'Table View'
|
||||
deleteSelected: 'Delete selected'
|
||||
subscriptionsButtonLabel: 'Subscriptions'
|
||||
subscriptionsEmptyLabel: 'No subscriptions'
|
||||
subscriptionsURLInput: 'Channel URL'
|
||||
subscriptionsInfo: |
|
||||
Subscribes to a defined channel. Only the last video will be downloaded.
|
||||
The monitor job will be scheduled/triggered by a defined cron expression (defaults to every 5 minutes if left blank).
|
||||
cronExpressionLabel: 'Cron expression'
|
||||
editButtonLabel: 'Edit'
|
||||
newSubscriptionButton: New subscription
|
||||
80
frontend/src/assets/i18n/ko.yaml
Normal file
80
frontend/src/assets/i18n/ko.yaml
Normal file
@@ -0,0 +1,80 @@
|
||||
keys:
|
||||
urlInput: YouTube나 다른 지원되는 사이트의 URL
|
||||
statusTitle: 상태
|
||||
startButton: 시작
|
||||
statusReady: 준비됨
|
||||
abortAllButton: 모두 중단
|
||||
updateBinButton: yt-dlp 바이너리 업데이트
|
||||
darkThemeButton: 다크 모드
|
||||
lightThemeButton: 라이트 모드
|
||||
settingsAnchor: 설정
|
||||
serverAddressTitle: 서버 주소
|
||||
serverPortTitle: Port
|
||||
extractAudioCheckbox: 오디오 추출
|
||||
noMTimeCheckbox: 파일 수정 시간을 설정하지 않음
|
||||
bgReminder: 이 페이지를 닫아도 백그라운드에서 다운로드가 계속됩니다
|
||||
toastConnected: '다음으로 연결됨 '
|
||||
toastUpdated: yt-dlp 바이너리를 업데이트 했습니다
|
||||
formatSelectionEnabler: 비디오/오디오 포멧 옵션 표시
|
||||
themeSelect: 'Theme'
|
||||
languageSelect: 'Language'
|
||||
overridesAnchor: Overrides
|
||||
pathOverrideOption: Enable output path overriding
|
||||
filenameOverrideOption: Enable output file name overriding
|
||||
autoFileExtensionOption: 자동으로 파일 확장자 추가
|
||||
customFilename: Custom filename (leave blank to use default)
|
||||
customPath: Custom path
|
||||
customArgs: Enable custom yt-dlp args (great power = great responsabilities)
|
||||
customArgsInput: Custom yt-dlp arguments
|
||||
rpcConnErr: Error while conencting to RPC server
|
||||
splashText: No active downloads
|
||||
archiveTitle: Archive
|
||||
clipboardAction: Copied URL to clipboard
|
||||
playlistCheckbox: Download playlist (it will take time, after submitting you may even close this window)
|
||||
servedFromReverseProxyCheckbox: Is behind a reverse proxy subfolder
|
||||
newDownloadButton: New download
|
||||
homeButtonLabel: Home
|
||||
archiveButtonLabel: Archive
|
||||
settingsButtonLabel: Settings
|
||||
rpcAuthenticationLabel: RPC authentication
|
||||
themeTogglerLabel: Theme toggler
|
||||
loadingLabel: Loading...
|
||||
appTitle: App title
|
||||
savedTemplates: Saved templates
|
||||
templatesEditor: Templates editor
|
||||
templatesEditorNameLabel: Template name
|
||||
templatesEditorContentLabel: Template content
|
||||
logsTitle: 'Logs'
|
||||
awaitingLogs: 'Awaiting logs...'
|
||||
bulkDownload: 'Download files in a zip archive'
|
||||
templatesReloadInfo: To register a new template it might need a page reload.
|
||||
livestreamURLInput: Livestream URL
|
||||
livestreamStatusWaiting: Waiting/Wait start
|
||||
livestreamStatusDownloading: Downloading
|
||||
livestreamStatusCompleted: Completed
|
||||
livestreamStatusErrored: Errored
|
||||
livestreamStatusUnknown: Unknown
|
||||
livestreamNoMonitoring: No livestreams monitored
|
||||
livestreamDownloadInfo: |
|
||||
This will monitor yet to start livestream. Each process will be executed with --wait-for-video 10.
|
||||
If an already started livestream is provided it will be still downloaded but its progress will not be tracked.
|
||||
Once started the livestream will be migrated to the downloads page.
|
||||
livestreamExperimentalWarning: This feature is still experimental. Something might break!
|
||||
accentSelect: 'Accent'
|
||||
urlBase: URL base, for reverse proxy support (subdir), defaults to empty
|
||||
rpcPollingTimeTitle: RPC polling time
|
||||
rpcPollingTimeDescription: A lower interval results in higher CPU usage (server and client side)
|
||||
generalDownloadSettings: 'General Download Settings'
|
||||
deleteCookies: Delete Cookies
|
||||
noFilesFound: 'No Files Found'
|
||||
tableView: 'Table View'
|
||||
deleteSelected: 'Delete selected'
|
||||
subscriptionsButtonLabel: 'Subscriptions'
|
||||
subscriptionsEmptyLabel: 'No subscriptions'
|
||||
subscriptionsURLInput: 'Channel URL'
|
||||
subscriptionsInfo: |
|
||||
Subscribes to a defined channel. Only the last video will be downloaded.
|
||||
The monitor job will be scheduled/triggered by a defined cron expression (defaults to every 5 minutes if left blank).
|
||||
cronExpressionLabel: 'Cron expression'
|
||||
editButtonLabel: 'Edit'
|
||||
newSubscriptionButton: New subscription
|
||||
80
frontend/src/assets/i18n/pl.yaml
Normal file
80
frontend/src/assets/i18n/pl.yaml
Normal file
@@ -0,0 +1,80 @@
|
||||
keys:
|
||||
urlInput: Adres URL YouTube lub innej obsługiwanej usługi
|
||||
statusTitle: Status
|
||||
startButton: Początek
|
||||
statusReady: Gotowy
|
||||
abortAllButton: Anuluj wszystko
|
||||
updateBinButton: Zaktualizuj plik binarny yt-dlp
|
||||
darkThemeButton: Ciemny motyw
|
||||
lightThemeButton: Światło motyw
|
||||
settingsAnchor: Ustawienia
|
||||
serverAddressTitle: Adres serwera
|
||||
serverPortTitle: Port
|
||||
extractAudioCheckbox: Wyodrębnij dźwięk
|
||||
noMTimeCheckbox: Nie ustawiaj czasu modyfikacji pliku
|
||||
bgReminder: Po zamknięciu tej strony pobieranie będzie kontynuowane w tle.
|
||||
toastConnected: 'Połączony z '
|
||||
toastUpdated: Zaktualizowano plik binarny yt-dlp!
|
||||
formatSelectionEnabler: Aktywuj wybór formatów wideo/audio
|
||||
themeSelect: 'Motyw'
|
||||
languageSelect: 'Język'
|
||||
overridesAnchor: Przedefiniuj
|
||||
pathOverrideOption: Aktywuj zastąpienie ścieżki źródłowej
|
||||
filenameOverrideOption: Aktywuj zastępowanie nazwy pliku źródłowego
|
||||
autoFileExtensionOption: Automatyczne rozszerzenie pliku
|
||||
customFilename: Wprowadź nazwę pliku (pozostaw puste, aby użyć nazwy domyślnej)
|
||||
customPath: Ustaw ścieżkę
|
||||
customArgs: Uwzględnij konfigurowalne argumenty yt-dlp (wielka moc = wielka odpowiedzialność)
|
||||
customArgsInput: Niestandardowe argumenty yt-dlp
|
||||
rpcConnErr: Wystąpił błąd podczas łączenia z serwerem RPC
|
||||
splashText: Brak aktywnych pobrań
|
||||
archiveTitle: Archiwum
|
||||
clipboardAction: Adres URL zostanie skopiowany do schowka
|
||||
playlistCheckbox: Download playlist (it will take time, after submitting you may even close this window)
|
||||
servedFromReverseProxyCheckbox: Is behind a reverse proxy subfolder
|
||||
newDownloadButton: New download
|
||||
homeButtonLabel: Home
|
||||
archiveButtonLabel: Archive
|
||||
settingsButtonLabel: Settings
|
||||
rpcAuthenticationLabel: RPC authentication
|
||||
themeTogglerLabel: Theme toggler
|
||||
loadingLabel: Loading...
|
||||
appTitle: App title
|
||||
savedTemplates: Saved templates
|
||||
templatesEditor: Templates editor
|
||||
templatesEditorNameLabel: Template name
|
||||
templatesEditorContentLabel: Template content
|
||||
logsTitle: 'Logs'
|
||||
awaitingLogs: 'Awaiting logs...'
|
||||
bulkDownload: 'Download files in a zip archive'
|
||||
templatesReloadInfo: To register a new template it might need a page reload.
|
||||
livestreamURLInput: Livestream URL
|
||||
livestreamStatusWaiting: Waiting/Wait start
|
||||
livestreamStatusDownloading: Downloading
|
||||
livestreamStatusCompleted: Completed
|
||||
livestreamStatusErrored: Errored
|
||||
livestreamStatusUnknown: Unknown
|
||||
livestreamNoMonitoring: No livestreams monitored
|
||||
livestreamDownloadInfo: |
|
||||
This will monitor yet to start livestream. Each process will be executed with --wait-for-video 10.
|
||||
If an already started livestream is provided it will be still downloaded but its progress will not be tracked.
|
||||
Once started the livestream will be migrated to the downloads page.
|
||||
livestreamExperimentalWarning: This feature is still experimental. Something might break!
|
||||
accentSelect: 'Accent'
|
||||
urlBase: URL base, for reverse proxy support (subdir), defaults to empty
|
||||
rpcPollingTimeTitle: RPC polling time
|
||||
rpcPollingTimeDescription: A lower interval results in higher CPU usage (server and client side)
|
||||
generalDownloadSettings: 'General Download Settings'
|
||||
deleteCookies: Delete Cookies
|
||||
noFilesFound: 'No Files Found'
|
||||
tableView: 'Table View'
|
||||
deleteSelected: 'Delete selected'
|
||||
subscriptionsButtonLabel: 'Subscriptions'
|
||||
subscriptionsEmptyLabel: 'No subscriptions'
|
||||
subscriptionsURLInput: 'Channel URL'
|
||||
subscriptionsInfo: |
|
||||
Subscribes to a defined channel. Only the last video will be downloaded.
|
||||
The monitor job will be scheduled/triggered by a defined cron expression (defaults to every 5 minutes if left blank).
|
||||
cronExpressionLabel: 'Cron expression'
|
||||
editButtonLabel: 'Edit'
|
||||
newSubscriptionButton: New subscription
|
||||
82
frontend/src/assets/i18n/pt_BR.yaml
Normal file
82
frontend/src/assets/i18n/pt_BR.yaml
Normal file
@@ -0,0 +1,82 @@
|
||||
keys:
|
||||
urlInput: URL do vídeo (uma por linha)
|
||||
statusTitle: Status
|
||||
statusReady: Pronto
|
||||
selectFormatButton: Selecionar formato
|
||||
startButton: Iniciar
|
||||
abortAllButton: Cancelar tudo
|
||||
updateBinButton: Atualizar binário yt-dlp
|
||||
darkThemeButton: Tema escuro
|
||||
lightThemeButton: Tema claro
|
||||
settingsAnchor: Configurações
|
||||
serverAddressTitle: Endereço do servidor
|
||||
serverPortTitle: Porta
|
||||
extractAudioCheckbox: Extrair áudio
|
||||
noMTimeCheckbox: Não definir hora de modificação do arquivo
|
||||
bgReminder: Uma vez que você feche esta página, o download continuará em segundo plano.
|
||||
toastConnected: 'Conectado a '
|
||||
toastUpdated: Binário yt-dlp atualizado!
|
||||
formatSelectionEnabler: Habilitar seleção de formatos de vídeo/aúdio
|
||||
themeSelect: 'Tema'
|
||||
languageSelect: 'Idioma'
|
||||
overridesAnchor: Substituições
|
||||
pathOverrideOption: Habilitar substituição do caminho de saída
|
||||
filenameOverrideOption: Habilitar substituição do nome do arquivo de saída
|
||||
autoFileExtensionOption: Adicionar extensão de arquivo automaticamente
|
||||
customFilename: Nome de arquivo personalizado (deixe em branco para usar o padrão)
|
||||
customPath: Caminho personalizado
|
||||
customArgs: Habilitar argumentos personalizados do yt-dlp (grandes poderes = grandes responsabilidades)
|
||||
customArgsInput: Argumentos personalizados do yt-dlp
|
||||
rpcConnErr: Erro ao conectar ao servidor RPC
|
||||
splashText: Nenhum download ativo
|
||||
archiveTitle: Arquivo
|
||||
clipboardAction: URL copiada para a área de transferência
|
||||
playlistCheckbox: Baixar playlist (isso pode levar algum tempo, depois de enviar você pode fechar esta janela)
|
||||
restartAppMessage: Necessário recarregar a página para que a mudança tenha efeito
|
||||
servedFromReverseProxyCheckbox: Está atrás de um proxy reverso
|
||||
urlBase: Base da URL, para suporte de proxy reverso (subdiretório), padrão vazio
|
||||
newDownloadButton: Novo download
|
||||
homeButtonLabel: Início
|
||||
archiveButtonLabel: Arquivo
|
||||
settingsButtonLabel: Configurações
|
||||
rpcAuthenticationLabel: Autenticação RPC
|
||||
themeTogglerLabel: Alternador de tema
|
||||
loadingLabel: Carregando...
|
||||
appTitle: Título do aplicativo
|
||||
savedTemplates: Modelos salvos
|
||||
templatesEditor: Editor de modelos
|
||||
templatesEditorNameLabel: Nome do modelo
|
||||
templatesEditorContentLabel: Conteúdo do modelo
|
||||
logsTitle: 'Logs'
|
||||
awaitingLogs: 'Aguardando logs...'
|
||||
bulkDownload: 'Baixar arquivos em um arquivo zip'
|
||||
rpcPollingTimeTitle: Tempo de polling RPC
|
||||
rpcPollingTimeDescription: Um intervalo menor resulta em maior uso de CPU (lado do servidor e do cliente)
|
||||
templatesReloadInfo: Para registrar um novo modelo, pode ser necessário recarregar a página.
|
||||
livestreamURLInput: URL da transmissão ao vivo
|
||||
livestreamStatusWaiting: Aguardando/Aguarde o início
|
||||
livestreamStatusDownloading: Baixando
|
||||
livestreamStatusCompleted: Concluído
|
||||
livestreamStatusErrored: Erro
|
||||
livestreamStatusUnknown: Desconhecido
|
||||
livestreamNoMonitoring: No livestreams monitored
|
||||
livestreamDownloadInfo: |
|
||||
Isso monitorará uma transmissão ao vivo que ainda não começou. Cada processo será executado com --wait-for-video 10.
|
||||
Se uma transmissão ao vivo já iniciada for fornecida, ela ainda será baixada, mas seu progresso não será rastreado.
|
||||
Uma vez iniciada, a transmissão ao vivo será migrada para a página de downloads.
|
||||
livestreamExperimentalWarning: Este recurso ainda é experimental. Algo pode quebrar!
|
||||
accentSelect: 'Accent'
|
||||
generalDownloadSettings: 'General Download Settings'
|
||||
deleteCookies: Delete Cookies
|
||||
noFilesFound: 'No Files Found'
|
||||
tableView: 'Table View'
|
||||
deleteSelected: 'Delete selected'
|
||||
subscriptionsButtonLabel: 'Subscriptions'
|
||||
subscriptionsEmptyLabel: 'No subscriptions'
|
||||
subscriptionsURLInput: 'Channel URL'
|
||||
subscriptionsInfo: |
|
||||
Subscribes to a defined channel. Only the last video will be downloaded.
|
||||
The monitor job will be scheduled/triggered by a defined cron expression (defaults to every 5 minutes if left blank).
|
||||
cronExpressionLabel: 'Cron expression'
|
||||
editButtonLabel: 'Edit'
|
||||
newSubscriptionButton: New subscription
|
||||
80
frontend/src/assets/i18n/ru.yaml
Normal file
80
frontend/src/assets/i18n/ru.yaml
Normal file
@@ -0,0 +1,80 @@
|
||||
keys:
|
||||
urlInput: URL-адрес YouTube или любого другого поддерживаемого сервиса
|
||||
statusTitle: Статус
|
||||
startButton: Начать
|
||||
statusReady: Готово
|
||||
abortAllButton: Прервать все
|
||||
updateBinButton: Обновить бинарный файл yt-dlp
|
||||
darkThemeButton: Темная тема
|
||||
lightThemeButton: Светлая тема
|
||||
settingsAnchor: Настройки
|
||||
serverAddressTitle: Адрес сервера
|
||||
serverPortTitle: Порт
|
||||
extractAudioCheckbox: Извлечь аудио
|
||||
noMTimeCheckbox: Не устанавливать время модификации файла
|
||||
bgReminder: Как только вы закроете эту страницу, загрузка продолжится в фоновом режиме.
|
||||
toastConnected: 'Подключен к '
|
||||
toastUpdated: Бинарный файл yt-dlp обновлен!
|
||||
formatSelectionEnabler: Активировать выбор видео/аудио форматов
|
||||
themeSelect: 'Тема'
|
||||
languageSelect: 'Язык'
|
||||
overridesAnchor: Переопределить
|
||||
pathOverrideOption: Активировать переопределение выходного пути
|
||||
filenameOverrideOption: Активировать переопределение имени выходного файла
|
||||
autoFileExtensionOption: Автоматическое расширение файла
|
||||
customFilename: Задать имя файла (оставьте пустым, чтобы использовать значение по умолчанию)
|
||||
customPath: Задать путь
|
||||
customArgs: Включить настраиваемые аргументы yt-dlp (большая сила = большая ответственность)
|
||||
customArgsInput: Пользовательские аргументы yt-dlp
|
||||
rpcConnErr: Ошибка при подключении к серверу RPC
|
||||
splashText: Нет активных загрузок
|
||||
archiveTitle: Архив
|
||||
clipboardAction: URL скопирован в буфер обмена
|
||||
playlistCheckbox: Скачать плейлист. Это займет время, после отправки вы сможете закрыть окно
|
||||
servedFromReverseProxyCheckbox: Находится за обратным прокси
|
||||
newDownloadButton: Новая загрузка
|
||||
homeButtonLabel: Home
|
||||
archiveButtonLabel: Архив
|
||||
settingsButtonLabel: Настройки
|
||||
rpcAuthenticationLabel: RPC-аутентификация
|
||||
themeTogglerLabel: Переключить тему
|
||||
loadingLabel: Загрузка...
|
||||
appTitle: Название приложения
|
||||
savedTemplates: Сохраненные шаблоны
|
||||
templatesEditor: Редактор шаблонов
|
||||
templatesEditorNameLabel: Имя шаблона
|
||||
templatesEditorContentLabel: Содержание шаблона
|
||||
logsTitle: 'Логи'
|
||||
awaitingLogs: 'Ожидание логов...'
|
||||
bulkDownload: 'Скачать файлы в zip архиве'
|
||||
templatesReloadInfo: To register a new template it might need a page reload.
|
||||
livestreamURLInput: Livestream URL
|
||||
livestreamStatusWaiting: Waiting/Wait start
|
||||
livestreamStatusDownloading: Downloading
|
||||
livestreamStatusCompleted: Completed
|
||||
livestreamStatusErrored: Errored
|
||||
livestreamStatusUnknown: Unknown
|
||||
livestreamNoMonitoring: No livestreams monitored
|
||||
livestreamDownloadInfo: |
|
||||
This will monitor yet to start livestream. Each process will be executed with --wait-for-video 10.
|
||||
If an already started livestream is provided it will be still downloaded but its progress will not be tracked.
|
||||
Once started the livestream will be migrated to the downloads page.
|
||||
livestreamExperimentalWarning: This feature is still experimental. Something might break!
|
||||
accentSelect: 'Accent'
|
||||
urlBase: URL base, for reverse proxy support (subdir), defaults to empty
|
||||
rpcPollingTimeTitle: RPC polling time
|
||||
rpcPollingTimeDescription: A lower interval results in higher CPU usage (server and client side)
|
||||
generalDownloadSettings: 'General Download Settings'
|
||||
deleteCookies: Delete Cookies
|
||||
noFilesFound: 'No Files Found'
|
||||
tableView: 'Table View'
|
||||
deleteSelected: 'Delete selected'
|
||||
subscriptionsButtonLabel: 'Subscriptions'
|
||||
subscriptionsEmptyLabel: 'No subscriptions'
|
||||
subscriptionsURLInput: 'Channel URL'
|
||||
subscriptionsInfo: |
|
||||
Subscribes to a defined channel. Only the last video will be downloaded.
|
||||
The monitor job will be scheduled/triggered by a defined cron expression (defaults to every 5 minutes if left blank).
|
||||
cronExpressionLabel: 'Cron expression'
|
||||
editButtonLabel: 'Edit'
|
||||
newSubscriptionButton: New subscription
|
||||
82
frontend/src/assets/i18n/sv.yaml
Normal file
82
frontend/src/assets/i18n/sv.yaml
Normal file
@@ -0,0 +1,82 @@
|
||||
keys:
|
||||
urlInput: Videolänk (en per rad)
|
||||
statusTitle: Status
|
||||
statusReady: Redo
|
||||
selectFormatButton: Välj format
|
||||
startButton: Start
|
||||
abortAllButton: Avbryt alla
|
||||
updateBinButton: Uppdatera yt-dlp
|
||||
darkThemeButton: Mörkt tema
|
||||
lightThemeButton: Ljust tema
|
||||
settingsAnchor: Inställningar
|
||||
serverAddressTitle: Serveraddress
|
||||
serverPortTitle: Port
|
||||
extractAudioCheckbox: Extrahera ljud
|
||||
noMTimeCheckbox: Lägg inte till info om när filen senast modifierades
|
||||
bgReminder: När du stänger denna sida så kommer nedladdningen att fortsätta i bakgrunden.
|
||||
toastConnected: 'Ansluten till '
|
||||
toastUpdated: Uppdaterade yt-dlp!
|
||||
formatSelectionEnabler: Tillåt val av ljud- och bildformat
|
||||
themeSelect: 'Tema'
|
||||
languageSelect: 'Språk'
|
||||
overridesAnchor: Överskrivningar
|
||||
pathOverrideOption: Tillåt överskrivning av filsökvägen
|
||||
filenameOverrideOption: Tillåt överskrivning av filnamn
|
||||
autoFileExtensionOption: Lägg till filändelse automatiskt
|
||||
customFilename: Eget filnamn (lämna blankt för standardnamn)
|
||||
customPath: Egen filsökväg
|
||||
customArgs: Tillåt egna yt-dlp-argument (frihet under ansvar!)
|
||||
customArgsInput: Egna yt-dlp-argument
|
||||
rpcConnErr: Ett fel inträffade vid anslutning till RPC-server
|
||||
splashText: Inga pågående nedladdningar
|
||||
archiveTitle: Arkiv
|
||||
clipboardAction: Kopierade länken
|
||||
playlistCheckbox: Ladda ner spellista (detta kommer ta did, efter start så kan du stänga detta fönster)
|
||||
restartAppMessage: En sidomladdning behövs innan förändringen får effekt
|
||||
servedFromReverseProxyCheckbox: Servern befinner sig bakom en omvänd proxy
|
||||
urlBase: "URL-bas, måste anges när en omvänd proxy används. Standardinställning: lämna blank"
|
||||
newDownloadButton: Ny nedladdning
|
||||
homeButtonLabel: Hem
|
||||
archiveButtonLabel: Arkiv
|
||||
settingsButtonLabel: Inställningar
|
||||
rpcAuthenticationLabel: RPC-Autentisering
|
||||
themeTogglerLabel: Tema-knapp
|
||||
loadingLabel: Laddar...
|
||||
appTitle: Apptitel
|
||||
savedTemplates: Sparade mallar
|
||||
templatesEditor: Mallredigerare
|
||||
templatesEditorNameLabel: Namn
|
||||
templatesEditorContentLabel: Innehåll
|
||||
logsTitle: 'Loggar'
|
||||
awaitingLogs: 'Väntar på loggar...'
|
||||
bulkDownload: 'Ladda ner filer i ett zip-arkiv'
|
||||
rpcPollingTimeTitle: Frekvens av RPC-uppdateringar
|
||||
rpcPollingTimeDescription: En högre frekvens kräver mer CPU-resurser för både server och klient
|
||||
templatesReloadInfo: För att registrera en ny mall så kan en sidomladdning krävas.
|
||||
livestreamURLInput: Livestream URL
|
||||
livestreamStatusWaiting: Waiting/Wait start
|
||||
livestreamStatusDownloading: Downloading
|
||||
livestreamStatusCompleted: Completed
|
||||
livestreamStatusErrored: Errored
|
||||
livestreamStatusUnknown: Unknown
|
||||
livestreamNoMonitoring: No livestreams monitored
|
||||
livestreamDownloadInfo: |
|
||||
This will monitor yet to start livestream. Each process will be executed with --wait-for-video 10.
|
||||
If an already started livestream is provided it will be still downloaded but its progress will not be tracked.
|
||||
Once started the livestream will be migrated to the downloads page.
|
||||
livestreamExperimentalWarning: This feature is still experimental. Something might break!
|
||||
accentSelect: 'Accent'
|
||||
generalDownloadSettings: 'General Download Settings'
|
||||
deleteCookies: Delete Cookies
|
||||
noFilesFound: 'No Files Found'
|
||||
tableView: 'Table View'
|
||||
deleteSelected: 'Delete selected'
|
||||
subscriptionsButtonLabel: 'Subscriptions'
|
||||
subscriptionsEmptyLabel: 'No subscriptions'
|
||||
subscriptionsURLInput: 'Channel URL'
|
||||
subscriptionsInfo: |
|
||||
Subscribes to a defined channel. Only the last video will be downloaded.
|
||||
The monitor job will be scheduled/triggered by a defined cron expression (defaults to every 5 minutes if left blank).
|
||||
cronExpressionLabel: 'Cron expression'
|
||||
editButtonLabel: 'Edit'
|
||||
newSubscriptionButton: New subscription
|
||||
80
frontend/src/assets/i18n/uk.yaml
Normal file
80
frontend/src/assets/i18n/uk.yaml
Normal file
@@ -0,0 +1,80 @@
|
||||
keys:
|
||||
urlInput: URL-адреса YouTube або будь-якого іншого підтримуваного сервісу
|
||||
statusTitle: Статус
|
||||
startButton: Почати
|
||||
statusReady: Готово
|
||||
abortAllButton: Перервати все
|
||||
updateBinButton: Оновити бінарний файл yt-dlp
|
||||
darkThemeButton: Темна тема
|
||||
lightThemeButton: Світла тема
|
||||
settingsAnchor: Налаштування
|
||||
serverAddressTitle: Адреса сервера
|
||||
serverPortTitle: Порт
|
||||
extractAudioCheckbox: Витягти аудіо
|
||||
noMTimeCheckbox: Не встановлювати час модифікації файлу
|
||||
bgReminder: Як тільки ви закриєте цю сторінку, завантаження продовжиться у фоновому режимі.
|
||||
toastConnected: 'Підключений до '
|
||||
toastUpdated: Бінарний файл yt-dlp оновлено!
|
||||
formatSelectionEnabler: Активувати вибір відео/аудіо форматів
|
||||
themeSelect: 'Тема'
|
||||
languageSelect: 'Мова'
|
||||
overridesAnchor: Перевизначити
|
||||
pathOverrideOption: Активувати перевизначення вихідного шляху
|
||||
filenameOverrideOption: Активувати перевизначення імені вихідного файлу
|
||||
autoFileExtensionOption: Автоматичне додавання розширення файлу
|
||||
customFilename: Введіть ім'я файлу (залишіть порожнім, щоб використовувати значення за замовчуванням)
|
||||
customPath: Задати шлях
|
||||
customArgs: Включити аргументи, що настроюються yt-dlp (велика сила = велика відповідальність)
|
||||
customArgsInput: Користувальницькі аргументи yt-dlp
|
||||
rpcConnErr: Помилка при підключенні до сервера RPC
|
||||
splashText: Немає активних завантажень
|
||||
archiveTitle: Архів
|
||||
clipboardAction: URL скопійовано в буфер обміну
|
||||
playlistCheckbox: Download playlist (it will take time, after submitting you may even close this window)
|
||||
servedFromReverseProxyCheckbox: Is behind a reverse proxy subfolder
|
||||
newDownloadButton: New download
|
||||
homeButtonLabel: Home
|
||||
archiveButtonLabel: Archive
|
||||
settingsButtonLabel: Settings
|
||||
rpcAuthenticationLabel: RPC authentication
|
||||
themeTogglerLabel: Theme toggler
|
||||
loadingLabel: Loading...
|
||||
appTitle: App title
|
||||
savedTemplates: Saved templates
|
||||
templatesEditor: Templates editor
|
||||
templatesEditorNameLabel: Template name
|
||||
templatesEditorContentLabel: Template content
|
||||
logsTitle: 'Logs'
|
||||
awaitingLogs: 'Awaiting logs...'
|
||||
bulkDownload: 'Download files in a zip archive'
|
||||
templatesReloadInfo: To register a new template it might need a page reload.
|
||||
livestreamURLInput: Livestream URL
|
||||
livestreamStatusWaiting: Waiting/Wait start
|
||||
livestreamStatusDownloading: Downloading
|
||||
livestreamStatusCompleted: Completed
|
||||
livestreamStatusErrored: Errored
|
||||
livestreamStatusUnknown: Unknown
|
||||
livestreamNoMonitoring: No livestreams monitored
|
||||
livestreamDownloadInfo: |
|
||||
This will monitor yet to start livestream. Each process will be executed with --wait-for-video 10.
|
||||
If an already started livestream is provided it will be still downloaded but its progress will not be tracked.
|
||||
Once started the livestream will be migrated to the downloads page.
|
||||
livestreamExperimentalWarning: This feature is still experimental. Something might break!
|
||||
accentSelect: 'Accent'
|
||||
urlBase: URL base, for reverse proxy support (subdir), defaults to empty
|
||||
rpcPollingTimeTitle: RPC polling time
|
||||
rpcPollingTimeDescription: A lower interval results in higher CPU usage (server and client side)
|
||||
generalDownloadSettings: 'General Download Settings'
|
||||
deleteCookies: Delete Cookies
|
||||
noFilesFound: 'No Files Found'
|
||||
tableView: 'Table View'
|
||||
deleteSelected: 'Delete selected'
|
||||
subscriptionsButtonLabel: 'Subscriptions'
|
||||
subscriptionsEmptyLabel: 'No subscriptions'
|
||||
subscriptionsURLInput: 'Channel URL'
|
||||
subscriptionsInfo: |
|
||||
Subscribes to a defined channel. Only the last video will be downloaded.
|
||||
The monitor job will be scheduled/triggered by a defined cron expression (defaults to every 5 minutes if left blank).
|
||||
cronExpressionLabel: 'Cron expression'
|
||||
editButtonLabel: 'Edit'
|
||||
newSubscriptionButton: New subscription
|
||||
82
frontend/src/assets/i18n/zh_CN.yaml
Normal file
82
frontend/src/assets/i18n/zh_CN.yaml
Normal file
@@ -0,0 +1,82 @@
|
||||
keys:
|
||||
urlInput: 视频 URL
|
||||
statusTitle: 状态
|
||||
statusReady: 就绪
|
||||
selectFormatButton: 选择格式
|
||||
startButton: 开始
|
||||
abortAllButton: 全部中止
|
||||
updateBinButton: 更新 yt-dlp 可执行文件
|
||||
darkThemeButton: 黑暗主题
|
||||
lightThemeButton: 明亮主题
|
||||
settingsAnchor: 设置
|
||||
serverAddressTitle: 服务器地址
|
||||
serverPortTitle: 端口
|
||||
extractAudioCheckbox: 提取音频
|
||||
noMTimeCheckbox: 不设置文件修改时间
|
||||
bgReminder: 关闭页面后,下载会继续在后台运行。
|
||||
toastConnected: '已连接到 '
|
||||
toastUpdated: 已更新 yt-dlp 可执行文件!
|
||||
formatSelectionEnabler: 启用视频/音频格式选择
|
||||
themeSelect: '主题'
|
||||
languageSelect: '语言'
|
||||
overridesAnchor: 覆盖
|
||||
pathOverrideOption: 启用输出路径覆盖
|
||||
filenameOverrideOption: 启用输出文件名覆盖
|
||||
autoFileExtensionOption: 自动文件扩展名
|
||||
customFilename: 自定义文件名(留空使用默认值)
|
||||
customPath: 自定义路径
|
||||
customArgs: 启用自定义 yt-dlp 参数(能力越大 = 责任越大)
|
||||
customArgsInput: 自定义 yt-dlp 参数
|
||||
rpcConnErr: 连接 RPC 服务器发生错误
|
||||
splashText: 没有正在进行的下载
|
||||
archiveTitle: 归档
|
||||
clipboardAction: 复制 URL 到剪贴板
|
||||
playlistCheckbox: 下载播放列表(可能需要一段时间,提交后可以关闭页面等待)
|
||||
restartAppMessage: 需要刷新页面才能生效
|
||||
servedFromReverseProxyCheckbox: 处于反向代理的子目录后
|
||||
newDownloadButton: 新下载
|
||||
homeButtonLabel: 主页
|
||||
archiveButtonLabel: 归档
|
||||
settingsButtonLabel: 设置
|
||||
rpcAuthenticationLabel: RPC 身份验证
|
||||
themeTogglerLabel: 主题切换
|
||||
loadingLabel: 正在加载…
|
||||
appTitle: App 标题
|
||||
savedTemplates: 保存模板
|
||||
templatesEditor: 模板编辑器
|
||||
templatesEditorNameLabel: 模板名称
|
||||
templatesEditorContentLabel: 模板内容
|
||||
logsTitle: '日志'
|
||||
awaitingLogs: '正在等待日志…'
|
||||
bulkDownload: '下载 zip 压缩包中的文件'
|
||||
templatesReloadInfo: To register a new template it might need a page reload.
|
||||
livestreamURLInput: 直播 URL
|
||||
livestreamStatusWaiting: 等待直播开始
|
||||
livestreamStatusDownloading: 下载中
|
||||
livestreamStatusCompleted: 已完成
|
||||
livestreamStatusErrored: 发生错误
|
||||
livestreamStatusUnknown: 未知
|
||||
livestreamNoMonitoring: No livestreams monitored
|
||||
livestreamDownloadInfo: |
|
||||
本功能将会监控即将开始的直播流,每个进程都会传入参数:--wait-for-video 10 (重试间隔10秒)
|
||||
如果直播已经开始,那么依然可以下载,但是不会记录下载进度。
|
||||
直播开始后,将会转移到下载页面
|
||||
livestreamExperimentalWarning: 实验性功能,可能存在未知Bug,请谨慎使用
|
||||
accentSelect: 'Accent'
|
||||
urlBase: URL base, for reverse proxy support (subdir), defaults to empty
|
||||
rpcPollingTimeTitle: RPC polling time
|
||||
rpcPollingTimeDescription: A lower interval results in higher CPU usage (server and client side)
|
||||
generalDownloadSettings: 'General Download Settings'
|
||||
deleteCookies: Delete Cookies
|
||||
noFilesFound: 'No Files Found'
|
||||
tableView: 'Table View'
|
||||
deleteSelected: 'Delete selected'
|
||||
subscriptionsButtonLabel: 'Subscriptions'
|
||||
subscriptionsEmptyLabel: 'No subscriptions'
|
||||
subscriptionsURLInput: 'Channel URL'
|
||||
subscriptionsInfo: |
|
||||
Subscribes to a defined channel. Only the last video will be downloaded.
|
||||
The monitor job will be scheduled/triggered by a defined cron expression (defaults to every 5 minutes if left blank).
|
||||
cronExpressionLabel: 'Cron expression'
|
||||
editButtonLabel: 'Edit'
|
||||
newSubscriptionButton: New subscription
|
||||
@@ -1,51 +1,34 @@
|
||||
import { atom, selector } from 'recoil'
|
||||
import { CustomTemplate } from '../types'
|
||||
import { ffetch } from '../lib/httpClient'
|
||||
import { serverURL } from './settings'
|
||||
import { pipe } from 'fp-ts/lib/function'
|
||||
import { getOrElse } from 'fp-ts/lib/Either'
|
||||
import { pipe } from 'fp-ts/lib/function'
|
||||
import { atom } from 'jotai'
|
||||
import { atomWithStorage } from 'jotai/utils'
|
||||
import { ffetch } from '../lib/httpClient'
|
||||
import { CustomTemplate } from '../types'
|
||||
import { serverSideCookiesState, serverURL } from './settings'
|
||||
|
||||
export const cookiesTemplateState = atom({
|
||||
key: 'cookiesTemplateState',
|
||||
default: localStorage.getItem('cookiesTemplate') ?? '',
|
||||
effects: [
|
||||
({ onSet }) => onSet(e => localStorage.setItem('cookiesTemplate', e))
|
||||
]
|
||||
})
|
||||
export const cookiesTemplateState = atom<Promise<string>>(async (get) =>
|
||||
await get(serverSideCookiesState)
|
||||
? '--cookies=cookies.txt'
|
||||
: ''
|
||||
)
|
||||
|
||||
export const customArgsState = atom({
|
||||
key: 'customArgsState',
|
||||
default: localStorage.getItem('customArgs') ?? '',
|
||||
effects: [
|
||||
({ onSet }) => onSet(e => localStorage.setItem('customArgs', e))
|
||||
]
|
||||
})
|
||||
export const customArgsState = atomWithStorage(
|
||||
'customArgs',
|
||||
localStorage.getItem('customArgs') ?? ''
|
||||
)
|
||||
|
||||
export const filenameTemplateState = atom({
|
||||
key: 'filenameTemplateState',
|
||||
default: localStorage.getItem('lastFilenameTemplate') ?? '',
|
||||
effects: [
|
||||
({ onSet }) => onSet(e => localStorage.setItem('lastFilenameTemplate', e))
|
||||
]
|
||||
})
|
||||
export const filenameTemplateState = atomWithStorage(
|
||||
'lastFilenameTemplate',
|
||||
localStorage.getItem('lastFilenameTemplate') ?? ''
|
||||
)
|
||||
|
||||
export const downloadTemplateState = selector({
|
||||
key: 'downloadTemplateState',
|
||||
get: ({ get }) =>
|
||||
`${get(customArgsState)} ${get(cookiesTemplateState)}`
|
||||
.replace(/ +/g, ' ')
|
||||
.trim()
|
||||
})
|
||||
export const savedTemplatesState = atom<Promise<CustomTemplate[]>>(async (get) => {
|
||||
const task = ffetch<CustomTemplate[]>(`${get(serverURL)}/api/v1/template/all`)
|
||||
const either = await task()
|
||||
|
||||
export const savedTemplatesState = selector<CustomTemplate[]>({
|
||||
key: 'savedTemplatesState',
|
||||
get: async ({ get }) => {
|
||||
const task = ffetch<CustomTemplate[]>(`${get(serverURL)}/api/v1/template/all`)
|
||||
const either = await task()
|
||||
|
||||
return pipe(
|
||||
either,
|
||||
getOrElse(() => new Array<CustomTemplate>())
|
||||
)
|
||||
}
|
||||
})
|
||||
return pipe(
|
||||
either,
|
||||
getOrElse(() => new Array<CustomTemplate>())
|
||||
)
|
||||
}
|
||||
)
|
||||
@@ -1,22 +1,13 @@
|
||||
import * as O from 'fp-ts/Option'
|
||||
import { pipe } from 'fp-ts/lib/function'
|
||||
import { atom, selector } from 'recoil'
|
||||
import { RPCResult } from '../types'
|
||||
import { atom } from 'jotai'
|
||||
|
||||
export const downloadsState = atom<O.Option<RPCResult[]>>({
|
||||
key: 'downloadsState',
|
||||
default: O.none
|
||||
})
|
||||
export const downloadsState = atom<O.Option<RPCResult[]>>(O.none)
|
||||
|
||||
export const loadingDownloadsState = selector<boolean>({
|
||||
key: 'loadingDownloadsState',
|
||||
get: ({ get }) => O.isNone(get(downloadsState))
|
||||
})
|
||||
export const loadingDownloadsState = atom<boolean>((get) => O.isNone(get(downloadsState)))
|
||||
|
||||
export const activeDownloadsState = selector<RPCResult[]>({
|
||||
key: 'activeDownloadsState',
|
||||
get: ({ get }) => pipe(
|
||||
get(downloadsState),
|
||||
O.getOrElse(() => new Array<RPCResult>())
|
||||
)
|
||||
})
|
||||
export const activeDownloadsState = atom<RPCResult[]>((get) => pipe(
|
||||
get(downloadsState),
|
||||
O.getOrElse(() => new Array<RPCResult>())
|
||||
))
|
||||
@@ -1,9 +0,0 @@
|
||||
import { selector } from 'recoil'
|
||||
import I18nBuilder from '../lib/intl'
|
||||
import { languageState } from './settings'
|
||||
|
||||
export const i18nBuilderState = selector({
|
||||
key: 'i18nBuilderState',
|
||||
get: ({ get }) => new I18nBuilder(get(languageState)),
|
||||
dangerouslyAllowMutability: true,
|
||||
})
|
||||
@@ -1,23 +1,17 @@
|
||||
import { atom, selector } from 'recoil'
|
||||
import { atom } from 'jotai'
|
||||
import { RPCClient } from '../lib/rpcClient'
|
||||
import { rpcHTTPEndpoint, rpcWebSocketEndpoint } from './settings'
|
||||
import { atomWithStorage } from 'jotai/utils'
|
||||
|
||||
export const rpcClientState = selector({
|
||||
key: 'rpcClientState',
|
||||
get: ({ get }) =>
|
||||
new RPCClient(
|
||||
get(rpcHTTPEndpoint),
|
||||
get(rpcWebSocketEndpoint),
|
||||
localStorage.getItem('token') ?? ''
|
||||
),
|
||||
dangerouslyAllowMutability: true,
|
||||
})
|
||||
export const rpcClientState = atom((get) =>
|
||||
new RPCClient(
|
||||
get(rpcHTTPEndpoint),
|
||||
get(rpcWebSocketEndpoint),
|
||||
localStorage.getItem('token') ?? ''
|
||||
),
|
||||
)
|
||||
|
||||
export const rpcPollingTimeState = atom({
|
||||
key: 'rpcPollingTimeState',
|
||||
default: Number(localStorage.getItem('rpc-polling-time')) || 1000,
|
||||
effects: [
|
||||
({ onSet }) =>
|
||||
onSet(a => localStorage.setItem('rpc-polling-time', a.toString()))
|
||||
]
|
||||
})
|
||||
export const rpcPollingTimeState = atomWithStorage(
|
||||
'rpc-polling-time',
|
||||
Number(localStorage.getItem('rpc-polling-time')) || 1000
|
||||
)
|
||||
@@ -1,18 +1,26 @@
|
||||
import { atom, selector } from 'recoil'
|
||||
import { pipe } from 'fp-ts/lib/function'
|
||||
import { matchW } from 'fp-ts/lib/TaskEither'
|
||||
import { ffetch } from '../lib/httpClient'
|
||||
import { prefersDarkMode } from '../utils'
|
||||
import { atomWithStorage } from 'jotai/utils'
|
||||
import { atom } from 'jotai'
|
||||
|
||||
export const languages = [
|
||||
'english',
|
||||
'chinese',
|
||||
'russian',
|
||||
'italian',
|
||||
'spanish',
|
||||
'korean',
|
||||
'japanese',
|
||||
'catalan',
|
||||
'ukrainian',
|
||||
'chinese',
|
||||
'english',
|
||||
'french',
|
||||
'german',
|
||||
'italian',
|
||||
'japanese',
|
||||
'korean',
|
||||
'polish',
|
||||
'german'
|
||||
'portuguese-br',
|
||||
'russian',
|
||||
'spanish',
|
||||
'swedish',
|
||||
'ukrainian',
|
||||
'hungarian'
|
||||
] as const
|
||||
|
||||
export type Language = (typeof languages)[number]
|
||||
@@ -20,14 +28,19 @@ export type Language = (typeof languages)[number]
|
||||
export type Theme = 'light' | 'dark' | 'system'
|
||||
export type ThemeNarrowed = 'light' | 'dark'
|
||||
|
||||
export const accents = ['default', 'red'] as const
|
||||
export type Accent = (typeof accents)[number]
|
||||
|
||||
export interface SettingsState {
|
||||
serverAddr: string
|
||||
serverPort: number
|
||||
language: Language
|
||||
theme: ThemeNarrowed
|
||||
accent: Accent
|
||||
cliArgs: string
|
||||
formatSelection: boolean
|
||||
fileRenaming: boolean
|
||||
autoFileExtension: boolean
|
||||
pathOverriding: boolean
|
||||
enableCustomArgs: boolean
|
||||
listView: boolean
|
||||
@@ -35,192 +48,137 @@ export interface SettingsState {
|
||||
appTitle: string
|
||||
}
|
||||
|
||||
export const languageState = atom<Language>({
|
||||
key: 'languageState',
|
||||
default: localStorage.getItem('language') as Language || 'english',
|
||||
effects: [
|
||||
({ onSet }) =>
|
||||
onSet(l => localStorage.setItem('language', l.toString()))
|
||||
]
|
||||
})
|
||||
export const languageState = atomWithStorage<Language>(
|
||||
'language',
|
||||
localStorage.getItem('language') as Language || 'english'
|
||||
)
|
||||
|
||||
export const themeState = atom<Theme>({
|
||||
key: 'themeStateState',
|
||||
default: localStorage.getItem('theme') as Theme || 'system',
|
||||
effects: [
|
||||
({ onSet }) =>
|
||||
onSet(l => localStorage.setItem('theme', l.toString()))
|
||||
]
|
||||
})
|
||||
export const themeState = atomWithStorage<Theme>(
|
||||
'theme',
|
||||
localStorage.getItem('theme') as Theme || 'system'
|
||||
)
|
||||
|
||||
export const serverAddressState = atom<string>({
|
||||
key: 'serverAddressState',
|
||||
default: localStorage.getItem('server-addr') || window.location.hostname,
|
||||
effects: [
|
||||
({ onSet }) =>
|
||||
onSet(a => localStorage.setItem('server-addr', a.toString()))
|
||||
]
|
||||
})
|
||||
export const serverAddressState = atomWithStorage<string>(
|
||||
'server-addr',
|
||||
localStorage.getItem('server-addr') || window.location.hostname
|
||||
)
|
||||
|
||||
export const serverPortState = atom<number>({
|
||||
key: 'serverPortState',
|
||||
default: Number(localStorage.getItem('server-port')) || Number(window.location.port),
|
||||
effects: [
|
||||
({ onSet }) =>
|
||||
onSet(a => localStorage.setItem('server-port', a.toString()))
|
||||
]
|
||||
})
|
||||
export const serverPortState = atomWithStorage<number>(
|
||||
'server-port',
|
||||
Number(localStorage.getItem('server-port')) || Number(window.location.port)
|
||||
)
|
||||
|
||||
export const latestCliArgumentsState = atom<string>({
|
||||
key: 'latestCliArgumentsState',
|
||||
default: localStorage.getItem('cli-args') || '--no-mtime',
|
||||
effects: [
|
||||
({ onSet }) =>
|
||||
onSet(a => localStorage.setItem('cli-args', a.toString()))
|
||||
]
|
||||
})
|
||||
export const latestCliArgumentsState = atomWithStorage<string>(
|
||||
'cli-args',
|
||||
localStorage.getItem('cli-args') || '--no-mtime'
|
||||
)
|
||||
|
||||
export const formatSelectionState = atom({
|
||||
key: 'formatSelectionState',
|
||||
default: localStorage.getItem('format-selection') === "true",
|
||||
effects: [
|
||||
({ onSet }) =>
|
||||
onSet(a => localStorage.setItem('format-selection', a.toString()))
|
||||
]
|
||||
})
|
||||
export const formatSelectionState = atomWithStorage(
|
||||
'format-selection',
|
||||
localStorage.getItem('format-selection') === 'true'
|
||||
)
|
||||
|
||||
export const fileRenamingState = atom({
|
||||
key: 'fileRenamingState',
|
||||
default: localStorage.getItem('file-renaming') === "true",
|
||||
effects: [
|
||||
({ onSet }) =>
|
||||
onSet(a => localStorage.setItem('file-renaming', a.toString()))
|
||||
]
|
||||
})
|
||||
export const fileRenamingState = atomWithStorage(
|
||||
'file-renaming',
|
||||
localStorage.getItem('file-renaming') === 'true'
|
||||
)
|
||||
|
||||
export const pathOverridingState = atom({
|
||||
key: 'pathOverridingState',
|
||||
default: localStorage.getItem('path-overriding') === "true",
|
||||
effects: [
|
||||
({ onSet }) =>
|
||||
onSet(a => localStorage.setItem('path-overriding', a.toString()))
|
||||
]
|
||||
})
|
||||
export const autoFileExtensionState = atomWithStorage(
|
||||
'auto-file-extension',
|
||||
localStorage.getItem('auto-file-extension') === 'true'
|
||||
)
|
||||
|
||||
export const enableCustomArgsState = atom({
|
||||
key: 'enableCustomArgsState',
|
||||
default: localStorage.getItem('enable-custom-args') === "true",
|
||||
effects: [
|
||||
({ onSet }) =>
|
||||
onSet(a => localStorage.setItem('enable-custom-args', a.toString()))
|
||||
]
|
||||
})
|
||||
export const pathOverridingState = atomWithStorage(
|
||||
'path-overriding',
|
||||
localStorage.getItem('path-overriding') === 'true'
|
||||
)
|
||||
|
||||
export const listViewState = atom({
|
||||
key: 'listViewState',
|
||||
default: localStorage.getItem('listview') === "true",
|
||||
effects: [
|
||||
({ onSet }) =>
|
||||
onSet(a => localStorage.setItem('listview', a.toString()))
|
||||
]
|
||||
})
|
||||
export const enableCustomArgsState = atomWithStorage(
|
||||
'enable-custom-args',
|
||||
localStorage.getItem('enable-custom-args') === 'true'
|
||||
)
|
||||
|
||||
export const servedFromReverseProxyState = atom({
|
||||
key: 'servedFromReverseProxyState',
|
||||
default: localStorage.getItem('reverseProxy') === "true" || window.location.port == "",
|
||||
effects: [
|
||||
({ onSet }) =>
|
||||
onSet(a => localStorage.setItem('reverseProxy', a.toString()))
|
||||
]
|
||||
})
|
||||
export const listViewState = atomWithStorage(
|
||||
'listview',
|
||||
localStorage.getItem('listview') === 'true'
|
||||
)
|
||||
|
||||
export const servedFromReverseProxySubDirState = atom<string>({
|
||||
key: 'servedFromReverseProxySubDirState',
|
||||
default: localStorage.getItem('reverseProxySubDir') ?? '',
|
||||
effects: [
|
||||
({ onSet }) =>
|
||||
onSet(a => localStorage.setItem('reverseProxySubDir', a))
|
||||
]
|
||||
})
|
||||
export const servedFromReverseProxyState = atomWithStorage(
|
||||
'reverseProxy',
|
||||
localStorage.getItem('reverseProxy') === 'true' || window.location.port == ''
|
||||
)
|
||||
|
||||
export const appTitleState = atom({
|
||||
key: 'appTitleState',
|
||||
default: localStorage.getItem('appTitle') ?? 'yt-dlp Web UI',
|
||||
effects: [
|
||||
({ onSet }) =>
|
||||
onSet(a => localStorage.setItem('appTitle', a.toString()))
|
||||
]
|
||||
})
|
||||
export const servedFromReverseProxySubDirState = atomWithStorage<string>(
|
||||
'reverseProxySubDir',
|
||||
localStorage.getItem('reverseProxySubDir') ?? ''
|
||||
)
|
||||
|
||||
export const serverAddressAndPortState = selector({
|
||||
key: 'serverAddressAndPortState',
|
||||
get: ({ get }) => {
|
||||
if (get(servedFromReverseProxySubDirState)) {
|
||||
return `${get(serverAddressState)}/${get(servedFromReverseProxySubDirState)}/`
|
||||
}
|
||||
if (get(servedFromReverseProxyState)) {
|
||||
return `${get(serverAddressState)}`
|
||||
}
|
||||
return `${get(serverAddressState)}:${get(serverPortState)}`
|
||||
export const appTitleState = atomWithStorage(
|
||||
'appTitle',
|
||||
localStorage.getItem('appTitle') ?? 'yt-dlp Web UI'
|
||||
)
|
||||
|
||||
export const serverAddressAndPortState = atom((get) => {
|
||||
if (get(servedFromReverseProxySubDirState)) {
|
||||
return `${get(serverAddressState)}/${get(servedFromReverseProxySubDirState)}/`
|
||||
.replaceAll('"', '') // TODO: atomWithStorage put extra double quotes on strings
|
||||
}
|
||||
})
|
||||
|
||||
export const serverURL = selector({
|
||||
key: 'serverURL',
|
||||
get: ({ get }) =>
|
||||
`${window.location.protocol}//${get(serverAddressAndPortState)}`
|
||||
})
|
||||
|
||||
export const rpcWebSocketEndpoint = selector({
|
||||
key: 'rpcWebSocketEndpoint',
|
||||
get: ({ get }) => {
|
||||
const proto = window.location.protocol === 'https:' ? 'wss:' : 'ws:'
|
||||
return `${proto}//${get(serverAddressAndPortState)}/rpc/ws`
|
||||
if (get(servedFromReverseProxyState)) {
|
||||
return `${get(serverAddressState)}`
|
||||
.replaceAll('"', '')
|
||||
}
|
||||
return `${get(serverAddressState)}:${get(serverPortState)}`
|
||||
.replaceAll('"', '')
|
||||
})
|
||||
|
||||
export const rpcHTTPEndpoint = selector({
|
||||
key: 'rpcHTTPEndpoint',
|
||||
get: ({ get }) => {
|
||||
const proto = window.location.protocol
|
||||
return `${proto}//${get(serverAddressAndPortState)}/rpc/http`
|
||||
export const serverURL = atom((get) =>
|
||||
`${window.location.protocol}//${get(serverAddressAndPortState)}`
|
||||
)
|
||||
|
||||
export const rpcWebSocketEndpoint = atom((get) => {
|
||||
const proto = window.location.protocol === 'https:' ? 'wss:' : 'ws:'
|
||||
return `${proto}//${get(serverAddressAndPortState)}/rpc/ws`
|
||||
})
|
||||
|
||||
export const rpcHTTPEndpoint = atom((get) => {
|
||||
const proto = window.location.protocol
|
||||
return `${proto}//${get(serverAddressAndPortState)}/rpc/http`
|
||||
})
|
||||
|
||||
export const serverSideCookiesState = atom<Promise<string>>(async (get) => await pipe(
|
||||
ffetch<Readonly<{ cookies: string }>>(`${get(serverURL)}/api/v1/cookies`),
|
||||
matchW(
|
||||
() => '',
|
||||
(r) => r.cookies
|
||||
)
|
||||
)())
|
||||
|
||||
const themeSelector = atom<ThemeNarrowed>((get) => {
|
||||
const theme = get(themeState)
|
||||
if ((theme === 'system' && prefersDarkMode()) || theme === 'dark') {
|
||||
return 'dark'
|
||||
}
|
||||
return 'light'
|
||||
})
|
||||
|
||||
export const cookiesState = atom({
|
||||
key: 'cookiesState',
|
||||
default: localStorage.getItem('yt-dlp-cookies') ?? '',
|
||||
effects: [
|
||||
({ onSet }) =>
|
||||
onSet(c => localStorage.setItem('yt-dlp-cookies', c))
|
||||
]
|
||||
})
|
||||
export const accentState = atomWithStorage<Accent>(
|
||||
'accent-color',
|
||||
localStorage.getItem('accent-color') as Accent ?? 'default',
|
||||
)
|
||||
|
||||
const themeSelector = selector<ThemeNarrowed>({
|
||||
key: 'themeSelector',
|
||||
get: ({ get }) => {
|
||||
const theme = get(themeState)
|
||||
if ((theme === 'system' && prefersDarkMode()) || theme === 'dark') {
|
||||
return 'dark'
|
||||
}
|
||||
return 'light'
|
||||
}
|
||||
})
|
||||
|
||||
export const settingsState = selector<SettingsState>({
|
||||
key: 'settingsState',
|
||||
get: ({ get }) => ({
|
||||
serverAddr: get(serverAddressState),
|
||||
serverPort: get(serverPortState),
|
||||
language: get(languageState),
|
||||
theme: get(themeSelector),
|
||||
cliArgs: get(latestCliArgumentsState),
|
||||
formatSelection: get(formatSelectionState),
|
||||
fileRenaming: get(fileRenamingState),
|
||||
pathOverriding: get(pathOverridingState),
|
||||
enableCustomArgs: get(enableCustomArgsState),
|
||||
listView: get(listViewState),
|
||||
servedFromReverseProxy: get(servedFromReverseProxyState),
|
||||
appTitle: get(appTitleState)
|
||||
})
|
||||
})
|
||||
export const settingsState = atom<SettingsState>((get) => ({
|
||||
serverAddr: get(serverAddressState),
|
||||
serverPort: get(serverPortState),
|
||||
language: get(languageState),
|
||||
theme: get(themeSelector),
|
||||
accent: get(accentState),
|
||||
cliArgs: get(latestCliArgumentsState),
|
||||
formatSelection: get(formatSelectionState),
|
||||
fileRenaming: get(fileRenamingState),
|
||||
autoFileExtension: get(autoFileExtensionState),
|
||||
pathOverriding: get(pathOverridingState),
|
||||
enableCustomArgs: get(enableCustomArgsState),
|
||||
listView: get(listViewState),
|
||||
servedFromReverseProxy: get(servedFromReverseProxyState),
|
||||
appTitle: get(appTitleState)
|
||||
}))
|
||||
|
||||
@@ -1,25 +1,34 @@
|
||||
import { atom, selector } from 'recoil'
|
||||
import { pipe } from 'fp-ts/lib/function'
|
||||
import { of } from 'fp-ts/lib/Task'
|
||||
import { getOrElse } from 'fp-ts/lib/TaskEither'
|
||||
import { ffetch } from '../lib/httpClient'
|
||||
import { RPCVersion } from '../types'
|
||||
import { rpcClientState } from './rpc'
|
||||
import { serverURL } from './settings'
|
||||
import { atom } from 'jotai'
|
||||
|
||||
export const connectedState = atom({
|
||||
key: 'connectedState',
|
||||
default: false
|
||||
export const connectedState = atom(false)
|
||||
|
||||
export const freeSpaceBytesState = atom(async (get) => {
|
||||
const res = await get(rpcClientState)
|
||||
.freeSpace()
|
||||
.catch(() => ({ result: 0 }))
|
||||
return res.result
|
||||
})
|
||||
|
||||
export const freeSpaceBytesState = selector({
|
||||
key: 'freeSpaceBytesState',
|
||||
get: async ({ get }) => {
|
||||
const res = await get(rpcClientState).freeSpace()
|
||||
.catch(() => ({ result: 0 }))
|
||||
return res.result
|
||||
}
|
||||
export const availableDownloadPathsState = atom(async (get) => {
|
||||
const res = await get(rpcClientState).directoryTree()
|
||||
.catch(() => ({ result: [] }))
|
||||
return res.result
|
||||
})
|
||||
|
||||
export const availableDownloadPathsState = selector({
|
||||
key: 'availableDownloadPathsState',
|
||||
get: async ({ get }) => {
|
||||
const res = await get(rpcClientState).directoryTree()
|
||||
.catch(() => ({ result: [] }))
|
||||
return res.result
|
||||
}
|
||||
})
|
||||
export const ytdlpRpcVersionState = atom<Promise<RPCVersion>>(async (get) => await pipe(
|
||||
ffetch<RPCVersion>(`${get(serverURL)}/api/v1/version`),
|
||||
getOrElse(() => pipe(
|
||||
{
|
||||
rpcVersion: 'unknown version',
|
||||
ytdlpVersion: 'unknown version',
|
||||
},
|
||||
of
|
||||
)),
|
||||
)())
|
||||
@@ -1,5 +1,5 @@
|
||||
import { AlertColor } from '@mui/material'
|
||||
import { atom } from 'recoil'
|
||||
import { atom } from 'jotai'
|
||||
|
||||
export type Toast = {
|
||||
open: boolean,
|
||||
@@ -9,7 +9,4 @@ export type Toast = {
|
||||
severity?: AlertColor
|
||||
}
|
||||
|
||||
export const toastListState = atom<Toast[]>({
|
||||
key: 'toastListState',
|
||||
default: [],
|
||||
})
|
||||
export const toastListState = atom<Toast[]>([])
|
||||
@@ -1,14 +1,10 @@
|
||||
import { atom, selector } from 'recoil'
|
||||
import { atom } from 'jotai'
|
||||
import { activeDownloadsState } from './downloads'
|
||||
|
||||
export const loadingAtom = atom({
|
||||
key: 'loadingAtom',
|
||||
default: true
|
||||
})
|
||||
export const loadingAtom = atom(true)
|
||||
|
||||
export const totalDownloadSpeedState = selector<number>({
|
||||
key: 'totalDownloadSpeedState',
|
||||
get: ({ get }) => get(activeDownloadsState)
|
||||
export const totalDownloadSpeedState = atom<number>((get) =>
|
||||
get(activeDownloadsState)
|
||||
.map(d => d.progress.speed)
|
||||
.reduce((curr, next) => curr + next, 0)
|
||||
})
|
||||
)
|
||||
98
frontend/src/components/ArchiveCard.tsx
Normal file
98
frontend/src/components/ArchiveCard.tsx
Normal file
@@ -0,0 +1,98 @@
|
||||
import DeleteIcon from '@mui/icons-material/Delete'
|
||||
import DeleteForeverIcon from '@mui/icons-material/DeleteForever'
|
||||
import OpenInBrowserIcon from '@mui/icons-material/OpenInBrowser'
|
||||
import SaveAltIcon from '@mui/icons-material/SaveAlt'
|
||||
import {
|
||||
Card,
|
||||
CardActionArea,
|
||||
CardActions,
|
||||
CardContent,
|
||||
CardMedia,
|
||||
IconButton,
|
||||
Skeleton,
|
||||
Tooltip,
|
||||
Typography
|
||||
} from '@mui/material'
|
||||
import { useAtomValue } from 'jotai'
|
||||
import { serverURL } from '../atoms/settings'
|
||||
import { ArchiveEntry } from '../types'
|
||||
import { base64URLEncode, ellipsis } from '../utils'
|
||||
|
||||
type Props = {
|
||||
entry: ArchiveEntry
|
||||
onDelete: (id: string) => void
|
||||
onHardDelete: (id: string) => void
|
||||
}
|
||||
|
||||
const ArchiveCard: React.FC<Props> = ({ entry, onDelete, onHardDelete }) => {
|
||||
const serverAddr = useAtomValue(serverURL)
|
||||
|
||||
const viewFile = (path: string) => {
|
||||
const encoded = base64URLEncode(path)
|
||||
window.open(`${serverAddr}/filebrowser/v/${encoded}?token=${localStorage.getItem('token')}`)
|
||||
}
|
||||
|
||||
const downloadFile = (path: string) => {
|
||||
const encoded = base64URLEncode(path)
|
||||
window.open(`${serverAddr}/filebrowser/d/${encoded}?token=${localStorage.getItem('token')}`)
|
||||
}
|
||||
|
||||
return (
|
||||
<Card>
|
||||
<CardActionArea onClick={() => navigator.clipboard.writeText(entry.source)}>
|
||||
{entry.thumbnail !== '' ?
|
||||
<CardMedia
|
||||
component="img"
|
||||
height={180}
|
||||
image={entry.thumbnail}
|
||||
/> :
|
||||
<Skeleton variant="rectangular" height={180} />
|
||||
}
|
||||
<CardContent>
|
||||
{entry.title !== '' ?
|
||||
<Typography gutterBottom variant="h6" component="div">
|
||||
{ellipsis(entry.title, 60)}
|
||||
</Typography> :
|
||||
<Skeleton />
|
||||
}
|
||||
{/* <code>
|
||||
{JSON.stringify(JSON.parse(entry.metadata), null, 2)}
|
||||
</code> */}
|
||||
<p>{new Date(entry.created_at).toLocaleString()}</p>
|
||||
</CardContent>
|
||||
</CardActionArea>
|
||||
<CardActions>
|
||||
<Tooltip title="Open in browser">
|
||||
<IconButton
|
||||
onClick={() => viewFile(entry.path)}
|
||||
>
|
||||
<OpenInBrowserIcon />
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
<Tooltip title="Download this file">
|
||||
<IconButton
|
||||
onClick={() => downloadFile(entry.path)}
|
||||
>
|
||||
<SaveAltIcon />
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
<Tooltip title="Delete from archive">
|
||||
<IconButton
|
||||
onClick={() => onDelete(entry.id)}
|
||||
>
|
||||
<DeleteIcon />
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
<Tooltip title="Delete from disk">
|
||||
<IconButton
|
||||
onClick={() => onHardDelete(entry.id)}
|
||||
>
|
||||
<DeleteForeverIcon />
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
</CardActions>
|
||||
</Card>
|
||||
)
|
||||
}
|
||||
|
||||
export default ArchiveCard
|
||||
@@ -1,22 +1,23 @@
|
||||
import { TextField } from '@mui/material'
|
||||
import { Button, TextField } from '@mui/material'
|
||||
import * as A from 'fp-ts/Array'
|
||||
import * as E from 'fp-ts/Either'
|
||||
import * as O from 'fp-ts/Option'
|
||||
import { matchW } from 'fp-ts/lib/TaskEither'
|
||||
import { pipe } from 'fp-ts/lib/function'
|
||||
import { useMemo } from 'react'
|
||||
import { useRecoilState, useRecoilValue } from 'recoil'
|
||||
import { Subject, debounceTime, distinctUntilChanged } from 'rxjs'
|
||||
import { cookiesTemplateState } from '../atoms/downloadTemplate'
|
||||
import { cookiesState, serverURL } from '../atoms/settings'
|
||||
import { serverSideCookiesState, serverURL } from '../atoms/settings'
|
||||
import { useSubscription } from '../hooks/observable'
|
||||
import { useToast } from '../hooks/toast'
|
||||
import { ffetch } from '../lib/httpClient'
|
||||
import { useAtomValue } from 'jotai'
|
||||
import { useI18n } from '../hooks/useI18n'
|
||||
|
||||
const { i18n } = useI18n()
|
||||
|
||||
const validateCookie = (cookie: string) => pipe(
|
||||
cookie,
|
||||
cookie => cookie.replace(/\s\s+/g, ' '),
|
||||
cookie => cookie.replaceAll('\t', ' '),
|
||||
cookie => cookie.split(' '),
|
||||
cookie => cookie.split('\t'),
|
||||
E.of,
|
||||
E.flatMap(
|
||||
E.fromPredicate(
|
||||
@@ -68,13 +69,19 @@ const validateCookie = (cookie: string) => pipe(
|
||||
),
|
||||
)
|
||||
|
||||
const noopValidator = (s: string): E.Either<string, string[]> => pipe(
|
||||
s,
|
||||
s => s.split('\t'),
|
||||
E.of
|
||||
)
|
||||
|
||||
const isCommentOrNewLine = (s: string) => s === '' || s.startsWith('\n') || s.startsWith('#')
|
||||
|
||||
const CookiesTextField: React.FC = () => {
|
||||
const serverAddr = useRecoilValue(serverURL)
|
||||
const [, setCookies] = useRecoilState(cookiesTemplateState)
|
||||
const [savedCookies, setSavedCookies] = useRecoilState(cookiesState)
|
||||
const serverAddr = useAtomValue(serverURL)
|
||||
const savedCookies = useAtomValue(serverSideCookiesState)
|
||||
|
||||
const { pushMessage } = useToast()
|
||||
const flag = '--cookies=cookies.txt'
|
||||
|
||||
const cookies$ = useMemo(() => new Subject<string>(), [])
|
||||
|
||||
@@ -86,28 +93,41 @@ const CookiesTextField: React.FC = () => {
|
||||
})
|
||||
})()
|
||||
|
||||
const deleteCookies = () => pipe(
|
||||
ffetch(`${serverAddr}/api/v1/cookies`, {
|
||||
method: 'DELETE',
|
||||
}),
|
||||
matchW(
|
||||
(l) => pushMessage(l, 'error'),
|
||||
(_) => {
|
||||
pushMessage('Deleted cookies', 'success')
|
||||
pushMessage(`Reload the page to apply the changes`, 'info')
|
||||
}
|
||||
)
|
||||
)()
|
||||
|
||||
const validateNetscapeCookies = (cookies: string) => pipe(
|
||||
cookies,
|
||||
cookies => cookies.split('\n'),
|
||||
cookies => cookies.filter(f => !f.startsWith('\n')), // empty lines
|
||||
cookies => cookies.filter(f => !f.startsWith('# ')), // comments
|
||||
cookies => cookies.filter(Boolean), // empty lines
|
||||
A.map(validateCookie),
|
||||
A.mapWithIndex((i, either) => pipe(
|
||||
A.map(c => isCommentOrNewLine(c) ? noopValidator(c) : validateCookie(c)), // validate line
|
||||
A.mapWithIndex((i, either) => pipe( // detect errors and return the either
|
||||
either,
|
||||
E.matchW(
|
||||
(l) => pushMessage(`Error in line ${i + 1}: ${l}`, 'warning'),
|
||||
() => E.isRight(either)
|
||||
E.match(
|
||||
(l) => {
|
||||
pushMessage(`Error in line ${i + 1}: ${l}`, 'warning')
|
||||
return either
|
||||
},
|
||||
(_) => either
|
||||
),
|
||||
)),
|
||||
A.filter(Boolean),
|
||||
A.match(
|
||||
() => false,
|
||||
(c) => {
|
||||
pushMessage(`Valid ${c.length} Netscape cookies`, 'info')
|
||||
return true
|
||||
}
|
||||
)
|
||||
A.filter(c => E.isRight(c)), // filter the line who didn't pass the validation
|
||||
A.map(E.getOrElse(() => new Array<string>())), // cast the array of eithers to an array of tokens
|
||||
A.filter(f => f.length > 0), // filter the empty tokens
|
||||
A.map(f => f.join('\t')), // join the tokens in a TAB separated string
|
||||
A.reduce('', (c, n) => `${c}${n}\n`), // reduce all to a single string separated by \n
|
||||
parsed => parsed.length > 0 // if nothing has passed the validation return none
|
||||
? O.some(parsed)
|
||||
: O.none
|
||||
)
|
||||
|
||||
useSubscription(
|
||||
@@ -117,22 +137,17 @@ const CookiesTextField: React.FC = () => {
|
||||
),
|
||||
(cookies) => pipe(
|
||||
cookies,
|
||||
cookies => {
|
||||
setSavedCookies(cookies)
|
||||
return cookies
|
||||
},
|
||||
validateNetscapeCookies,
|
||||
O.fromPredicate(f => f === true),
|
||||
O.match(
|
||||
() => setCookies(''),
|
||||
async () => {
|
||||
() => pushMessage('No valid cookies', 'warning'),
|
||||
async (some) => {
|
||||
pipe(
|
||||
await submitCookies(cookies),
|
||||
await submitCookies(some.trimEnd()),
|
||||
E.match(
|
||||
(l) => pushMessage(`${l}`, 'error'),
|
||||
() => {
|
||||
pushMessage(`Saved Netscape cookies`, 'success')
|
||||
setCookies(flag)
|
||||
pushMessage(`Saved ${some.split('\n').length} Netscape cookies`, 'success')
|
||||
pushMessage('Reload the page to apply the changes', 'info')
|
||||
}
|
||||
)
|
||||
)
|
||||
@@ -142,15 +157,18 @@ const CookiesTextField: React.FC = () => {
|
||||
)
|
||||
|
||||
return (
|
||||
<TextField
|
||||
label="Netscape Cookies"
|
||||
multiline
|
||||
maxRows={20}
|
||||
minRows={4}
|
||||
fullWidth
|
||||
defaultValue={savedCookies}
|
||||
onChange={(e) => cookies$.next(e.currentTarget.value)}
|
||||
/>
|
||||
<>
|
||||
<TextField
|
||||
label="Netscape Cookies"
|
||||
multiline
|
||||
maxRows={20}
|
||||
minRows={4}
|
||||
fullWidth
|
||||
defaultValue={savedCookies}
|
||||
onChange={(e) => cookies$.next(e.currentTarget.value)}
|
||||
/>
|
||||
<Button onClick={deleteCookies}>{i18n.t('deleteCookies')}</Button>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
35
frontend/src/components/CustomArgsTextField.tsx
Normal file
35
frontend/src/components/CustomArgsTextField.tsx
Normal file
@@ -0,0 +1,35 @@
|
||||
import { TextField } from '@mui/material'
|
||||
import { useAtom, useAtomValue } from 'jotai'
|
||||
import { customArgsState } from '../atoms/downloadTemplate'
|
||||
import { settingsState } from '../atoms/settings'
|
||||
import { useI18n } from '../hooks/useI18n'
|
||||
import { useEffect } from 'react'
|
||||
|
||||
const CustomArgsTextField: React.FC = () => {
|
||||
const { i18n } = useI18n()
|
||||
|
||||
const settings = useAtomValue(settingsState)
|
||||
|
||||
const [customArgs, setCustomArgs] = useAtom(customArgsState)
|
||||
|
||||
useEffect(() => {
|
||||
setCustomArgs('')
|
||||
}, [])
|
||||
|
||||
const handleCustomArgsChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
||||
setCustomArgs(e.target.value)
|
||||
}
|
||||
|
||||
return (
|
||||
<TextField
|
||||
fullWidth
|
||||
label={i18n.t('customArgsInput')}
|
||||
variant="outlined"
|
||||
onChange={handleCustomArgsChange}
|
||||
value={customArgs}
|
||||
disabled={settings.formatSelection}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
export default CustomArgsTextField
|
||||
@@ -1,7 +1,3 @@
|
||||
import EightK from '@mui/icons-material/EightK'
|
||||
import FourK from '@mui/icons-material/FourK'
|
||||
import Hd from '@mui/icons-material/Hd'
|
||||
import Sd from '@mui/icons-material/Sd'
|
||||
import {
|
||||
Button,
|
||||
Card,
|
||||
@@ -10,16 +6,23 @@ import {
|
||||
CardContent,
|
||||
CardMedia,
|
||||
Chip,
|
||||
IconButton,
|
||||
LinearProgress,
|
||||
Skeleton,
|
||||
Stack,
|
||||
Tooltip,
|
||||
Typography
|
||||
} from '@mui/material'
|
||||
import { useAtomValue } from 'jotai'
|
||||
import { useCallback } from 'react'
|
||||
import { useRecoilValue } from 'recoil'
|
||||
import { serverURL } from '../atoms/settings'
|
||||
import { RPCResult } from '../types'
|
||||
import { base64URLEncode, ellipsis, formatSize, formatSpeedMiB, mapProcessStatus } from '../utils'
|
||||
import ResolutionBadge from './ResolutionBadge'
|
||||
import ClearIcon from '@mui/icons-material/Clear'
|
||||
import StopCircleIcon from '@mui/icons-material/StopCircle'
|
||||
import OpenInBrowserIcon from '@mui/icons-material/OpenInBrowser'
|
||||
import SaveAltIcon from '@mui/icons-material/SaveAlt'
|
||||
|
||||
type Props = {
|
||||
download: RPCResult
|
||||
@@ -27,17 +30,8 @@ type Props = {
|
||||
onCopy: () => void
|
||||
}
|
||||
|
||||
const Resolution: React.FC<{ resolution?: string }> = ({ resolution }) => {
|
||||
if (!resolution) return null
|
||||
if (resolution.includes('4320')) return <EightK color="primary" />
|
||||
if (resolution.includes('2160')) return <FourK color="primary" />
|
||||
if (resolution.includes('1080')) return <Hd color="primary" />
|
||||
if (resolution.includes('720')) return <Sd color="primary" />
|
||||
return null
|
||||
}
|
||||
|
||||
const DownloadCard: React.FC<Props> = ({ download, onStop, onCopy }) => {
|
||||
const serverAddr = useRecoilValue(serverURL)
|
||||
const serverAddr = useAtomValue(serverURL)
|
||||
|
||||
const isCompleted = useCallback(
|
||||
() => download.progress.percentage === '-1',
|
||||
@@ -53,12 +47,12 @@ const DownloadCard: React.FC<Props> = ({ download, onStop, onCopy }) => {
|
||||
|
||||
const viewFile = (path: string) => {
|
||||
const encoded = base64URLEncode(path)
|
||||
window.open(`${serverAddr}/archive/v/${encoded}?token=${localStorage.getItem('token')}`)
|
||||
window.open(`${serverAddr}/filebrowser/v/${encoded}?token=${localStorage.getItem('token')}`)
|
||||
}
|
||||
|
||||
const downloadFile = (path: string) => {
|
||||
const encoded = base64URLEncode(path)
|
||||
window.open(`${serverAddr}/archive/d/${encoded}?token=${localStorage.getItem('token')}`)
|
||||
window.open(`${serverAddr}/filebrowser/d/${encoded}?token=${localStorage.getItem('token')}`)
|
||||
}
|
||||
|
||||
return (
|
||||
@@ -110,37 +104,44 @@ const DownloadCard: React.FC<Props> = ({ download, onStop, onCopy }) => {
|
||||
<Typography>
|
||||
{formatSize(download.info.filesize_approx ?? 0)}
|
||||
</Typography>
|
||||
<Resolution resolution={download.info.resolution} />
|
||||
<ResolutionBadge resolution={download.info.resolution} />
|
||||
</Stack>
|
||||
</CardContent>
|
||||
</CardActionArea>
|
||||
<CardActions>
|
||||
<Button
|
||||
variant="contained"
|
||||
size="small"
|
||||
color="primary"
|
||||
onClick={onStop}
|
||||
>
|
||||
{isCompleted() ? "Clear" : "Stop"}
|
||||
</Button>
|
||||
{isCompleted() ?
|
||||
<Tooltip title="Clear from the view">
|
||||
<IconButton
|
||||
onClick={onStop}
|
||||
>
|
||||
<ClearIcon />
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
:
|
||||
<Tooltip title="Stop this download">
|
||||
<IconButton
|
||||
onClick={onStop}
|
||||
>
|
||||
<StopCircleIcon />
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
}
|
||||
{isCompleted() &&
|
||||
<>
|
||||
<Button
|
||||
variant="contained"
|
||||
size="small"
|
||||
color="primary"
|
||||
onClick={() => downloadFile(download.output.savedFilePath)}
|
||||
>
|
||||
Download
|
||||
</Button>
|
||||
<Button
|
||||
variant="contained"
|
||||
size="small"
|
||||
color="primary"
|
||||
onClick={() => viewFile(download.output.savedFilePath)}
|
||||
>
|
||||
View
|
||||
</Button>
|
||||
<Tooltip title="Download this file">
|
||||
<IconButton
|
||||
onClick={() => downloadFile(download.output.savedFilePath)}
|
||||
>
|
||||
<SaveAltIcon />
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
<Tooltip title="Open in a new tab">
|
||||
<IconButton
|
||||
onClick={() => viewFile(download.output.savedFilePath)}
|
||||
>
|
||||
<OpenInBrowserIcon />
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
</>
|
||||
}
|
||||
</CardActions>
|
||||
|
||||
@@ -2,7 +2,6 @@ import { FileUpload } from '@mui/icons-material'
|
||||
import CloseIcon from '@mui/icons-material/Close'
|
||||
import {
|
||||
Autocomplete,
|
||||
Backdrop,
|
||||
Box,
|
||||
Button,
|
||||
Checkbox,
|
||||
@@ -12,7 +11,10 @@ import {
|
||||
Grid,
|
||||
IconButton,
|
||||
InputAdornment,
|
||||
MenuItem,
|
||||
Paper,
|
||||
Select,
|
||||
SelectChangeEvent,
|
||||
TextField
|
||||
} from '@mui/material'
|
||||
import AppBar from '@mui/material/AppBar'
|
||||
@@ -21,25 +23,32 @@ import Slide from '@mui/material/Slide'
|
||||
import Toolbar from '@mui/material/Toolbar'
|
||||
import Typography from '@mui/material/Typography'
|
||||
import { TransitionProps } from '@mui/material/transitions'
|
||||
import { useAtom, useAtomValue } from 'jotai'
|
||||
import {
|
||||
FC,
|
||||
Suspense,
|
||||
forwardRef,
|
||||
useEffect,
|
||||
useRef,
|
||||
useState,
|
||||
useTransition
|
||||
} from 'react'
|
||||
import { useRecoilState, useRecoilValue } from 'recoil'
|
||||
import { customArgsState, downloadTemplateState, filenameTemplateState, savedTemplatesState } from '../atoms/downloadTemplate'
|
||||
import {
|
||||
cookiesTemplateState,
|
||||
customArgsState,
|
||||
filenameTemplateState,
|
||||
savedTemplatesState
|
||||
} from '../atoms/downloadTemplate'
|
||||
import { settingsState } from '../atoms/settings'
|
||||
import { availableDownloadPathsState, connectedState } from '../atoms/status'
|
||||
import FormatsGrid from '../components/FormatsGrid'
|
||||
import { useToast } from '../hooks/toast'
|
||||
import { useI18n } from '../hooks/useI18n'
|
||||
import { useRPC } from '../hooks/useRPC'
|
||||
import type { DLMetadata } from '../types'
|
||||
import { toFormatArgs } from '../utils'
|
||||
import CustomArgsTextField from './CustomArgsTextField'
|
||||
import ExtraDownloadOptions from './ExtraDownloadOptions'
|
||||
import LoadingBackdrop from './LoadingBackdrop'
|
||||
|
||||
const Transition = forwardRef(function Transition(
|
||||
props: TransitionProps & {
|
||||
@@ -57,41 +66,40 @@ type Props = {
|
||||
}
|
||||
|
||||
const DownloadDialog: FC<Props> = ({ open, onClose, onDownloadStart }) => {
|
||||
const settings = useRecoilValue(settingsState)
|
||||
const isConnected = useRecoilValue(connectedState)
|
||||
const availableDownloadPaths = useRecoilValue(availableDownloadPathsState)
|
||||
const downloadTemplate = useRecoilValue(downloadTemplateState)
|
||||
const savedTemplates = useRecoilValue(savedTemplatesState)
|
||||
const settings = useAtomValue(settingsState)
|
||||
const isConnected = useAtomValue(connectedState)
|
||||
const availableDownloadPaths = useAtomValue(availableDownloadPathsState)
|
||||
const savedTemplates = useAtomValue(savedTemplatesState)
|
||||
const customArgs = useAtomValue(customArgsState)
|
||||
const cookies = useAtomValue(cookiesTemplateState)
|
||||
|
||||
const [downloadFormats, setDownloadFormats] = useState<DLMetadata>()
|
||||
const [pickedVideoFormat, setPickedVideoFormat] = useState('')
|
||||
const [pickedAudioFormat, setPickedAudioFormat] = useState('')
|
||||
const [pickedBestFormat, setPickedBestFormat] = useState('')
|
||||
|
||||
const [customArgs, setCustomArgs] = useRecoilState(customArgsState)
|
||||
const [isFormatsLoading, setIsFormatsLoading] = useState(false)
|
||||
|
||||
const [downloadPath, setDownloadPath] = useState('')
|
||||
|
||||
const [filenameTemplate, setFilenameTemplate] = useRecoilState(
|
||||
const [filenameTemplate, setFilenameTemplate] = useAtom(
|
||||
filenameTemplateState
|
||||
)
|
||||
|
||||
const [fileExtension, setFileExtension] = useState('.%(ext)s')
|
||||
|
||||
const [url, setUrl] = useState('')
|
||||
|
||||
const [isPlaylist, setIsPlaylist] = useState(false)
|
||||
|
||||
const { i18n } = useI18n()
|
||||
const { client } = useRPC()
|
||||
const { pushMessage } = useToast()
|
||||
|
||||
const urlInputRef = useRef<HTMLInputElement>(null)
|
||||
const customFilenameInputRef = useRef<HTMLInputElement>(null)
|
||||
|
||||
const [isPending, startTransition] = useTransition()
|
||||
|
||||
useEffect(() => {
|
||||
setCustomArgs('')
|
||||
}, [open])
|
||||
|
||||
/**
|
||||
* Retrive url from input, cli-arguments from checkboxes and emits via WebSocket
|
||||
*/
|
||||
@@ -102,12 +110,16 @@ const DownloadDialog: FC<Props> = ({ open, onClose, onDownloadStart }) => {
|
||||
if (pickedAudioFormat !== '') codes.push(pickedAudioFormat)
|
||||
if (pickedBestFormat !== '') codes.push(pickedBestFormat)
|
||||
|
||||
const downloadTemplate = `${customArgs} ${cookies}`
|
||||
.replace(/ +/g, ' ')
|
||||
.trim()
|
||||
|
||||
await new Promise(r => setTimeout(r, 10))
|
||||
client.download({
|
||||
url: immediate || line,
|
||||
args: `${toFormatArgs(codes)} ${downloadTemplate}`,
|
||||
pathOverride: downloadPath ?? '',
|
||||
renameTo: settings.fileRenaming ? filenameTemplate : '',
|
||||
renameTo: settings.fileRenaming ? filenameTemplate + (settings.autoFileExtension ? fileExtension : '') : '',
|
||||
playlist: isPlaylist,
|
||||
})
|
||||
|
||||
@@ -125,16 +137,32 @@ const DownloadDialog: FC<Props> = ({ open, onClose, onDownloadStart }) => {
|
||||
* Retrive url from input and display the formats selection view
|
||||
*/
|
||||
const sendUrlFormatSelection = () => {
|
||||
setUrl('')
|
||||
setPickedAudioFormat('')
|
||||
setPickedVideoFormat('')
|
||||
setPickedBestFormat('')
|
||||
|
||||
|
||||
if (isPlaylist) {
|
||||
pushMessage('Format selection on playlist is not supported', 'warning')
|
||||
resetInput()
|
||||
onClose()
|
||||
return
|
||||
}
|
||||
|
||||
setIsFormatsLoading(true)
|
||||
|
||||
client.formats(url)
|
||||
?.then(formats => {
|
||||
if (formats.result._type === 'playlist') {
|
||||
pushMessage('Format selection on playlist is not supported. Downloading as playlist.', 'info')
|
||||
resetInput()
|
||||
onClose()
|
||||
return
|
||||
}
|
||||
setDownloadFormats(formats.result)
|
||||
resetInput()
|
||||
})
|
||||
.then(() => setIsFormatsLoading(false))
|
||||
}
|
||||
|
||||
const handleUrlChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
||||
@@ -145,8 +173,8 @@ const DownloadDialog: FC<Props> = ({ open, onClose, onDownloadStart }) => {
|
||||
setFilenameTemplate(e.target.value)
|
||||
}
|
||||
|
||||
const handleCustomArgsChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
||||
setCustomArgs(e.target.value)
|
||||
const handleFileExtensionChange = (e: SelectChangeEvent<string>) => {
|
||||
setFileExtension(e.target.value)
|
||||
}
|
||||
|
||||
const parseUrlListFile = async (e: React.ChangeEvent<HTMLInputElement>) => {
|
||||
@@ -176,10 +204,7 @@ const DownloadDialog: FC<Props> = ({ open, onClose, onDownloadStart }) => {
|
||||
onClose={onClose}
|
||||
TransitionComponent={Transition}
|
||||
>
|
||||
<Backdrop
|
||||
sx={{ color: '#fff', zIndex: (theme) => theme.zIndex.drawer + 1 }}
|
||||
open={isPending}
|
||||
/>
|
||||
<LoadingBackdrop isLoading={isPending || isFormatsLoading} />
|
||||
<AppBar sx={{ position: 'relative' }}>
|
||||
<Toolbar>
|
||||
<IconButton
|
||||
@@ -247,25 +272,22 @@ const DownloadDialog: FC<Props> = ({ open, onClose, onDownloadStart }) => {
|
||||
/>
|
||||
</Grid>
|
||||
<Grid container spacing={1} sx={{ mt: 1 }}>
|
||||
{
|
||||
settings.enableCustomArgs &&
|
||||
{settings.enableCustomArgs &&
|
||||
<Grid item xs={12}>
|
||||
<TextField
|
||||
fullWidth
|
||||
label={i18n.t('customArgsInput')}
|
||||
variant="outlined"
|
||||
onChange={handleCustomArgsChange}
|
||||
value={customArgs}
|
||||
disabled={
|
||||
!isConnected ||
|
||||
(settings.formatSelection && downloadFormats != null)
|
||||
}
|
||||
/>
|
||||
<CustomArgsTextField />
|
||||
</Grid>
|
||||
}
|
||||
{
|
||||
settings.fileRenaming &&
|
||||
<Grid item xs={settings.pathOverriding ? 8 : 12}>
|
||||
<Grid item xs={
|
||||
!settings.autoFileExtension && !settings.pathOverriding
|
||||
? 12
|
||||
: !settings.autoFileExtension && settings.pathOverriding
|
||||
? 8
|
||||
: settings.autoFileExtension && !settings.pathOverriding
|
||||
? 10
|
||||
: 6
|
||||
}>
|
||||
<TextField
|
||||
sx={{ mt: 1 }}
|
||||
ref={customFilenameInputRef}
|
||||
@@ -281,6 +303,22 @@ const DownloadDialog: FC<Props> = ({ open, onClose, onDownloadStart }) => {
|
||||
/>
|
||||
</Grid>
|
||||
}
|
||||
{
|
||||
settings.autoFileExtension &&
|
||||
<Grid item xs={2}>
|
||||
<Select
|
||||
sx={{ mt: 1 }}
|
||||
fullWidth
|
||||
label={i18n.t('autoFileExtension')}
|
||||
value={fileExtension}
|
||||
onChange={handleFileExtensionChange}
|
||||
variant="outlined">
|
||||
<MenuItem value=".%(ext)s">Auto</MenuItem>
|
||||
<MenuItem value=".mp4">mp4</MenuItem>
|
||||
<MenuItem value=".mkv">mkv</MenuItem>
|
||||
</Select>
|
||||
</Grid>
|
||||
}
|
||||
{
|
||||
settings.pathOverriding &&
|
||||
<Grid item xs={4}>
|
||||
@@ -327,7 +365,7 @@ const DownloadDialog: FC<Props> = ({ open, onClose, onDownloadStart }) => {
|
||||
disabled={url === ''}
|
||||
onClick={() => settings.formatSelection
|
||||
? startTransition(() => sendUrlFormatSelection())
|
||||
: sendUrl()
|
||||
: startTransition(async () => await sendUrl())
|
||||
}
|
||||
>
|
||||
{
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
import { useAtom, useAtomValue } from 'jotai'
|
||||
import { useEffect } from 'react'
|
||||
import { useRecoilState, useRecoilValue } from 'recoil'
|
||||
import { loadingDownloadsState } from '../atoms/downloads'
|
||||
import { listViewState } from '../atoms/settings'
|
||||
import { loadingAtom } from '../atoms/ui'
|
||||
import DownloadsCardView from './DownloadsCardView'
|
||||
import DownloadsGridView from './DownloadsGridView'
|
||||
import DownloadsTableView from './DownloadsTableView'
|
||||
|
||||
const Downloads: React.FC = () => {
|
||||
const tableView = useRecoilValue(listViewState)
|
||||
const loadingDownloads = useRecoilValue(loadingDownloadsState)
|
||||
const tableView = useAtomValue(listViewState)
|
||||
const loadingDownloads = useAtomValue(loadingDownloadsState)
|
||||
|
||||
const [isLoading, setIsLoading] = useRecoilState(loadingAtom)
|
||||
const [isLoading, setIsLoading] = useAtom(loadingAtom)
|
||||
|
||||
useEffect(() => {
|
||||
if (loadingDownloads) {
|
||||
@@ -21,7 +21,7 @@ const Downloads: React.FC = () => {
|
||||
|
||||
if (tableView) return <DownloadsTableView />
|
||||
|
||||
return <DownloadsCardView />
|
||||
return <DownloadsGridView />
|
||||
}
|
||||
|
||||
export default Downloads
|
||||
@@ -1,35 +0,0 @@
|
||||
import { Grid } from '@mui/material'
|
||||
import { useRecoilValue } from 'recoil'
|
||||
import { activeDownloadsState } from '../atoms/downloads'
|
||||
import { useToast } from '../hooks/toast'
|
||||
import { useI18n } from '../hooks/useI18n'
|
||||
import { useRPC } from '../hooks/useRPC'
|
||||
import DownloadCard from './DownloadCard'
|
||||
|
||||
const DownloadsCardView: React.FC = () => {
|
||||
const downloads = useRecoilValue(activeDownloadsState)
|
||||
|
||||
const { i18n } = useI18n()
|
||||
const { client } = useRPC()
|
||||
const { pushMessage } = useToast()
|
||||
|
||||
const abort = (id: string) => client.kill(id)
|
||||
|
||||
return (
|
||||
<Grid container spacing={{ xs: 2, md: 2 }} columns={{ xs: 4, sm: 8, md: 12, xl: 12 }} pt={2}>
|
||||
{
|
||||
downloads.map(download => (
|
||||
<Grid item xs={4} sm={8} md={6} xl={4} key={download.id}>
|
||||
<DownloadCard
|
||||
download={download}
|
||||
onStop={() => abort(download.id)}
|
||||
onCopy={() => pushMessage(i18n.t('clipboardAction'), 'info')}
|
||||
/>
|
||||
</Grid>
|
||||
))
|
||||
}
|
||||
</Grid>
|
||||
)
|
||||
}
|
||||
|
||||
export default DownloadsCardView
|
||||
47
frontend/src/components/DownloadsGridView.tsx
Normal file
47
frontend/src/components/DownloadsGridView.tsx
Normal file
@@ -0,0 +1,47 @@
|
||||
import { Grid2 } from '@mui/material'
|
||||
import { useAtomValue } from 'jotai'
|
||||
import { useTransition } from 'react'
|
||||
import { activeDownloadsState } from '../atoms/downloads'
|
||||
import { useToast } from '../hooks/toast'
|
||||
import { useI18n } from '../hooks/useI18n'
|
||||
import { useRPC } from '../hooks/useRPC'
|
||||
import { ProcessStatus, RPCResult } from '../types'
|
||||
import DownloadCard from './DownloadCard'
|
||||
import LoadingBackdrop from './LoadingBackdrop'
|
||||
|
||||
const DownloadsGridView: React.FC = () => {
|
||||
const downloads = useAtomValue(activeDownloadsState)
|
||||
|
||||
const { i18n } = useI18n()
|
||||
const { client } = useRPC()
|
||||
const { pushMessage } = useToast()
|
||||
|
||||
const [isPending, startTransition] = useTransition()
|
||||
|
||||
const stop = async (r: RPCResult) => r.progress.process_status === ProcessStatus.COMPLETED
|
||||
? await client.clear(r.id)
|
||||
: await client.kill(r.id)
|
||||
|
||||
return (
|
||||
<>
|
||||
<LoadingBackdrop isLoading={isPending} />
|
||||
<Grid2 container spacing={{ xs: 2, md: 2 }} columns={{ xs: 4, sm: 8, md: 12, xl: 12 }} pt={2}>
|
||||
{
|
||||
downloads.map(download => (
|
||||
<Grid2 size={{ xs: 4, sm: 8, md: 6, xl: 4 }} key={download.id}>
|
||||
<DownloadCard
|
||||
download={download}
|
||||
onStop={() => startTransition(async () => {
|
||||
await stop(download)
|
||||
})}
|
||||
onCopy={() => pushMessage(i18n.t('clipboardAction'), 'info')}
|
||||
/>
|
||||
</Grid2>
|
||||
))
|
||||
}
|
||||
</Grid2>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default DownloadsGridView
|
||||
@@ -20,12 +20,12 @@ import {
|
||||
} from "@mui/material"
|
||||
import { forwardRef } from 'react'
|
||||
import { TableComponents, TableVirtuoso } from 'react-virtuoso'
|
||||
import { useRecoilValue } from 'recoil'
|
||||
import { activeDownloadsState } from '../atoms/downloads'
|
||||
import { serverURL } from '../atoms/settings'
|
||||
import { useRPC } from '../hooks/useRPC'
|
||||
import { RPCResult } from '../types'
|
||||
import { ProcessStatus, RPCResult } from '../types'
|
||||
import { base64URLEncode, formatSize, formatSpeedMiB } from "../utils"
|
||||
import { useAtomValue } from 'jotai'
|
||||
|
||||
const columns = [
|
||||
{
|
||||
@@ -119,22 +119,25 @@ function fixedHeaderContent() {
|
||||
}
|
||||
|
||||
const DownloadsTableView: React.FC = () => {
|
||||
const downloads = useRecoilValue(activeDownloadsState)
|
||||
const serverAddr = useRecoilValue(serverURL)
|
||||
const downloads = useAtomValue(activeDownloadsState)
|
||||
const serverAddr = useAtomValue(serverURL)
|
||||
const { client } = useRPC()
|
||||
|
||||
const abort = (id: string) => client.kill(id)
|
||||
|
||||
const viewFile = (path: string) => {
|
||||
const encoded = base64URLEncode(path)
|
||||
window.open(`${serverAddr}/archive/v/${encoded}?token=${localStorage.getItem('token')}`)
|
||||
window.open(`${serverAddr}/filebrowser/v/${encoded}?token=${localStorage.getItem('token')}`)
|
||||
}
|
||||
|
||||
const downloadFile = (path: string) => {
|
||||
const encoded = base64URLEncode(path)
|
||||
window.open(`${serverAddr}/archive/d/${encoded}?token=${localStorage.getItem('token')}`)
|
||||
window.open(`${serverAddr}/filebrowser/d/${encoded}?token=${localStorage.getItem('token')}`)
|
||||
}
|
||||
|
||||
const stop = (r: RPCResult) => r.progress.process_status === ProcessStatus.COMPLETED
|
||||
? client.clear(r.id)
|
||||
: client.kill(r.id)
|
||||
|
||||
|
||||
function rowContent(_index: number, download: RPCResult) {
|
||||
return (
|
||||
<>
|
||||
@@ -170,7 +173,7 @@ const DownloadsTableView: React.FC = () => {
|
||||
<ButtonGroup>
|
||||
<IconButton
|
||||
size="small"
|
||||
onClick={() => abort(download.id)}
|
||||
onClick={() => stop(download)}
|
||||
>
|
||||
{download.progress.percentage === '-1' ? <DeleteIcon /> : <StopCircleIcon />}
|
||||
|
||||
|
||||
45
frontend/src/components/EmptyArchive.tsx
Normal file
45
frontend/src/components/EmptyArchive.tsx
Normal file
@@ -0,0 +1,45 @@
|
||||
import ArchiveIcon from '@mui/icons-material/Archive'
|
||||
import { Container, SvgIcon, Typography, styled } from '@mui/material'
|
||||
import { activeDownloadsState } from '../atoms/downloads'
|
||||
import { useI18n } from '../hooks/useI18n'
|
||||
import { useAtomValue } from 'jotai'
|
||||
|
||||
const FlexContainer = styled(Container)({
|
||||
display: 'flex',
|
||||
minWidth: '100%',
|
||||
minHeight: '80vh',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
flexDirection: 'column'
|
||||
})
|
||||
|
||||
const Title = styled(Typography)({
|
||||
display: 'flex',
|
||||
width: '100%',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
paddingBottom: '0.5rem'
|
||||
})
|
||||
|
||||
export default function EmptyArchive() {
|
||||
const { i18n } = useI18n()
|
||||
const activeDownloads = useAtomValue(activeDownloadsState)
|
||||
|
||||
if (activeDownloads.length !== 0) {
|
||||
return null
|
||||
}
|
||||
|
||||
return (
|
||||
<FlexContainer>
|
||||
<Title fontWeight={'500'} fontSize={72} color={'gray'}>
|
||||
<SvgIcon sx={{ fontSize: '200px' }}>
|
||||
<ArchiveIcon />
|
||||
</SvgIcon>
|
||||
</Title>
|
||||
<Title fontWeight={'500'} fontSize={36} color={'gray'}>
|
||||
{/* {i18n.t('splashText')} */}
|
||||
Empty Archive
|
||||
</Title>
|
||||
</FlexContainer>
|
||||
)
|
||||
}
|
||||
@@ -1,13 +1,22 @@
|
||||
import { Autocomplete, Box, TextField, Typography } from '@mui/material'
|
||||
import { useRecoilState, useRecoilValue } from 'recoil'
|
||||
import { useAtomValue, useSetAtom } from 'jotai'
|
||||
import { useEffect } from 'react'
|
||||
import { customArgsState, savedTemplatesState } from '../atoms/downloadTemplate'
|
||||
import { useI18n } from '../hooks/useI18n'
|
||||
|
||||
const ExtraDownloadOptions: React.FC = () => {
|
||||
const { i18n } = useI18n()
|
||||
|
||||
const customTemplates = useRecoilValue(savedTemplatesState)
|
||||
const [, setCustomArgs] = useRecoilState(customArgsState)
|
||||
const customTemplates = useAtomValue(savedTemplatesState)
|
||||
const setCustomArgs = useSetAtom(customArgsState)
|
||||
|
||||
useEffect(() => {
|
||||
setCustomArgs(
|
||||
customTemplates
|
||||
.find(f => f.name.toLocaleLowerCase() === 'default')
|
||||
?.content ?? ''
|
||||
)
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -17,7 +26,7 @@ const ExtraDownloadOptions: React.FC = () => {
|
||||
autoHighlight
|
||||
defaultValue={
|
||||
customTemplates
|
||||
.filter(({ id, name }) => id === "0" || name === "default")
|
||||
.filter(({ id, name }) => id === "0" || name.toLowerCase() === "default")
|
||||
.map(({ name, content }) => ({ label: name, content }))
|
||||
.at(0)
|
||||
}
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import DownloadIcon from '@mui/icons-material/Download'
|
||||
import SettingsEthernet from '@mui/icons-material/SettingsEthernet'
|
||||
import { AppBar, Chip, Divider, Toolbar } from '@mui/material'
|
||||
import { AppBar, CircularProgress, Divider, Toolbar } from '@mui/material'
|
||||
import { Suspense } from 'react'
|
||||
import { useRecoilValue } from 'recoil'
|
||||
import { settingsState } from '../atoms/settings'
|
||||
import { connectedState } from '../atoms/status'
|
||||
import { totalDownloadSpeedState } from '../atoms/ui'
|
||||
@@ -10,11 +9,12 @@ import { useI18n } from '../hooks/useI18n'
|
||||
import { formatSpeedMiB } from '../utils'
|
||||
import FreeSpaceIndicator from './FreeSpaceIndicator'
|
||||
import VersionIndicator from './VersionIndicator'
|
||||
import { useAtomValue } from 'jotai'
|
||||
|
||||
const Footer: React.FC = () => {
|
||||
const settings = useRecoilValue(settingsState)
|
||||
const isConnected = useRecoilValue(connectedState)
|
||||
const totalDownloadSpeed = useRecoilValue(totalDownloadSpeedState)
|
||||
const settings = useAtomValue(settingsState)
|
||||
const isConnected = useAtomValue(connectedState)
|
||||
const totalDownloadSpeed = useAtomValue(totalDownloadSpeedState)
|
||||
|
||||
const mode = settings.theme
|
||||
const { i18n } = useI18n()
|
||||
@@ -34,10 +34,9 @@ const Footer: React.FC = () => {
|
||||
fontSize: 14,
|
||||
display: 'flex', gap: 1, justifyContent: 'space-between'
|
||||
}}>
|
||||
<div style={{ display: 'flex', gap: 4, alignItems: 'center' }}>
|
||||
<Chip label="RPC v3.0.9" variant="outlined" size="small" />
|
||||
<Suspense fallback={<CircularProgress size={15} />}>
|
||||
<VersionIndicator />
|
||||
</div>
|
||||
</Suspense>
|
||||
<div style={{ display: 'flex', gap: 4, 'alignItems': 'center' }}>
|
||||
<div style={{
|
||||
display: 'flex',
|
||||
|
||||
@@ -101,6 +101,7 @@ export default function FormatsGrid({
|
||||
>
|
||||
{format.format_note} - {format.vcodec === 'none' ? format.acodec : format.vcodec}
|
||||
{(format.filesize_approx > 0) ? " (~" + Math.round(format.filesize_approx / 1024 / 1024) + " MiB)" : ""}
|
||||
{format.language}
|
||||
</Button>
|
||||
</Grid>
|
||||
))
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import StorageIcon from '@mui/icons-material/Storage'
|
||||
import { useRecoilValue } from 'recoil'
|
||||
import { freeSpaceBytesState } from '../atoms/status'
|
||||
import { formatSize } from '../utils'
|
||||
import { useAtomValue } from 'jotai'
|
||||
|
||||
const FreeSpaceIndicator = () => {
|
||||
const freeSpace = useRecoilValue(freeSpaceBytesState)
|
||||
const freeSpace = useAtomValue(freeSpaceBytesState)
|
||||
|
||||
return (
|
||||
<div style={{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useSetAtom } from 'jotai'
|
||||
import { Suspense, useState } from 'react'
|
||||
import { useRecoilState } from 'recoil'
|
||||
import { loadingAtom } from '../atoms/ui'
|
||||
import { useToast } from '../hooks/toast'
|
||||
import DownloadDialog from './DownloadDialog'
|
||||
@@ -7,7 +7,7 @@ import HomeSpeedDial from './HomeSpeedDial'
|
||||
import TemplatesEditor from './TemplatesEditor'
|
||||
|
||||
const HomeActions: React.FC = () => {
|
||||
const [, setIsLoading] = useRecoilState(loadingAtom)
|
||||
const setIsLoading = useSetAtom(loadingAtom)
|
||||
|
||||
const [openDownload, setOpenDownload] = useState(false)
|
||||
const [openEditor, setOpenEditor] = useState(false)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import AddCircleIcon from '@mui/icons-material/AddCircle'
|
||||
import BuildCircleIcon from '@mui/icons-material/BuildCircle'
|
||||
import ClearAllIcon from '@mui/icons-material/ClearAll'
|
||||
import DeleteForeverIcon from '@mui/icons-material/DeleteForever'
|
||||
import FolderZipIcon from '@mui/icons-material/FolderZip'
|
||||
import FormatListBulleted from '@mui/icons-material/FormatListBulleted'
|
||||
@@ -9,7 +10,7 @@ import {
|
||||
SpeedDialAction,
|
||||
SpeedDialIcon
|
||||
} from '@mui/material'
|
||||
import { useRecoilState, useRecoilValue } from 'recoil'
|
||||
import { useAtom, useAtomValue } from 'jotai'
|
||||
import { listViewState, serverURL } from '../atoms/settings'
|
||||
import { useI18n } from '../hooks/useI18n'
|
||||
import { useRPC } from '../hooks/useRPC'
|
||||
@@ -20,14 +21,12 @@ type Props = {
|
||||
}
|
||||
|
||||
const HomeSpeedDial: React.FC<Props> = ({ onDownloadOpen, onEditorOpen }) => {
|
||||
const serverAddr = useRecoilValue(serverURL)
|
||||
const [listView, setListView] = useRecoilState(listViewState)
|
||||
const serverAddr = useAtomValue(serverURL)
|
||||
const [listView, setListView] = useAtom(listViewState)
|
||||
|
||||
const { i18n } = useI18n()
|
||||
const { client } = useRPC()
|
||||
|
||||
const abort = () => client.killAll()
|
||||
|
||||
return (
|
||||
<SpeedDial
|
||||
ariaLabel="Home speed dial"
|
||||
@@ -36,7 +35,7 @@ const HomeSpeedDial: React.FC<Props> = ({ onDownloadOpen, onEditorOpen }) => {
|
||||
>
|
||||
<SpeedDialAction
|
||||
icon={listView ? <ViewAgendaIcon /> : <FormatListBulleted />}
|
||||
tooltipTitle={listView ? 'Card view' : 'Table view'}
|
||||
tooltipTitle={listView ? 'Card view' : i18n.t('tableView')}
|
||||
onClick={() => setListView(state => !state)}
|
||||
/>
|
||||
<SpeedDialAction
|
||||
@@ -44,10 +43,15 @@ const HomeSpeedDial: React.FC<Props> = ({ onDownloadOpen, onEditorOpen }) => {
|
||||
tooltipTitle={i18n.t('bulkDownload')}
|
||||
onClick={() => window.open(`${serverAddr}/archive/bulk?token=${localStorage.getItem('token')}`)}
|
||||
/>
|
||||
<SpeedDialAction
|
||||
icon={<ClearAllIcon />}
|
||||
tooltipTitle={i18n.t('clearCompletedButton')}
|
||||
onClick={() => client.clearCompleted()}
|
||||
/>
|
||||
<SpeedDialAction
|
||||
icon={<DeleteForeverIcon />}
|
||||
tooltipTitle={i18n.t('abortAllButton')}
|
||||
onClick={abort}
|
||||
onClick={() => client.killAll()}
|
||||
/>
|
||||
<SpeedDialAction
|
||||
icon={<BuildCircleIcon />}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { Backdrop, CircularProgress } from '@mui/material'
|
||||
import { useRecoilValue } from 'recoil'
|
||||
import { loadingAtom } from '../atoms/ui'
|
||||
|
||||
const LoadingBackdrop: React.FC = () => {
|
||||
const isLoading = useRecoilValue(loadingAtom)
|
||||
type Props = {
|
||||
isLoading: boolean
|
||||
}
|
||||
|
||||
const LoadingBackdrop: React.FC<Props> = ({ isLoading }) => {
|
||||
return (
|
||||
<Backdrop
|
||||
sx={{ color: '#fff', zIndex: (theme) => theme.zIndex.drawer + 1 }}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useEffect, useMemo, useRef, useState } from 'react'
|
||||
import { useRecoilValue } from 'recoil'
|
||||
import { serverURL } from '../atoms/settings'
|
||||
import { useI18n } from '../hooks/useI18n'
|
||||
import { useAtomValue } from 'jotai'
|
||||
|
||||
const token = localStorage.getItem('token')
|
||||
|
||||
@@ -11,7 +11,7 @@ const LogTerminal: React.FC = () => {
|
||||
|
||||
const boxRef = useRef<HTMLDivElement>(null)
|
||||
|
||||
const serverAddr = useRecoilValue(serverURL)
|
||||
const serverAddr = useAtomValue(serverURL)
|
||||
|
||||
const { i18n } = useI18n()
|
||||
|
||||
@@ -22,8 +22,8 @@ const LogTerminal: React.FC = () => {
|
||||
|
||||
useEffect(() => {
|
||||
eventSource.addEventListener('log', event => {
|
||||
const msg: string[] = JSON.parse(event.data)
|
||||
setLogBuffer(buff => [...buff, ...msg].slice(-500))
|
||||
const msg: string = JSON.parse(event.data)
|
||||
setLogBuffer(buff => [...buff, msg].slice(-500))
|
||||
|
||||
boxRef.current?.scrollTo(0, boxRef.current.scrollHeight)
|
||||
})
|
||||
|
||||
15
frontend/src/components/ResolutionBadge.tsx
Normal file
15
frontend/src/components/ResolutionBadge.tsx
Normal file
@@ -0,0 +1,15 @@
|
||||
import EightK from '@mui/icons-material/EightK'
|
||||
import FourK from '@mui/icons-material/FourK'
|
||||
import Hd from '@mui/icons-material/Hd'
|
||||
import Sd from '@mui/icons-material/Sd'
|
||||
|
||||
const ResolutionBadge: React.FC<{ resolution?: string }> = ({ resolution }) => {
|
||||
if (!resolution) return null
|
||||
if (resolution.includes('4320')) return <EightK color="primary" />
|
||||
if (resolution.includes('2160')) return <FourK color="primary" />
|
||||
if (resolution.includes('1080')) return <Hd color="primary" />
|
||||
if (resolution.includes('720')) return <Sd color="primary" />
|
||||
return null
|
||||
}
|
||||
|
||||
export default ResolutionBadge
|
||||
@@ -1,7 +1,6 @@
|
||||
import * as O from 'fp-ts/Option'
|
||||
import { useEffect, useMemo } from 'react'
|
||||
import { useNavigate } from 'react-router-dom'
|
||||
import { useRecoilState, useRecoilValue } from 'recoil'
|
||||
import { take, timer } from 'rxjs'
|
||||
import { downloadsState } from '../atoms/downloads'
|
||||
import { rpcPollingTimeState } from '../atoms/rpc'
|
||||
@@ -12,15 +11,16 @@ import { useToast } from '../hooks/toast'
|
||||
import { useI18n } from '../hooks/useI18n'
|
||||
import { useRPC } from '../hooks/useRPC'
|
||||
import { datetimeCompareFunc, isRPCResponse } from '../utils'
|
||||
import { useAtom, useAtomValue, useSetAtom } from 'jotai'
|
||||
|
||||
interface Props extends React.HTMLAttributes<HTMLBaseElement> { }
|
||||
|
||||
const SocketSubscriber: React.FC<Props> = () => {
|
||||
const [connected, setIsConnected] = useRecoilState(connectedState)
|
||||
const [, setDownloads] = useRecoilState(downloadsState)
|
||||
const [connected, setIsConnected] = useAtom(connectedState)
|
||||
const setDownloads = useSetAtom(downloadsState)
|
||||
|
||||
const serverAddressAndPort = useRecoilValue(serverAddressAndPortState)
|
||||
const rpcPollingTime = useRecoilValue(rpcPollingTimeState)
|
||||
const serverAddressAndPort = useAtomValue(serverAddressAndPortState)
|
||||
const rpcPollingTime = useAtomValue(rpcPollingTimeState)
|
||||
|
||||
const { i18n } = useI18n()
|
||||
const { client } = useRPC()
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import CloudDownloadIcon from '@mui/icons-material/CloudDownload'
|
||||
import { Container, SvgIcon, Typography, styled } from '@mui/material'
|
||||
import { useRecoilValue } from 'recoil'
|
||||
import { activeDownloadsState } from '../atoms/downloads'
|
||||
import { useI18n } from '../hooks/useI18n'
|
||||
import { useAtomValue } from 'jotai'
|
||||
|
||||
const FlexContainer = styled(Container)({
|
||||
display: 'flex',
|
||||
@@ -23,7 +23,7 @@ const Title = styled(Typography)({
|
||||
|
||||
export default function Splash() {
|
||||
const { i18n } = useI18n()
|
||||
const activeDownloads = useRecoilValue(activeDownloadsState)
|
||||
const activeDownloads = useAtomValue(activeDownloadsState)
|
||||
|
||||
if (activeDownloads.length !== 0) {
|
||||
return null
|
||||
|
||||
67
frontend/src/components/TemplateTextField.tsx
Normal file
67
frontend/src/components/TemplateTextField.tsx
Normal file
@@ -0,0 +1,67 @@
|
||||
import { FC, useState } from 'react'
|
||||
|
||||
import DeleteIcon from '@mui/icons-material/Delete'
|
||||
import EditIcon from '@mui/icons-material/Edit'
|
||||
import {
|
||||
Button,
|
||||
Grid,
|
||||
TextField
|
||||
} from '@mui/material'
|
||||
import { useI18n } from '../hooks/useI18n'
|
||||
import { CustomTemplate } from '../types'
|
||||
|
||||
interface Props {
|
||||
template: CustomTemplate
|
||||
onChange: (template: CustomTemplate) => void
|
||||
onDelete: (id: string) => void
|
||||
}
|
||||
|
||||
const TemplateTextField: FC<Props> = ({ template, onChange, onDelete }) => {
|
||||
const { i18n } = useI18n()
|
||||
|
||||
const [editedTemplate, setEditedTemplate] = useState(template)
|
||||
|
||||
return (
|
||||
<Grid
|
||||
container
|
||||
spacing={2}
|
||||
justifyContent="center"
|
||||
alignItems="center"
|
||||
key={template.id}
|
||||
sx={{ mt: 1 }}
|
||||
>
|
||||
<Grid item xs={3}>
|
||||
<TextField
|
||||
fullWidth
|
||||
label={i18n.t('templatesEditorNameLabel')}
|
||||
defaultValue={template.name}
|
||||
onChange={(e) => setEditedTemplate({ ...editedTemplate, name: e.target.value })}
|
||||
/>
|
||||
</Grid>
|
||||
<Grid item xs={9}>
|
||||
<TextField
|
||||
fullWidth
|
||||
label={i18n.t('templatesEditorContentLabel')}
|
||||
defaultValue={template.content}
|
||||
onChange={(e) => setEditedTemplate({ ...editedTemplate, content: e.target.value })}
|
||||
InputProps={{
|
||||
endAdornment: <div style={{ display: 'flex', gap: 2 }}>
|
||||
<Button
|
||||
variant='contained'
|
||||
onClick={() => onChange(editedTemplate)}>
|
||||
<EditIcon />
|
||||
</Button>
|
||||
<Button
|
||||
variant='contained'
|
||||
onClick={() => onDelete(editedTemplate.id)}>
|
||||
<DeleteIcon />
|
||||
</Button>
|
||||
</div>
|
||||
}}
|
||||
/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
)
|
||||
}
|
||||
|
||||
export default TemplateTextField
|
||||
@@ -1,7 +1,7 @@
|
||||
import AddIcon from '@mui/icons-material/Add'
|
||||
import CloseIcon from '@mui/icons-material/Close'
|
||||
import DeleteIcon from '@mui/icons-material/Delete'
|
||||
import {
|
||||
Alert,
|
||||
AppBar,
|
||||
Backdrop,
|
||||
Box,
|
||||
@@ -18,13 +18,14 @@ import {
|
||||
import { TransitionProps } from '@mui/material/transitions'
|
||||
import { matchW } from 'fp-ts/lib/Either'
|
||||
import { pipe } from 'fp-ts/lib/function'
|
||||
import { useAtomValue } from 'jotai'
|
||||
import { forwardRef, useEffect, useState, useTransition } from 'react'
|
||||
import { useRecoilValue } from 'recoil'
|
||||
import { serverURL } from '../atoms/settings'
|
||||
import { useToast } from '../hooks/toast'
|
||||
import { useI18n } from '../hooks/useI18n'
|
||||
import { ffetch } from '../lib/httpClient'
|
||||
import { CustomTemplate } from '../types'
|
||||
import TemplateTextField from './TemplateTextField'
|
||||
|
||||
const Transition = forwardRef(function Transition(
|
||||
props: TransitionProps & {
|
||||
@@ -44,7 +45,7 @@ const TemplatesEditor: React.FC<Props> = ({ open, onClose }) => {
|
||||
const [templateName, setTemplateName] = useState('')
|
||||
const [templateContent, setTemplateContent] = useState('')
|
||||
|
||||
const serverAddr = useRecoilValue(serverURL)
|
||||
const serverAddr = useAtomValue(serverURL)
|
||||
const [isPending, startTransition] = useTransition()
|
||||
|
||||
const [templates, setTemplates] = useState<CustomTemplate[]>([])
|
||||
@@ -54,11 +55,11 @@ const TemplatesEditor: React.FC<Props> = ({ open, onClose }) => {
|
||||
|
||||
useEffect(() => {
|
||||
if (open) {
|
||||
getTemplates()
|
||||
fetchTemplates()
|
||||
}
|
||||
}, [open])
|
||||
|
||||
const getTemplates = async () => {
|
||||
const fetchTemplates = async () => {
|
||||
const task = ffetch<CustomTemplate[]>(`${serverAddr}/api/v1/template/all`)
|
||||
const either = await task()
|
||||
|
||||
@@ -88,7 +89,7 @@ const TemplatesEditor: React.FC<Props> = ({ open, onClose }) => {
|
||||
(l) => pushMessage(l, 'warning'),
|
||||
() => {
|
||||
pushMessage('Added template')
|
||||
getTemplates()
|
||||
fetchTemplates()
|
||||
setTemplateName('')
|
||||
setTemplateContent('')
|
||||
}
|
||||
@@ -96,6 +97,26 @@ const TemplatesEditor: React.FC<Props> = ({ open, onClose }) => {
|
||||
)
|
||||
}
|
||||
|
||||
const updateTemplate = async (template: CustomTemplate) => {
|
||||
const task = ffetch<CustomTemplate>(`${serverAddr}/api/v1/template`, {
|
||||
method: 'PATCH',
|
||||
body: JSON.stringify(template)
|
||||
})
|
||||
|
||||
const either = await task()
|
||||
|
||||
pipe(
|
||||
either,
|
||||
matchW(
|
||||
(l) => pushMessage(l, 'warning'),
|
||||
(r) => {
|
||||
pushMessage(`Updated template ${r.name}`)
|
||||
fetchTemplates()
|
||||
}
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
const deleteTemplate = async (id: string) => {
|
||||
const task = ffetch<unknown>(`${serverAddr}/api/v1/template/${id}`, {
|
||||
method: 'DELETE',
|
||||
@@ -109,7 +130,7 @@ const TemplatesEditor: React.FC<Props> = ({ open, onClose }) => {
|
||||
(l) => pushMessage(l, 'warning'),
|
||||
() => {
|
||||
pushMessage('Deleted template')
|
||||
getTemplates()
|
||||
fetchTemplates()
|
||||
}
|
||||
)
|
||||
)
|
||||
@@ -145,7 +166,12 @@ const TemplatesEditor: React.FC<Props> = ({ open, onClose }) => {
|
||||
backgroundColor: (theme) => theme.palette.background.default,
|
||||
minHeight: (theme) => `calc(99vh - ${theme.mixins.toolbar.minHeight}px)`
|
||||
}}>
|
||||
<Grid container spacing={2} sx={{ p: 4 }}>
|
||||
<Grid container spacing={2} sx={{ px: 4, pt: 3, pb: 4 }}>
|
||||
<Grid item>
|
||||
<Alert severity="info">
|
||||
{i18n.t('templatesReloadInfo')}
|
||||
</Alert>
|
||||
</Grid>
|
||||
<Grid item xs={12}>
|
||||
<Paper
|
||||
elevation={4}
|
||||
@@ -173,7 +199,7 @@ const TemplatesEditor: React.FC<Props> = ({ open, onClose }) => {
|
||||
InputProps={{
|
||||
endAdornment: <Button
|
||||
variant='contained'
|
||||
onClick={() => startTransition(() => { addTemplate() })}
|
||||
onClick={() => startTransition(async () => await addTemplate())}
|
||||
>
|
||||
<AddIcon />
|
||||
</Button>
|
||||
@@ -182,38 +208,12 @@ const TemplatesEditor: React.FC<Props> = ({ open, onClose }) => {
|
||||
</Grid>
|
||||
</Grid>
|
||||
{templates.map(template => (
|
||||
<Grid
|
||||
container
|
||||
spacing={2}
|
||||
justifyContent="center"
|
||||
alignItems="center"
|
||||
<TemplateTextField
|
||||
key={template.id}
|
||||
sx={{ mt: 1 }}
|
||||
>
|
||||
<Grid item xs={3}>
|
||||
<TextField
|
||||
fullWidth
|
||||
label={i18n.t('templatesEditorNameLabel')}
|
||||
value={template.name}
|
||||
/>
|
||||
</Grid>
|
||||
<Grid item xs={9}>
|
||||
<TextField
|
||||
fullWidth
|
||||
label={i18n.t('templatesEditorContentLabel')}
|
||||
value={template.content}
|
||||
InputProps={{
|
||||
endAdornment: <Button
|
||||
variant='contained'
|
||||
onClick={() => {
|
||||
startTransition(() => { deleteTemplate(template.id) })
|
||||
}}>
|
||||
<DeleteIcon />
|
||||
</Button>
|
||||
}}
|
||||
/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
template={template}
|
||||
onChange={updateTemplate}
|
||||
onDelete={deleteTemplate}
|
||||
/>
|
||||
))}
|
||||
</Paper>
|
||||
</Grid>
|
||||
|
||||
@@ -2,12 +2,12 @@ import Brightness4 from '@mui/icons-material/Brightness4'
|
||||
import Brightness5 from '@mui/icons-material/Brightness5'
|
||||
import BrightnessAuto from '@mui/icons-material/BrightnessAuto'
|
||||
import { ListItemButton, ListItemIcon, ListItemText } from '@mui/material'
|
||||
import { useRecoilState } from 'recoil'
|
||||
import { Theme, themeState } from '../atoms/settings'
|
||||
import { useI18n } from '../hooks/useI18n'
|
||||
import { useAtom } from 'jotai'
|
||||
|
||||
const ThemeToggler: React.FC = () => {
|
||||
const [theme, setTheme] = useRecoilState(themeState)
|
||||
const [theme, setTheme] = useAtom(themeState)
|
||||
|
||||
const actions: Record<Theme, React.ReactNode> = {
|
||||
system: <BrightnessAuto />,
|
||||
|
||||
33
frontend/src/components/UpdateBinaryButton.tsx
Normal file
33
frontend/src/components/UpdateBinaryButton.tsx
Normal file
@@ -0,0 +1,33 @@
|
||||
import { Button, CircularProgress } from '@mui/material'
|
||||
import { useI18n } from '../hooks/useI18n'
|
||||
import { useRPC } from '../hooks/useRPC'
|
||||
import { useState } from 'react'
|
||||
import { useToast } from '../hooks/toast'
|
||||
|
||||
const UpdateBinaryButton: React.FC = () => {
|
||||
const { i18n } = useI18n()
|
||||
const { client } = useRPC()
|
||||
const { pushMessage } = useToast()
|
||||
|
||||
const [isLoading, setIsLoading] = useState(false)
|
||||
|
||||
const updateBinary = () => {
|
||||
setIsLoading(true)
|
||||
client
|
||||
.updateExecutable()
|
||||
.then(() => pushMessage(i18n.t('toastUpdated'), 'success'))
|
||||
.then(() => setIsLoading(false))
|
||||
}
|
||||
|
||||
return (
|
||||
<Button
|
||||
variant="contained"
|
||||
endIcon={isLoading ? <CircularProgress size={16} color='secondary' /> : <></>}
|
||||
onClick={updateBinary}
|
||||
>
|
||||
{i18n.t('updateBinButton')}
|
||||
</Button>
|
||||
)
|
||||
}
|
||||
|
||||
export default UpdateBinaryButton
|
||||
@@ -1,37 +1,16 @@
|
||||
import { Chip, CircularProgress } from '@mui/material'
|
||||
import { useEffect, useState } from 'react'
|
||||
import { useRecoilValue } from 'recoil'
|
||||
import { serverURL } from '../atoms/settings'
|
||||
import { useToast } from '../hooks/toast'
|
||||
import { Chip } from '@mui/material'
|
||||
import { ytdlpRpcVersionState } from '../atoms/status'
|
||||
import { useAtomValue } from 'jotai'
|
||||
|
||||
const VersionIndicator: React.FC = () => {
|
||||
const serverAddr = useRecoilValue(serverURL)
|
||||
|
||||
const [version, setVersion] = useState('')
|
||||
const { pushMessage } = useToast()
|
||||
|
||||
const fetchVersion = async () => {
|
||||
const res = await fetch(`${serverAddr}/api/v1/version`, {
|
||||
headers: {
|
||||
'X-Authentication': localStorage.getItem('token') ?? ''
|
||||
}
|
||||
})
|
||||
|
||||
if (!res.ok) {
|
||||
return pushMessage(await res.text(), 'error')
|
||||
}
|
||||
|
||||
setVersion(await res.json())
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
fetchVersion()
|
||||
}, [])
|
||||
const version = useAtomValue(ytdlpRpcVersionState)
|
||||
|
||||
return (
|
||||
version
|
||||
? <Chip label={`yt-dlp v${version}`} variant="outlined" size="small" />
|
||||
: <CircularProgress size={15} />
|
||||
<div style={{ display: 'flex', gap: 4, alignItems: 'center' }}>
|
||||
<Chip label={`UI v3.2.5`} variant="outlined" size="small" />
|
||||
<Chip label={`RPC v${version.rpcVersion}`} variant="outlined" size="small" />
|
||||
<Chip label={`yt-dlp v${version.ytdlpVersion}`} variant="outlined" size="small" />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
125
frontend/src/components/livestream/LivestreamDialog.tsx
Normal file
125
frontend/src/components/livestream/LivestreamDialog.tsx
Normal file
@@ -0,0 +1,125 @@
|
||||
import CloseIcon from '@mui/icons-material/Close'
|
||||
import {
|
||||
Alert,
|
||||
AppBar,
|
||||
Box,
|
||||
Button,
|
||||
Container,
|
||||
Dialog,
|
||||
Grid,
|
||||
IconButton,
|
||||
Paper,
|
||||
Slide,
|
||||
TextField,
|
||||
Toolbar,
|
||||
Typography
|
||||
} from '@mui/material'
|
||||
import { TransitionProps } from '@mui/material/transitions'
|
||||
import { forwardRef, useState } from 'react'
|
||||
import { useToast } from '../../hooks/toast'
|
||||
import { useI18n } from '../../hooks/useI18n'
|
||||
import { useRPC } from '../../hooks/useRPC'
|
||||
|
||||
type Props = {
|
||||
open: boolean
|
||||
onClose: () => void
|
||||
}
|
||||
|
||||
const Transition = forwardRef(function Transition(
|
||||
props: TransitionProps & {
|
||||
children: React.ReactElement
|
||||
},
|
||||
ref: React.Ref<unknown>,
|
||||
) {
|
||||
return <Slide direction="up" ref={ref} {...props} />
|
||||
})
|
||||
|
||||
const LivestreamDialog: React.FC<Props> = ({ open, onClose }) => {
|
||||
const [livestreamURL, setLivestreamURL] = useState('')
|
||||
|
||||
const { i18n } = useI18n()
|
||||
const { client } = useRPC()
|
||||
const { pushMessage } = useToast()
|
||||
|
||||
const exec = (url: string) => client.execLivestream(url)
|
||||
|
||||
return (
|
||||
<Dialog
|
||||
fullScreen
|
||||
open={open}
|
||||
onClose={onClose}
|
||||
TransitionComponent={Transition}
|
||||
>
|
||||
<AppBar sx={{ position: 'relative' }}>
|
||||
<Toolbar>
|
||||
<IconButton
|
||||
edge="start"
|
||||
color="inherit"
|
||||
onClick={onClose}
|
||||
aria-label="close"
|
||||
>
|
||||
<CloseIcon />
|
||||
</IconButton>
|
||||
<Typography sx={{ ml: 2, flex: 1 }} variant="h6" component="div">
|
||||
Livestream monitor
|
||||
</Typography>
|
||||
</Toolbar>
|
||||
</AppBar>
|
||||
<Box sx={{
|
||||
backgroundColor: (theme) => theme.palette.background.default,
|
||||
minHeight: (theme) => `calc(99vh - ${theme.mixins.toolbar.minHeight}px)`
|
||||
}}>
|
||||
<Container sx={{ my: 4 }}>
|
||||
<Grid container spacing={2}>
|
||||
<Grid item xs={12}>
|
||||
<Paper
|
||||
elevation={4}
|
||||
sx={{
|
||||
p: 2,
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
}}
|
||||
>
|
||||
<Grid container>
|
||||
<Grid item xs={12} mb={2}>
|
||||
<Alert severity="info">
|
||||
{i18n.t('livestreamDownloadInfo')}
|
||||
</Alert>
|
||||
<Alert severity="warning" sx={{ mt: 1 }}>
|
||||
{i18n.t('livestreamExperimentalWarning')}
|
||||
</Alert>
|
||||
</Grid>
|
||||
<Grid item xs={12}>
|
||||
<TextField
|
||||
multiline
|
||||
fullWidth
|
||||
label={i18n.t('livestreamURLInput')}
|
||||
variant="outlined"
|
||||
onChange={(e) => setLivestreamURL(e.target.value)}
|
||||
/>
|
||||
</Grid>
|
||||
<Grid item>
|
||||
<Button
|
||||
sx={{ mt: 2 }}
|
||||
variant="contained"
|
||||
disabled={livestreamURL === ''}
|
||||
onClick={() => {
|
||||
exec(livestreamURL)
|
||||
onClose()
|
||||
pushMessage(`Monitoring ${livestreamURL}`, 'info')
|
||||
}}
|
||||
>
|
||||
{i18n.t('startButton')}
|
||||
</Button>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Paper>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Container>
|
||||
</Box>
|
||||
</Dialog>
|
||||
)
|
||||
}
|
||||
|
||||
export default LivestreamDialog
|
||||
34
frontend/src/components/livestream/LivestreamSpeedDial.tsx
Normal file
34
frontend/src/components/livestream/LivestreamSpeedDial.tsx
Normal file
@@ -0,0 +1,34 @@
|
||||
import AddCircleIcon from '@mui/icons-material/AddCircle'
|
||||
import DeleteForeverIcon from '@mui/icons-material/DeleteForever'
|
||||
import { SpeedDial, SpeedDialAction, SpeedDialIcon } from '@mui/material'
|
||||
import { useI18n } from '../../hooks/useI18n'
|
||||
|
||||
type Props = {
|
||||
onOpen: () => void
|
||||
onStopAll: () => void
|
||||
}
|
||||
|
||||
const LivestreamSpeedDial: React.FC<Props> = ({ onOpen, onStopAll }) => {
|
||||
const { i18n } = useI18n()
|
||||
|
||||
return (
|
||||
<SpeedDial
|
||||
ariaLabel="Home speed dial"
|
||||
sx={{ position: 'absolute', bottom: 64, right: 24 }}
|
||||
icon={<SpeedDialIcon />}
|
||||
>
|
||||
<SpeedDialAction
|
||||
icon={<DeleteForeverIcon />}
|
||||
tooltipTitle={i18n.t('abortAllButton')}
|
||||
onClick={onStopAll}
|
||||
/>
|
||||
<SpeedDialAction
|
||||
icon={<AddCircleIcon />}
|
||||
tooltipTitle={i18n.t('newDownloadButton')}
|
||||
onClick={onOpen}
|
||||
/>
|
||||
</SpeedDial>
|
||||
)
|
||||
}
|
||||
|
||||
export default LivestreamSpeedDial
|
||||
38
frontend/src/components/livestream/NoLivestreams.tsx
Normal file
38
frontend/src/components/livestream/NoLivestreams.tsx
Normal file
@@ -0,0 +1,38 @@
|
||||
import LiveTvIcon from '@mui/icons-material/LiveTv'
|
||||
import { Container, SvgIcon, Typography, styled } from '@mui/material'
|
||||
import { useI18n } from '../../hooks/useI18n'
|
||||
|
||||
const FlexContainer = styled(Container)({
|
||||
display: 'flex',
|
||||
minWidth: '100%',
|
||||
minHeight: '80vh',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
flexDirection: 'column'
|
||||
})
|
||||
|
||||
const Title = styled(Typography)({
|
||||
display: 'flex',
|
||||
width: '100%',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
paddingBottom: '0.5rem'
|
||||
})
|
||||
|
||||
|
||||
export default function NoLivestreams() {
|
||||
const { i18n } = useI18n()
|
||||
|
||||
return (
|
||||
<FlexContainer>
|
||||
<Title fontWeight={'500'} fontSize={72} color={'gray'}>
|
||||
<SvgIcon sx={{ fontSize: '200px' }}>
|
||||
<LiveTvIcon />
|
||||
</SvgIcon>
|
||||
</Title>
|
||||
<Title fontWeight={'500'} fontSize={36} color={'gray'}>
|
||||
{i18n.t('livestreamNoMonitoring')}
|
||||
</Title>
|
||||
</FlexContainer>
|
||||
)
|
||||
}
|
||||
38
frontend/src/components/subscriptions/NoSubscriptions.tsx
Normal file
38
frontend/src/components/subscriptions/NoSubscriptions.tsx
Normal file
@@ -0,0 +1,38 @@
|
||||
import UpdateIcon from '@mui/icons-material/Update'
|
||||
import { Container, SvgIcon, Typography, styled } from '@mui/material'
|
||||
import { useI18n } from '../../hooks/useI18n'
|
||||
|
||||
const FlexContainer = styled(Container)({
|
||||
display: 'flex',
|
||||
minWidth: '100%',
|
||||
minHeight: '80vh',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
flexDirection: 'column'
|
||||
})
|
||||
|
||||
const Title = styled(Typography)({
|
||||
display: 'flex',
|
||||
width: '100%',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
paddingBottom: '0.5rem'
|
||||
})
|
||||
|
||||
|
||||
export default function NoSubscriptions() {
|
||||
const { i18n } = useI18n()
|
||||
|
||||
return (
|
||||
<FlexContainer>
|
||||
<Title fontWeight={'500'} fontSize={72} color={'gray'}>
|
||||
<SvgIcon sx={{ fontSize: '200px' }}>
|
||||
<UpdateIcon />
|
||||
</SvgIcon>
|
||||
</Title>
|
||||
<Title fontWeight={'500'} fontSize={36} color={'gray'}>
|
||||
{i18n.t('subscriptionsEmptyLabel')}
|
||||
</Title>
|
||||
</FlexContainer>
|
||||
)
|
||||
}
|
||||
164
frontend/src/components/subscriptions/SubscriptionsDialog.tsx
Normal file
164
frontend/src/components/subscriptions/SubscriptionsDialog.tsx
Normal file
@@ -0,0 +1,164 @@
|
||||
import CloseIcon from '@mui/icons-material/Close'
|
||||
import {
|
||||
Alert,
|
||||
AppBar,
|
||||
Box,
|
||||
Button,
|
||||
Container,
|
||||
Dialog,
|
||||
Grid,
|
||||
IconButton,
|
||||
Paper,
|
||||
Slide,
|
||||
TextField,
|
||||
Toolbar,
|
||||
Typography
|
||||
} from '@mui/material'
|
||||
import { TransitionProps } from '@mui/material/transitions'
|
||||
import { matchW } from 'fp-ts/lib/Either'
|
||||
import { pipe } from 'fp-ts/lib/function'
|
||||
import { useAtomValue } from 'jotai'
|
||||
import { forwardRef, startTransition, useState } from 'react'
|
||||
import { customArgsState } from '../../atoms/downloadTemplate'
|
||||
import { serverURL } from '../../atoms/settings'
|
||||
import { useToast } from '../../hooks/toast'
|
||||
import { useI18n } from '../../hooks/useI18n'
|
||||
import { ffetch } from '../../lib/httpClient'
|
||||
import { Subscription } from '../../services/subscriptions'
|
||||
import ExtraDownloadOptions from '../ExtraDownloadOptions'
|
||||
|
||||
type Props = {
|
||||
open: boolean
|
||||
onClose: () => void
|
||||
}
|
||||
|
||||
const Transition = forwardRef(function Transition(
|
||||
props: TransitionProps & {
|
||||
children: React.ReactElement
|
||||
},
|
||||
ref: React.Ref<unknown>,
|
||||
) {
|
||||
return <Slide direction="up" ref={ref} {...props} />
|
||||
})
|
||||
|
||||
const SubscriptionsDialog: React.FC<Props> = ({ open, onClose }) => {
|
||||
const [subscriptionURL, setSubscriptionURL] = useState('')
|
||||
const [subscriptionCron, setSubscriptionCron] = useState('')
|
||||
|
||||
const customArgs = useAtomValue(customArgsState)
|
||||
|
||||
const { i18n } = useI18n()
|
||||
const { pushMessage } = useToast()
|
||||
|
||||
const baseURL = useAtomValue(serverURL)
|
||||
|
||||
const submit = async (sub: Omit<Subscription, 'id'>) => {
|
||||
const task = ffetch<void>(`${baseURL}/subscriptions`, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(sub)
|
||||
})
|
||||
const either = await task()
|
||||
|
||||
pipe(
|
||||
either,
|
||||
matchW(
|
||||
(l) => pushMessage(l, 'error'),
|
||||
(_) => onClose()
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<Dialog
|
||||
fullScreen
|
||||
open={open}
|
||||
onClose={onClose}
|
||||
TransitionComponent={Transition}
|
||||
>
|
||||
<AppBar sx={{ position: 'relative' }}>
|
||||
<Toolbar>
|
||||
<IconButton
|
||||
edge="start"
|
||||
color="inherit"
|
||||
onClick={onClose}
|
||||
aria-label="close"
|
||||
>
|
||||
<CloseIcon />
|
||||
</IconButton>
|
||||
<Typography sx={{ ml: 2, flex: 1 }} variant="h6" component="div">
|
||||
{i18n.t('subscriptionsButtonLabel')}
|
||||
</Typography>
|
||||
</Toolbar>
|
||||
</AppBar>
|
||||
<Box sx={{
|
||||
backgroundColor: (theme) => theme.palette.background.default,
|
||||
minHeight: (theme) => `calc(99vh - ${theme.mixins.toolbar.minHeight}px)`
|
||||
}}>
|
||||
<Container sx={{ my: 4 }}>
|
||||
<Grid container spacing={2}>
|
||||
<Grid item xs={12}>
|
||||
<Paper
|
||||
elevation={4}
|
||||
sx={{
|
||||
p: 2,
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
}}
|
||||
>
|
||||
<Grid container gap={1.5}>
|
||||
<Grid item xs={12}>
|
||||
<Alert severity="info">
|
||||
{i18n.t('subscriptionsInfo')}
|
||||
</Alert>
|
||||
<Alert severity="warning" sx={{ mt: 1 }}>
|
||||
{i18n.t('livestreamExperimentalWarning')}
|
||||
</Alert>
|
||||
</Grid>
|
||||
<Grid item xs={12} mt={1}>
|
||||
<TextField
|
||||
multiline
|
||||
fullWidth
|
||||
label={i18n.t('subscriptionsURLInput')}
|
||||
variant="outlined"
|
||||
placeholder="https://www.youtube.com/@SomeChannelThatExists/videos"
|
||||
onChange={(e) => setSubscriptionURL(e.target.value)}
|
||||
/>
|
||||
</Grid>
|
||||
<Grid item xs={8} mt={-2}>
|
||||
<ExtraDownloadOptions />
|
||||
</Grid>
|
||||
<Grid item xs={3.871}>
|
||||
<TextField
|
||||
multiline
|
||||
fullWidth
|
||||
label={i18n.t('cronExpressionLabel')}
|
||||
variant="outlined"
|
||||
placeholder="*/5 * * * *"
|
||||
onChange={(e) => setSubscriptionCron(e.target.value)}
|
||||
/>
|
||||
</Grid>
|
||||
<Grid item xs={12}>
|
||||
<Button
|
||||
sx={{ mt: 2 }}
|
||||
variant="contained"
|
||||
disabled={subscriptionURL === ''}
|
||||
onClick={() => startTransition(() => submit({
|
||||
url: subscriptionURL,
|
||||
params: customArgs,
|
||||
cron_expression: subscriptionCron
|
||||
}))}
|
||||
>
|
||||
{i18n.t('startButton')}
|
||||
</Button>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Paper>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Container>
|
||||
</Box>
|
||||
</Dialog>
|
||||
)
|
||||
}
|
||||
|
||||
export default SubscriptionsDialog
|
||||
@@ -0,0 +1,162 @@
|
||||
import CloseIcon from '@mui/icons-material/Close'
|
||||
import {
|
||||
Alert,
|
||||
AppBar,
|
||||
Box,
|
||||
Button,
|
||||
Container,
|
||||
Dialog,
|
||||
Grid,
|
||||
IconButton,
|
||||
Paper,
|
||||
Slide,
|
||||
TextField,
|
||||
Toolbar,
|
||||
Typography
|
||||
} from '@mui/material'
|
||||
import { TransitionProps } from '@mui/material/transitions'
|
||||
import { matchW } from 'fp-ts/lib/Either'
|
||||
import { pipe } from 'fp-ts/lib/function'
|
||||
import { useAtomValue } from 'jotai'
|
||||
import { forwardRef, startTransition, useState } from 'react'
|
||||
import { customArgsState } from '../../atoms/downloadTemplate'
|
||||
import { serverURL } from '../../atoms/settings'
|
||||
import { useToast } from '../../hooks/toast'
|
||||
import { useI18n } from '../../hooks/useI18n'
|
||||
import { ffetch } from '../../lib/httpClient'
|
||||
import { Subscription } from '../../services/subscriptions'
|
||||
import ExtraDownloadOptions from '../ExtraDownloadOptions'
|
||||
|
||||
type Props = {
|
||||
subscription: Subscription | undefined
|
||||
onClose: () => void
|
||||
}
|
||||
|
||||
const Transition = forwardRef(function Transition(
|
||||
props: TransitionProps & {
|
||||
children: React.ReactElement
|
||||
},
|
||||
ref: React.Ref<unknown>,
|
||||
) {
|
||||
return <Slide direction="up" ref={ref} {...props} />
|
||||
})
|
||||
|
||||
const SubscriptionsEditDialog: React.FC<Props> = ({ subscription, onClose }) => {
|
||||
const [subscriptionURL, setSubscriptionURL] = useState('')
|
||||
const [subscriptionCron, setSubscriptionCron] = useState('')
|
||||
|
||||
const customArgs = useAtomValue(customArgsState)
|
||||
|
||||
const { i18n } = useI18n()
|
||||
const { pushMessage } = useToast()
|
||||
|
||||
const baseURL = useAtomValue(serverURL)
|
||||
|
||||
const editSubscription = async (sub: Subscription) => {
|
||||
const task = ffetch<void>(`${baseURL}/subscriptions`, {
|
||||
method: 'PATCH',
|
||||
body: JSON.stringify(sub)
|
||||
})
|
||||
const either = await task()
|
||||
|
||||
pipe(
|
||||
either,
|
||||
matchW(
|
||||
(l) => pushMessage(l, 'error'),
|
||||
(_) => onClose()
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<Dialog
|
||||
fullScreen
|
||||
open={!!subscription}
|
||||
TransitionComponent={Transition}
|
||||
>
|
||||
<AppBar sx={{ position: 'relative' }}>
|
||||
<Toolbar>
|
||||
<IconButton
|
||||
edge="start"
|
||||
color="inherit"
|
||||
onClick={() => onClose()}
|
||||
aria-label="close"
|
||||
>
|
||||
<CloseIcon />
|
||||
</IconButton>
|
||||
<Typography sx={{ ml: 2, flex: 1 }} variant="h6" component="div">
|
||||
{i18n.t('subscriptionsButtonLabel')}
|
||||
</Typography>
|
||||
</Toolbar>
|
||||
</AppBar>
|
||||
<Box sx={{
|
||||
backgroundColor: (theme) => theme.palette.background.default,
|
||||
minHeight: (theme) => `calc(99vh - ${theme.mixins.toolbar.minHeight}px)`
|
||||
}}>
|
||||
<Container sx={{ my: 4 }}>
|
||||
<Grid container spacing={2}>
|
||||
<Grid item xs={12}>
|
||||
<Paper
|
||||
elevation={4}
|
||||
sx={{
|
||||
p: 2,
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
}}
|
||||
>
|
||||
<Grid container gap={1.5}>
|
||||
<Grid item xs={12}>
|
||||
<Alert severity="info">
|
||||
Editing {subscription?.url}
|
||||
</Alert>
|
||||
</Grid>
|
||||
<Grid item xs={12} mt={1}>
|
||||
<TextField
|
||||
multiline
|
||||
fullWidth
|
||||
label={i18n.t('subscriptionsURLInput')}
|
||||
variant="outlined"
|
||||
defaultValue={subscription?.url}
|
||||
placeholder="https://www.youtube.com/@SomeChannelThatExists/videos"
|
||||
onChange={(e) => setSubscriptionURL(e.target.value)}
|
||||
/>
|
||||
</Grid>
|
||||
<Grid item xs={8} mt={-2}>
|
||||
<ExtraDownloadOptions />
|
||||
</Grid>
|
||||
<Grid item xs={3.871}>
|
||||
<TextField
|
||||
multiline
|
||||
fullWidth
|
||||
label={i18n.t('cronExpressionLabel')}
|
||||
variant="outlined"
|
||||
placeholder="*/5 * * * *"
|
||||
defaultValue={subscription?.cron_expression}
|
||||
onChange={(e) => setSubscriptionCron(e.target.value)}
|
||||
/>
|
||||
</Grid>
|
||||
<Grid item xs={12}>
|
||||
<Button
|
||||
sx={{ mt: 2 }}
|
||||
variant="contained"
|
||||
onClick={() => startTransition(async () => await editSubscription({
|
||||
id: subscription?.id ?? '',
|
||||
url: subscriptionURL || subscription?.url!,
|
||||
params: customArgs || subscription?.params!,
|
||||
cron_expression: subscriptionCron || subscription?.cron_expression!
|
||||
}))}
|
||||
>
|
||||
{i18n.t('editButtonLabel')}
|
||||
</Button>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Paper>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Container>
|
||||
</Box>
|
||||
</Dialog>
|
||||
)
|
||||
}
|
||||
|
||||
export default SubscriptionsEditDialog
|
||||
@@ -0,0 +1,27 @@
|
||||
import AddCircleIcon from '@mui/icons-material/AddCircle'
|
||||
import { SpeedDial, SpeedDialAction, SpeedDialIcon } from '@mui/material'
|
||||
import { useI18n } from '../../hooks/useI18n'
|
||||
|
||||
type Props = {
|
||||
onOpen: () => void
|
||||
}
|
||||
|
||||
const SubscriptionsSpeedDial: React.FC<Props> = ({ onOpen }) => {
|
||||
const { i18n } = useI18n()
|
||||
|
||||
return (
|
||||
<SpeedDial
|
||||
ariaLabel="Subscriptions speed dial"
|
||||
sx={{ position: 'absolute', bottom: 64, right: 24 }}
|
||||
icon={<SpeedDialIcon />}
|
||||
>
|
||||
<SpeedDialAction
|
||||
icon={<AddCircleIcon />}
|
||||
tooltipTitle={i18n.t('newSubscriptionButton')}
|
||||
onClick={onOpen}
|
||||
/>
|
||||
</SpeedDial>
|
||||
)
|
||||
}
|
||||
|
||||
export default SubscriptionsSpeedDial
|
||||
@@ -1,9 +1,9 @@
|
||||
import { AlertColor } from '@mui/material'
|
||||
import { useRecoilState } from 'recoil'
|
||||
import { toastListState } from '../atoms/toast'
|
||||
import { useSetAtom } from 'jotai'
|
||||
|
||||
export const useToast = () => {
|
||||
const [, setToasts] = useRecoilState(toastListState)
|
||||
const setToasts = useSetAtom(toastListState)
|
||||
|
||||
return {
|
||||
pushMessage: (message: string, severity?: AlertColor) => {
|
||||
|
||||
35
frontend/src/hooks/useFetch.ts
Normal file
35
frontend/src/hooks/useFetch.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
import { pipe } from 'fp-ts/lib/function'
|
||||
import { matchW } from 'fp-ts/lib/TaskEither'
|
||||
import { useAtomValue } from 'jotai'
|
||||
import { useEffect, useState } from 'react'
|
||||
import { serverURL } from '../atoms/settings'
|
||||
import { ffetch } from '../lib/httpClient'
|
||||
import { useToast } from './toast'
|
||||
|
||||
const useFetch = <R>(resource: string) => {
|
||||
const base = useAtomValue(serverURL)
|
||||
|
||||
const { pushMessage } = useToast()
|
||||
|
||||
const [data, setData] = useState<R>()
|
||||
const [error, setError] = useState<string>()
|
||||
|
||||
const fetcher = () => pipe(
|
||||
ffetch<R>(`${base}${resource}`),
|
||||
matchW(
|
||||
(l) => {
|
||||
setError(l)
|
||||
pushMessage(l, 'error')
|
||||
},
|
||||
(r) => setData(r)
|
||||
)
|
||||
)()
|
||||
|
||||
useEffect(() => {
|
||||
fetcher()
|
||||
}, [])
|
||||
|
||||
return { data, error, fetcher }
|
||||
}
|
||||
|
||||
export default useFetch
|
||||
@@ -1,10 +1,10 @@
|
||||
import { useRecoilValue } from 'recoil'
|
||||
import { i18nBuilderState } from '../atoms/i18n'
|
||||
import Translator from '../lib/i18n'
|
||||
|
||||
export const useI18n = () => {
|
||||
const instance = useRecoilValue(i18nBuilderState)
|
||||
const instance = Translator.instance
|
||||
|
||||
return {
|
||||
i18n: instance
|
||||
i18n: instance,
|
||||
t: instance.t
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
import { useRecoilValue } from 'recoil'
|
||||
import { useAtomValue } from 'jotai'
|
||||
import { rpcClientState } from '../atoms/rpc'
|
||||
|
||||
export const useRPC = () => {
|
||||
const client = useRecoilValue(rpcClientState)
|
||||
const client = useAtomValue(rpcClientState)
|
||||
|
||||
return {
|
||||
client
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
import { tryCatch } from 'fp-ts/TaskEither'
|
||||
|
||||
export const ffetch = <T>(url: string, opt?: RequestInit) => tryCatch(
|
||||
() => fetcher<T>(url, opt),
|
||||
(e) => `error while fetching: ${e}`
|
||||
)
|
||||
|
||||
|
||||
const fetcher = async <T>(url: string, opt?: RequestInit) => {
|
||||
async function fetcher<T>(url: string, opt?: RequestInit): Promise<T> {
|
||||
const jwt = localStorage.getItem('token')
|
||||
|
||||
if (opt && !opt.headers) {
|
||||
@@ -26,5 +20,11 @@ const fetcher = async <T>(url: string, opt?: RequestInit) => {
|
||||
if (!res.ok) {
|
||||
throw await res.text()
|
||||
}
|
||||
|
||||
return res.json() as T
|
||||
}
|
||||
}
|
||||
|
||||
export const ffetch = <T>(url: string, opt?: RequestInit) => tryCatch(
|
||||
() => fetcher<T>(url, opt),
|
||||
(e) => `error while fetching: ${e}`
|
||||
)
|
||||
|
||||
53
frontend/src/lib/i18n.ts
Normal file
53
frontend/src/lib/i18n.ts
Normal file
@@ -0,0 +1,53 @@
|
||||
//@ts-ignore
|
||||
import i18n from '../assets/i18n.yaml'
|
||||
//@ts-ignore
|
||||
import fallback from '../assets/i18n/en_US.yaml'
|
||||
|
||||
export default class Translator {
|
||||
static #instance: Translator
|
||||
|
||||
private language: string
|
||||
private current: string[] = []
|
||||
|
||||
constructor() {
|
||||
this.language = localStorage.getItem('language')?.replaceAll('"', '') ?? 'english'
|
||||
this.setLanguage(this.language)
|
||||
}
|
||||
|
||||
getLanguage(): string {
|
||||
return this.language
|
||||
}
|
||||
|
||||
async setLanguage(language: string): Promise<void> {
|
||||
this.language = language
|
||||
|
||||
let isoCodeFile: string = i18n.languages[language]
|
||||
|
||||
// extension needs to be in source code to help vite bundle all yaml files
|
||||
if (isoCodeFile.endsWith('.yaml')) {
|
||||
isoCodeFile = isoCodeFile.replaceAll('.yaml', '')
|
||||
}
|
||||
|
||||
if (isoCodeFile) {
|
||||
const { default: translations } = await import(`../assets/i18n/${isoCodeFile}.yaml`)
|
||||
|
||||
this.current = translations.keys
|
||||
}
|
||||
}
|
||||
|
||||
t(key: string): string {
|
||||
if (this.current) {
|
||||
//@ts-ignore
|
||||
return this.current[key] ?? fallback.keys[key] ?? 'caption not defined'
|
||||
}
|
||||
return 'caption not defined'
|
||||
}
|
||||
|
||||
public static get instance(): Translator {
|
||||
if (!Translator.#instance) {
|
||||
Translator.#instance = new Translator()
|
||||
}
|
||||
|
||||
return Translator.#instance
|
||||
}
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
// @ts-nocheck
|
||||
import i18n from "../assets/i18n.yaml"
|
||||
|
||||
export default class I18nBuilder {
|
||||
private language: string
|
||||
private textMap = i18n.languages
|
||||
private current: string[]
|
||||
|
||||
constructor(language: string) {
|
||||
this.setLanguage(language)
|
||||
}
|
||||
|
||||
getLanguage(): string {
|
||||
return this.language
|
||||
}
|
||||
|
||||
setLanguage(language: string): void {
|
||||
this.language = language
|
||||
this.current = this.textMap[this.language]
|
||||
}
|
||||
|
||||
t(key: string): string {
|
||||
if (this.current) {
|
||||
return this.current[key] ?? 'caption not defined'
|
||||
}
|
||||
return 'caption not defined'
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Observable } from 'rxjs'
|
||||
import type { DLMetadata, RPCRequest, RPCResponse, RPCResult } from '../types'
|
||||
import type { DLMetadata, LiveStreamProgress, RPCRequest, RPCResponse, RPCResult } from '../types'
|
||||
|
||||
import { WebSocketSubject, webSocket } from 'rxjs/webSocket'
|
||||
|
||||
@@ -41,11 +41,13 @@ export class RPCClient {
|
||||
})
|
||||
}
|
||||
|
||||
private argsSanitizer(args: string) {
|
||||
private argsSanitizer(args: string): string[] {
|
||||
const splitOnlyWhitespaces = /[^\s"']+|"([^"]*)"|'([^']*)'/gm
|
||||
|
||||
return args
|
||||
.split(' ')
|
||||
.map(a => a.trim().replaceAll("'", '').replaceAll('"', ''))
|
||||
.filter(Boolean)
|
||||
.match(splitOnlyWhitespaces)
|
||||
?.map(a => a.trim())
|
||||
.filter(Boolean) ?? []
|
||||
}
|
||||
|
||||
private async sendHTTP<T>(req: RPCRequest) {
|
||||
@@ -82,7 +84,9 @@ export class RPCClient {
|
||||
: ''
|
||||
|
||||
const sanitizedArgs = this.argsSanitizer(
|
||||
req.args.replace('-o', '').replace(rename, '')
|
||||
req.args
|
||||
.replace('-o', '')
|
||||
.replace(rename, '')
|
||||
)
|
||||
|
||||
if (req.playlist) {
|
||||
@@ -126,14 +130,21 @@ export class RPCClient {
|
||||
}
|
||||
|
||||
public kill(id: string) {
|
||||
this.sendHTTP({
|
||||
return this.sendHTTP({
|
||||
method: 'Service.Kill',
|
||||
params: [id],
|
||||
})
|
||||
}
|
||||
|
||||
public clear(id: string) {
|
||||
return this.sendHTTP({
|
||||
method: 'Service.Clear',
|
||||
params: [id],
|
||||
})
|
||||
}
|
||||
|
||||
public killAll() {
|
||||
this.sendHTTP({
|
||||
return this.sendHTTP({
|
||||
method: 'Service.KillAll',
|
||||
params: [],
|
||||
})
|
||||
@@ -153,10 +164,47 @@ export class RPCClient {
|
||||
})
|
||||
}
|
||||
|
||||
public execLivestream(url: string) {
|
||||
return this.sendHTTP({
|
||||
method: 'Service.ExecLivestream',
|
||||
params: [{
|
||||
URL: url
|
||||
}]
|
||||
})
|
||||
}
|
||||
|
||||
public progressLivestream() {
|
||||
return this.sendHTTP<LiveStreamProgress>({
|
||||
method: 'Service.ProgressLivestream',
|
||||
params: []
|
||||
})
|
||||
}
|
||||
|
||||
public killLivestream(url: string) {
|
||||
return this.sendHTTP({
|
||||
method: 'Service.KillLivestream',
|
||||
params: [url]
|
||||
})
|
||||
}
|
||||
|
||||
public killAllLivestream() {
|
||||
return this.sendHTTP({
|
||||
method: 'Service.KillAllLivestream',
|
||||
params: []
|
||||
})
|
||||
}
|
||||
|
||||
public updateExecutable() {
|
||||
return this.sendHTTP({
|
||||
method: 'Service.UpdateExecutable',
|
||||
params: []
|
||||
})
|
||||
}
|
||||
|
||||
public clearCompleted() {
|
||||
return this.sendHTTP({
|
||||
method: 'Service.ClearCompleted',
|
||||
params: []
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
import { Alert, Snackbar } from "@mui/material"
|
||||
import { useRecoilState } from 'recoil'
|
||||
import { Toast, toastListState } from '../atoms/toast'
|
||||
import { useEffect } from 'react'
|
||||
import { useAtom } from 'jotai'
|
||||
|
||||
const Toaster: React.FC = () => {
|
||||
const [toasts, setToasts] = useRecoilState(toastListState)
|
||||
const [toasts, setToasts] = useAtom(toastListState)
|
||||
|
||||
const deletePredicate = (t: Toast) => (Date.now() - t.createdAt) < 2000
|
||||
|
||||
|
||||
@@ -8,6 +8,9 @@ const Home = lazy(() => import('./views/Home'))
|
||||
const Login = lazy(() => import('./views/Login'))
|
||||
const Archive = lazy(() => import('./views/Archive'))
|
||||
const Settings = lazy(() => import('./views/Settings'))
|
||||
const LiveStream = lazy(() => import('./views/Livestream'))
|
||||
const Filebrowser = lazy(() => import('./views/Filebrowser'))
|
||||
const Subscriptions = lazy(() => import('./views/Subscriptions'))
|
||||
|
||||
const ErrorBoundary = lazy(() => import('./components/ErrorBoundary'))
|
||||
|
||||
@@ -58,6 +61,32 @@ export const router = createHashRouter([
|
||||
</Suspense >
|
||||
)
|
||||
},
|
||||
{
|
||||
path: '/filebrowser',
|
||||
element: (
|
||||
<Suspense fallback={<CircularProgress />}>
|
||||
<Filebrowser />
|
||||
</Suspense >
|
||||
),
|
||||
errorElement: (
|
||||
<Suspense fallback={<CircularProgress />}>
|
||||
<ErrorBoundary />
|
||||
</Suspense >
|
||||
)
|
||||
},
|
||||
{
|
||||
path: '/subscriptions',
|
||||
element: (
|
||||
<Suspense fallback={<CircularProgress />}>
|
||||
<Subscriptions />
|
||||
</Suspense >
|
||||
),
|
||||
errorElement: (
|
||||
<Suspense fallback={<CircularProgress />}>
|
||||
<ErrorBoundary />
|
||||
</Suspense >
|
||||
)
|
||||
},
|
||||
{
|
||||
path: '/login',
|
||||
element: (
|
||||
@@ -74,6 +103,14 @@ export const router = createHashRouter([
|
||||
</Suspense >
|
||||
)
|
||||
},
|
||||
{
|
||||
path: '/monitor',
|
||||
element: (
|
||||
<Suspense fallback={<CircularProgress />}>
|
||||
<LiveStream />
|
||||
</Suspense >
|
||||
)
|
||||
},
|
||||
]
|
||||
},
|
||||
])
|
||||
37
frontend/src/services/subscriptions.ts
Normal file
37
frontend/src/services/subscriptions.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
// import { PaginatedResponse } from '../types'
|
||||
|
||||
export type Subscription = {
|
||||
id: string
|
||||
url: string
|
||||
params: string
|
||||
cron_expression: string
|
||||
}
|
||||
|
||||
// class SubscriptionService {
|
||||
// private _baseURL: string = ''
|
||||
|
||||
// public set baseURL(v: string) {
|
||||
// this._baseURL = v
|
||||
// }
|
||||
|
||||
// public async delete(id: string): Promise<void> {
|
||||
|
||||
// }
|
||||
|
||||
// public async listPaginated(start: number, limit: number = 50): Promise<PaginatedResponse<Subscription[]>> {
|
||||
// const res = await fetch(`${this._baseURL}/subscriptions?id=${start}&limit=${limit}`)
|
||||
// const data: PaginatedResponse<Subscription[]> = await res.json()
|
||||
|
||||
// return data
|
||||
// }
|
||||
|
||||
// public async submit(sub: Subscription): Promise<void> {
|
||||
|
||||
// }
|
||||
|
||||
// public async edit(sub: Subscription): Promise<void> {
|
||||
|
||||
// }
|
||||
// }
|
||||
|
||||
// export default SubscriptionService
|
||||
@@ -9,6 +9,11 @@ export type RPCMethods =
|
||||
| "Service.ExecPlaylist"
|
||||
| "Service.DirectoryTree"
|
||||
| "Service.UpdateExecutable"
|
||||
| "Service.ExecLivestream"
|
||||
| "Service.ProgressLivestream"
|
||||
| "Service.KillLivestream"
|
||||
| "Service.KillAllLivestream"
|
||||
| "Service.ClearCompleted"
|
||||
|
||||
export type RPCRequest = {
|
||||
method: RPCMethods
|
||||
@@ -34,11 +39,19 @@ type DownloadInfo = {
|
||||
created_at: string
|
||||
}
|
||||
|
||||
export enum ProcessStatus {
|
||||
PENDING = 0,
|
||||
DOWNLOADING,
|
||||
COMPLETED,
|
||||
ERRORED,
|
||||
LIVESTREAM,
|
||||
}
|
||||
|
||||
type DownloadProgress = {
|
||||
speed: number
|
||||
eta: number
|
||||
percentage: string
|
||||
process_status: number
|
||||
process_status: ProcessStatus
|
||||
}
|
||||
|
||||
export type RPCResult = Readonly<{
|
||||
@@ -57,9 +70,11 @@ export type RPCParams = {
|
||||
|
||||
export type DLMetadata = {
|
||||
formats: Array<DLFormat>
|
||||
_type: string
|
||||
best: DLFormat
|
||||
thumbnail: string
|
||||
title: string
|
||||
entries: Array<DLMetadata>
|
||||
}
|
||||
|
||||
export type DLFormat = {
|
||||
@@ -70,24 +85,58 @@ export type DLFormat = {
|
||||
vcodec: string
|
||||
acodec: string
|
||||
filesize_approx: number
|
||||
language: string
|
||||
}
|
||||
|
||||
export type DirectoryEntry = {
|
||||
name: string
|
||||
path: string
|
||||
size: number
|
||||
shaSum: string
|
||||
modTime: string
|
||||
isVideo: boolean
|
||||
isDirectory: boolean
|
||||
}
|
||||
|
||||
export type DeleteRequest = Pick<DirectoryEntry, 'path' | 'shaSum'>
|
||||
export type DeleteRequest = Pick<DirectoryEntry, 'path'>
|
||||
|
||||
export type PlayRequest = Pick<DirectoryEntry, 'path'>
|
||||
export type PlayRequest = DeleteRequest
|
||||
|
||||
export type CustomTemplate = {
|
||||
id: string
|
||||
name: string
|
||||
content: string
|
||||
}
|
||||
|
||||
export enum LiveStreamStatus {
|
||||
WAITING,
|
||||
IN_PROGRESS,
|
||||
COMPLETED,
|
||||
ERRORED
|
||||
}
|
||||
|
||||
export type LiveStreamProgress = Record<string, {
|
||||
status: LiveStreamStatus
|
||||
waitTime: string
|
||||
liveDate: string
|
||||
}>
|
||||
|
||||
export type RPCVersion = {
|
||||
rpcVersion: string
|
||||
ytdlpVersion: string
|
||||
}
|
||||
|
||||
export type ArchiveEntry = {
|
||||
id: string
|
||||
title: string
|
||||
path: string
|
||||
thumbnail: string
|
||||
source: string
|
||||
metadata: string
|
||||
created_at: string
|
||||
}
|
||||
|
||||
export type PaginatedResponse<T> = {
|
||||
first: number
|
||||
next: number
|
||||
data: T
|
||||
}
|
||||
@@ -1,5 +1,8 @@
|
||||
import { blue, red } from '@mui/material/colors'
|
||||
import { pipe } from 'fp-ts/lib/function'
|
||||
import { Accent, ThemeNarrowed } from './atoms/settings'
|
||||
import type { RPCResponse } from "./types"
|
||||
import { ProcessStatus } from './types'
|
||||
|
||||
export function validateIP(ipAddr: string): boolean {
|
||||
let ipRegex = /^(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}$/gm
|
||||
@@ -53,16 +56,18 @@ export function isRPCResponse(object: any): object is RPCResponse<any> {
|
||||
return 'result' in object && 'id' in object
|
||||
}
|
||||
|
||||
export function mapProcessStatus(status: number) {
|
||||
export function mapProcessStatus(status: ProcessStatus) {
|
||||
switch (status) {
|
||||
case 0:
|
||||
case ProcessStatus.PENDING:
|
||||
return 'Pending'
|
||||
case 1:
|
||||
case ProcessStatus.DOWNLOADING:
|
||||
return 'Downloading'
|
||||
case 2:
|
||||
case ProcessStatus.COMPLETED:
|
||||
return 'Completed'
|
||||
case 3:
|
||||
case ProcessStatus.ERRORED:
|
||||
return 'Error'
|
||||
case ProcessStatus.LIVESTREAM:
|
||||
return 'Livestream'
|
||||
default:
|
||||
return 'Pending'
|
||||
}
|
||||
@@ -76,4 +81,15 @@ export const base64URLEncode = (s: string) => pipe(
|
||||
s => String.fromCodePoint(...new TextEncoder().encode(s)),
|
||||
btoa,
|
||||
encodeURIComponent
|
||||
)
|
||||
)
|
||||
|
||||
export const getAccentValue = (accent: Accent, mode: ThemeNarrowed) => {
|
||||
switch (accent) {
|
||||
case 'default':
|
||||
return mode === 'light' ? blue[700] : blue[300]
|
||||
case 'red':
|
||||
return mode === 'light' ? red[600] : red[400]
|
||||
default:
|
||||
return mode === 'light' ? blue[700] : blue[300]
|
||||
}
|
||||
}
|
||||
@@ -1,365 +1,112 @@
|
||||
import {
|
||||
Backdrop,
|
||||
Button,
|
||||
Checkbox,
|
||||
CircularProgress,
|
||||
Container,
|
||||
Dialog,
|
||||
DialogActions,
|
||||
DialogContent,
|
||||
DialogContentText,
|
||||
DialogTitle,
|
||||
List,
|
||||
ListItem,
|
||||
ListItemButton,
|
||||
ListItemIcon,
|
||||
ListItemText,
|
||||
MenuItem,
|
||||
MenuList,
|
||||
Paper,
|
||||
SpeedDial,
|
||||
SpeedDialAction,
|
||||
SpeedDialIcon,
|
||||
Typography
|
||||
} from '@mui/material'
|
||||
|
||||
import DeleteForeverIcon from '@mui/icons-material/DeleteForever'
|
||||
import FolderIcon from '@mui/icons-material/Folder'
|
||||
import InsertDriveFileIcon from '@mui/icons-material/InsertDriveFile'
|
||||
import VideoFileIcon from '@mui/icons-material/VideoFile'
|
||||
|
||||
import DownloadIcon from '@mui/icons-material/Download'
|
||||
import { matchW } from 'fp-ts/lib/TaskEither'
|
||||
import { Container, FormControl, Grid2, InputLabel, MenuItem, Pagination, Select } from '@mui/material'
|
||||
import { pipe } from 'fp-ts/lib/function'
|
||||
import { useEffect, useMemo, useState, useTransition } from 'react'
|
||||
import { useNavigate } from 'react-router-dom'
|
||||
import { useRecoilValue } from 'recoil'
|
||||
import { BehaviorSubject, Subject, combineLatestWith, map, share } from 'rxjs'
|
||||
import { matchW } from 'fp-ts/lib/TaskEither'
|
||||
import { useAtomValue } from 'jotai'
|
||||
import { useEffect, useState, useTransition } from 'react'
|
||||
import { serverURL } from '../atoms/settings'
|
||||
import { useObservable } from '../hooks/observable'
|
||||
import ArchiveCard from '../components/ArchiveCard'
|
||||
import EmptyArchive from '../components/EmptyArchive'
|
||||
import { useToast } from '../hooks/toast'
|
||||
import { useI18n } from '../hooks/useI18n'
|
||||
import { ffetch } from '../lib/httpClient'
|
||||
import { DirectoryEntry } from '../types'
|
||||
import { base64URLEncode, formatSize } from '../utils'
|
||||
import { ArchiveEntry, PaginatedResponse } from '../types'
|
||||
import LoadingBackdrop from '../components/LoadingBackdrop'
|
||||
|
||||
export default function Downloaded() {
|
||||
const [menuPos, setMenuPos] = useState({ x: 0, y: 0 })
|
||||
const [showMenu, setShowMenu] = useState(false)
|
||||
const [currentFile, setCurrentFile] = useState<DirectoryEntry>()
|
||||
const Archive: React.FC = () => {
|
||||
const [isLoading, setLoading] = useState(true)
|
||||
const [archiveEntries, setArchiveEntries] = useState<ArchiveEntry[]>()
|
||||
|
||||
const serverAddr = useRecoilValue(serverURL)
|
||||
const navigate = useNavigate()
|
||||
|
||||
const { i18n } = useI18n()
|
||||
const { pushMessage } = useToast()
|
||||
|
||||
const [openDialog, setOpenDialog] = useState(false)
|
||||
|
||||
const files$ = useMemo(() => new Subject<DirectoryEntry[]>(), [])
|
||||
const selected$ = useMemo(() => new BehaviorSubject<string[]>([]), [])
|
||||
const [currentCursor, setCurrentCursor] = useState(0)
|
||||
const [cursor, setCursor] = useState({ first: 0, next: 0 })
|
||||
const [pageSize, setPageSize] = useState(25)
|
||||
|
||||
const [isPending, startTransition] = useTransition()
|
||||
|
||||
const fetcher = () => pipe(
|
||||
ffetch<DirectoryEntry[]>(
|
||||
`${serverAddr}/archive/downloaded`,
|
||||
{
|
||||
method: 'POST',
|
||||
body: JSON.stringify({
|
||||
subdir: '',
|
||||
})
|
||||
}
|
||||
),
|
||||
const serverAddr = useAtomValue(serverURL)
|
||||
const { pushMessage } = useToast()
|
||||
|
||||
const fetchArchived = (startCursor = 0) => pipe(
|
||||
ffetch<PaginatedResponse<ArchiveEntry[]>>(`${serverAddr}/archive?id=${startCursor}&limit=${pageSize}`),
|
||||
matchW(
|
||||
(e) => {
|
||||
pushMessage(e, 'error')
|
||||
navigate('/login')
|
||||
},
|
||||
(d) => files$.next(d ?? []),
|
||||
(l) => pushMessage(l, 'error'),
|
||||
(r) => {
|
||||
setArchiveEntries(r.data)
|
||||
setCursor({ ...cursor, first: r.first, next: r.next })
|
||||
}
|
||||
)
|
||||
)()
|
||||
|
||||
const fetcherSubfolder = (sub: string) => {
|
||||
const folders = sub.startsWith('/')
|
||||
? sub.substring(1).split('/')
|
||||
: sub.split('/')
|
||||
|
||||
const relpath = folders.length >= 2
|
||||
? folders.slice(-(folders.length - 1)).join('/')
|
||||
: folders.pop()
|
||||
|
||||
const _upperLevel = folders.slice(1, -1)
|
||||
const upperLevel = _upperLevel.length === 2
|
||||
? ['.', ..._upperLevel].join('/')
|
||||
: _upperLevel.join('/')
|
||||
|
||||
const task = ffetch<DirectoryEntry[]>(`${serverAddr}/archive/downloaded`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify({ subdir: relpath })
|
||||
})
|
||||
|
||||
pipe(
|
||||
task,
|
||||
matchW(
|
||||
(l) => pushMessage(l, 'error'),
|
||||
(r) => files$.next(sub
|
||||
? [{
|
||||
isDirectory: true,
|
||||
isVideo: false,
|
||||
modTime: '',
|
||||
name: '..',
|
||||
path: upperLevel,
|
||||
shaSum: '',
|
||||
size: 0,
|
||||
}, ...r.filter(f => f.name !== '')]
|
||||
: r.filter(f => f.name !== '')
|
||||
)
|
||||
)
|
||||
)()
|
||||
}
|
||||
|
||||
const selectable$ = useMemo(() => files$.pipe(
|
||||
combineLatestWith(selected$),
|
||||
map(([data, selected]) => data.map(x => ({
|
||||
...x,
|
||||
selected: selected.includes(x.name)
|
||||
}))),
|
||||
share()
|
||||
), [])
|
||||
|
||||
const selectable = useObservable(selectable$, [])
|
||||
|
||||
const addSelected = (name: string) => {
|
||||
selected$.value.includes(name)
|
||||
? selected$.next(selected$.value.filter(val => val !== name))
|
||||
: selected$.next([...selected$.value, name])
|
||||
}
|
||||
|
||||
const deleteFile = (entry: DirectoryEntry) => pipe(
|
||||
ffetch(`${serverAddr}/archive/delete`, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({
|
||||
path: entry.path,
|
||||
shaSum: entry.shaSum,
|
||||
})
|
||||
const softDelete = (id: string) => pipe(
|
||||
ffetch<ArchiveEntry[]>(`${serverAddr}/archive/soft/${id}`, {
|
||||
method: 'DELETE'
|
||||
}),
|
||||
matchW(
|
||||
(l) => pushMessage(l, 'error'),
|
||||
(_) => fetcher()
|
||||
(_) => startTransition(async () => await fetchArchived())
|
||||
)
|
||||
)()
|
||||
|
||||
const deleteSelected = () => {
|
||||
Promise.all(selectable
|
||||
.filter(entry => entry.selected)
|
||||
.map(deleteFile)
|
||||
).then(fetcher)
|
||||
}
|
||||
const hardDelete = (id: string) => pipe(
|
||||
ffetch<ArchiveEntry[]>(`${serverAddr}/archive/hard/${id}`, {
|
||||
method: 'DELETE'
|
||||
}),
|
||||
matchW(
|
||||
(l) => pushMessage(l, 'error'),
|
||||
(_) => startTransition(async () => await fetchArchived())
|
||||
)
|
||||
)()
|
||||
|
||||
const setPage = (page: number) => setCurrentCursor(pageSize * (page - 1))
|
||||
|
||||
useEffect(() => {
|
||||
fetcher()
|
||||
}, [serverAddr])
|
||||
|
||||
const onFileClick = (path: string) => startTransition(() => {
|
||||
const encoded = base64URLEncode(path)
|
||||
|
||||
window.open(`${serverAddr}/archive/v/${encoded}?token=${localStorage.getItem('token')}`)
|
||||
})
|
||||
|
||||
const downloadFile = (path: string) => startTransition(() => {
|
||||
const encoded = base64URLEncode(path)
|
||||
|
||||
window.open(`${serverAddr}/archive/d/${encoded}?token=${localStorage.getItem('token')}`)
|
||||
})
|
||||
|
||||
const onFolderClick = (path: string) => startTransition(() => {
|
||||
fetcherSubfolder(path)
|
||||
})
|
||||
fetchArchived(currentCursor).then(() => setLoading(false))
|
||||
}, [currentCursor])
|
||||
|
||||
return (
|
||||
<Container
|
||||
maxWidth="xl"
|
||||
sx={{ mt: 4, mb: 4, height: '100%' }}
|
||||
onClick={() => setShowMenu(false)}
|
||||
>
|
||||
<IconMenu
|
||||
posX={menuPos.x}
|
||||
posY={menuPos.y}
|
||||
hide={!showMenu}
|
||||
onDownload={() => {
|
||||
if (currentFile) {
|
||||
downloadFile(currentFile?.path)
|
||||
setCurrentFile(undefined)
|
||||
}
|
||||
}}
|
||||
onDelete={() => {
|
||||
if (currentFile) {
|
||||
deleteFile(currentFile)
|
||||
setCurrentFile(undefined)
|
||||
}
|
||||
}}
|
||||
/>
|
||||
<Backdrop
|
||||
sx={{ color: '#fff', zIndex: (theme) => theme.zIndex.drawer + 1 }}
|
||||
open={!(files$.observed) || isPending}
|
||||
>
|
||||
<CircularProgress color="primary" />
|
||||
</Backdrop>
|
||||
<Paper
|
||||
sx={{
|
||||
p: 2,
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
}}
|
||||
onClick={() => setShowMenu(false)}
|
||||
>
|
||||
<Typography py={1} variant="h5" color="primary">
|
||||
{i18n.t('archiveTitle')}
|
||||
</Typography>
|
||||
<List sx={{ width: '100%', bgcolor: 'background.paper' }}>
|
||||
{selectable.length === 0 && 'No files found'}
|
||||
{selectable.map((file, idx) => (
|
||||
<ListItem
|
||||
onContextMenu={(e) => {
|
||||
e.preventDefault()
|
||||
setCurrentFile(file)
|
||||
setMenuPos({ x: e.clientX, y: e.clientY })
|
||||
setShowMenu(true)
|
||||
}}
|
||||
key={idx}
|
||||
secondaryAction={
|
||||
<div>
|
||||
{!file.isDirectory && <Typography
|
||||
variant="caption"
|
||||
component="span"
|
||||
>
|
||||
{formatSize(file.size)}
|
||||
</Typography>
|
||||
}
|
||||
{!file.isDirectory && <>
|
||||
<Checkbox
|
||||
edge="end"
|
||||
checked={file.selected}
|
||||
onChange={() => addSelected(file.name)}
|
||||
/>
|
||||
</>}
|
||||
</div>
|
||||
}
|
||||
disablePadding
|
||||
>
|
||||
<ListItemButton onClick={
|
||||
() => file.isDirectory
|
||||
? onFolderClick(file.path)
|
||||
: onFileClick(file.path)
|
||||
}>
|
||||
<ListItemIcon>
|
||||
{file.isDirectory
|
||||
? <FolderIcon />
|
||||
: file.isVideo
|
||||
? <VideoFileIcon />
|
||||
: <InsertDriveFileIcon />
|
||||
}
|
||||
</ListItemIcon>
|
||||
<ListItemText
|
||||
primary={file.name}
|
||||
secondary={file.name != '..' && new Date(file.modTime).toLocaleString()}
|
||||
/>
|
||||
</ListItemButton>
|
||||
</ListItem>
|
||||
))}
|
||||
</List>
|
||||
</Paper>
|
||||
<SpeedDial
|
||||
ariaLabel='archive actions'
|
||||
sx={{ position: 'absolute', bottom: 64, right: 24 }}
|
||||
icon={<SpeedDialIcon />}
|
||||
>
|
||||
<SpeedDialAction
|
||||
icon={<DeleteForeverIcon />}
|
||||
tooltipTitle={`Delete selected`}
|
||||
tooltipOpen
|
||||
onClick={() => {
|
||||
if (selected$.value.length > 0) {
|
||||
setOpenDialog(true)
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</SpeedDial>
|
||||
<Dialog
|
||||
open={openDialog}
|
||||
onClose={() => setOpenDialog(false)}
|
||||
>
|
||||
<DialogTitle>
|
||||
Are you sure?
|
||||
</DialogTitle>
|
||||
<DialogContent>
|
||||
<DialogContentText id="alert-dialog-description">
|
||||
You're deleting:
|
||||
</DialogContentText>
|
||||
<ul>
|
||||
{selected$.value.map((entry, idx) => (
|
||||
<li key={idx}>{entry}</li>
|
||||
))}
|
||||
</ul>
|
||||
</DialogContent>
|
||||
<DialogActions>
|
||||
<Button onClick={() => setOpenDialog(false)}>
|
||||
Cancel
|
||||
</Button>
|
||||
<Button
|
||||
onClick={() => {
|
||||
deleteSelected()
|
||||
setOpenDialog(false)
|
||||
}}
|
||||
autoFocus
|
||||
<Container maxWidth="xl" sx={{ mt: 4, mb: 8, minHeight: '80vh' }}>
|
||||
<LoadingBackdrop isLoading={isPending || isLoading} />
|
||||
{
|
||||
archiveEntries && archiveEntries.length !== 0 ?
|
||||
<Grid2
|
||||
container
|
||||
spacing={{ xs: 2, md: 2 }}
|
||||
columns={{ xs: 4, sm: 8, md: 12, xl: 12 }}
|
||||
pt={2}
|
||||
sx={{ minHeight: '77.5vh' }}
|
||||
>
|
||||
Ok
|
||||
</Button>
|
||||
</DialogActions>
|
||||
</Dialog>
|
||||
{
|
||||
archiveEntries.map((entry) => (
|
||||
<Grid2 size={{ xs: 4, sm: 8, md: 4, xl: 3 }} key={entry.id}>
|
||||
<ArchiveCard
|
||||
entry={entry}
|
||||
onDelete={() => startTransition(async () => await softDelete(entry.id))}
|
||||
onHardDelete={() => startTransition(async () => await hardDelete(entry.id))}
|
||||
/>
|
||||
</Grid2>
|
||||
))
|
||||
}
|
||||
</Grid2>
|
||||
: <EmptyArchive />
|
||||
}
|
||||
<Pagination
|
||||
sx={{ mx: 'auto', pt: 2 }}
|
||||
count={Math.floor(cursor.next / pageSize) + 1}
|
||||
onChange={(_, v) => setPage(v)}
|
||||
/>
|
||||
<FormControl variant="standard" sx={{ m: 1, minWidth: 120 }}>
|
||||
<InputLabel id="page-size-select-label">Page size</InputLabel>
|
||||
<Select
|
||||
labelId="page-size-select-label"
|
||||
value={pageSize}
|
||||
onChange={(e) => setPageSize(Number(e.target.value))}
|
||||
label="Page size"
|
||||
>
|
||||
<MenuItem value={25}>25</MenuItem>
|
||||
<MenuItem value={50}>50</MenuItem>
|
||||
<MenuItem value={100}>100</MenuItem>
|
||||
</Select>
|
||||
</FormControl>
|
||||
</Container>
|
||||
)
|
||||
}
|
||||
|
||||
const IconMenu: React.FC<{
|
||||
posX: number
|
||||
posY: number
|
||||
hide: boolean
|
||||
onDownload: () => void
|
||||
onDelete: () => void
|
||||
}> = ({ posX, posY, hide, onDelete, onDownload }) => {
|
||||
return (
|
||||
<Paper sx={{
|
||||
width: 320,
|
||||
maxWidth: '100%',
|
||||
position: 'absolute',
|
||||
top: posY,
|
||||
left: posX,
|
||||
display: hide ? 'none' : 'block',
|
||||
zIndex: (theme) => theme.zIndex.drawer + 1,
|
||||
}}>
|
||||
<MenuList>
|
||||
<MenuItem onClick={onDownload}>
|
||||
<ListItemIcon>
|
||||
<DownloadIcon fontSize="small" />
|
||||
</ListItemIcon>
|
||||
<ListItemText>
|
||||
Download
|
||||
</ListItemText>
|
||||
</MenuItem>
|
||||
<MenuItem onClick={onDelete}>
|
||||
<ListItemIcon>
|
||||
<DeleteForeverIcon fontSize="small" />
|
||||
</ListItemIcon>
|
||||
<ListItemText>
|
||||
Delete
|
||||
</ListItemText>
|
||||
</MenuItem>
|
||||
</MenuList>
|
||||
</Paper>
|
||||
)
|
||||
}
|
||||
export default Archive
|
||||
360
frontend/src/views/Filebrowser.tsx
Normal file
360
frontend/src/views/Filebrowser.tsx
Normal file
@@ -0,0 +1,360 @@
|
||||
import {
|
||||
Backdrop,
|
||||
Button,
|
||||
Checkbox,
|
||||
CircularProgress,
|
||||
Container,
|
||||
Dialog,
|
||||
DialogActions,
|
||||
DialogContent,
|
||||
DialogContentText,
|
||||
DialogTitle,
|
||||
List,
|
||||
ListItem,
|
||||
ListItemButton,
|
||||
ListItemIcon,
|
||||
ListItemText,
|
||||
MenuItem,
|
||||
MenuList,
|
||||
Paper,
|
||||
SpeedDial,
|
||||
SpeedDialAction,
|
||||
SpeedDialIcon,
|
||||
Typography
|
||||
} from '@mui/material'
|
||||
|
||||
import DeleteForeverIcon from '@mui/icons-material/DeleteForever'
|
||||
import FolderIcon from '@mui/icons-material/Folder'
|
||||
import InsertDriveFileIcon from '@mui/icons-material/InsertDriveFile'
|
||||
import VideoFileIcon from '@mui/icons-material/VideoFile'
|
||||
|
||||
import DownloadIcon from '@mui/icons-material/Download'
|
||||
import { matchW } from 'fp-ts/lib/TaskEither'
|
||||
import { pipe } from 'fp-ts/lib/function'
|
||||
import { useEffect, useMemo, useState, useTransition } from 'react'
|
||||
import { useNavigate } from 'react-router-dom'
|
||||
import { BehaviorSubject, Subject, combineLatestWith, map, share } from 'rxjs'
|
||||
import { serverURL } from '../atoms/settings'
|
||||
import { useObservable } from '../hooks/observable'
|
||||
import { useToast } from '../hooks/toast'
|
||||
import { useI18n } from '../hooks/useI18n'
|
||||
import { ffetch } from '../lib/httpClient'
|
||||
import { DirectoryEntry } from '../types'
|
||||
import { base64URLEncode, formatSize } from '../utils'
|
||||
import { useAtomValue } from 'jotai'
|
||||
|
||||
export default function Downloaded() {
|
||||
const [menuPos, setMenuPos] = useState({ x: 0, y: 0 })
|
||||
const [showMenu, setShowMenu] = useState(false)
|
||||
const [currentFile, setCurrentFile] = useState<DirectoryEntry>()
|
||||
|
||||
const serverAddr = useAtomValue(serverURL)
|
||||
const navigate = useNavigate()
|
||||
|
||||
const { i18n } = useI18n()
|
||||
const { pushMessage } = useToast()
|
||||
|
||||
const [openDialog, setOpenDialog] = useState(false)
|
||||
|
||||
const files$ = useMemo(() => new Subject<DirectoryEntry[]>(), [])
|
||||
const selected$ = useMemo(() => new BehaviorSubject<string[]>([]), [])
|
||||
|
||||
const [isPending, startTransition] = useTransition()
|
||||
|
||||
const fetcher = () => pipe(
|
||||
ffetch<DirectoryEntry[]>(
|
||||
`${serverAddr}/filebrowser/downloaded`,
|
||||
{
|
||||
method: 'POST',
|
||||
body: JSON.stringify({
|
||||
subdir: '',
|
||||
})
|
||||
}
|
||||
),
|
||||
matchW(
|
||||
(e) => {
|
||||
pushMessage(e, 'error')
|
||||
navigate('/login')
|
||||
},
|
||||
(d) => files$.next(d ?? []),
|
||||
)
|
||||
)()
|
||||
|
||||
const fetcherSubfolder = (sub: string) => {
|
||||
const folders = sub.startsWith('/')
|
||||
? sub.substring(1).split('/')
|
||||
: sub.split('/')
|
||||
|
||||
const relpath = folders.length >= 2
|
||||
? folders.slice(-(folders.length - 1)).join('/')
|
||||
: folders.pop()
|
||||
|
||||
const _upperLevel = folders.slice(1, -1)
|
||||
const upperLevel = _upperLevel.length === 2
|
||||
? ['.', ..._upperLevel].join('/')
|
||||
: _upperLevel.join('/')
|
||||
|
||||
const task = ffetch<DirectoryEntry[]>(`${serverAddr}/filebrowser/downloaded`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify({ subdir: relpath })
|
||||
})
|
||||
|
||||
pipe(
|
||||
task,
|
||||
matchW(
|
||||
(l) => pushMessage(l, 'error'),
|
||||
(r) => files$.next(sub
|
||||
? [{
|
||||
isDirectory: true,
|
||||
isVideo: false,
|
||||
modTime: '',
|
||||
name: '..',
|
||||
path: upperLevel,
|
||||
size: 0,
|
||||
}, ...r.filter(f => f.name !== '')]
|
||||
: r.filter(f => f.name !== '')
|
||||
)
|
||||
)
|
||||
)()
|
||||
}
|
||||
|
||||
const selectable$ = useMemo(() => files$.pipe(
|
||||
combineLatestWith(selected$),
|
||||
map(([data, selected]) => data.map(x => ({
|
||||
...x,
|
||||
selected: selected.includes(x.name)
|
||||
}))),
|
||||
share()
|
||||
), [])
|
||||
|
||||
const selectable = useObservable(selectable$, [])
|
||||
|
||||
const addSelected = (name: string) => {
|
||||
selected$.value.includes(name)
|
||||
? selected$.next(selected$.value.filter(val => val !== name))
|
||||
: selected$.next([...selected$.value, name])
|
||||
}
|
||||
|
||||
const deleteFile = (entry: DirectoryEntry) => pipe(
|
||||
ffetch(`${serverAddr}/filebrowser/delete`, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({
|
||||
path: entry.path,
|
||||
})
|
||||
}),
|
||||
matchW(
|
||||
(l) => pushMessage(l, 'error'),
|
||||
(_) => fetcher()
|
||||
)
|
||||
)()
|
||||
|
||||
const deleteSelected = () => {
|
||||
Promise.all(selectable
|
||||
.filter(entry => entry.selected)
|
||||
.map(deleteFile)
|
||||
).then(fetcher)
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
fetcher()
|
||||
}, [serverAddr])
|
||||
|
||||
const onFileClick = (path: string) => startTransition(() => {
|
||||
const encoded = base64URLEncode(path)
|
||||
|
||||
window.open(`${serverAddr}/filebrowser/v/${encoded}?token=${localStorage.getItem('token')}`)
|
||||
})
|
||||
|
||||
const downloadFile = (path: string) => startTransition(() => {
|
||||
const encoded = base64URLEncode(path)
|
||||
|
||||
window.open(`${serverAddr}/filebrowser/d/${encoded}?token=${localStorage.getItem('token')}`)
|
||||
})
|
||||
|
||||
const onFolderClick = (path: string) => startTransition(() => {
|
||||
fetcherSubfolder(path)
|
||||
})
|
||||
|
||||
return (
|
||||
<Container
|
||||
maxWidth="xl"
|
||||
sx={{ mt: 4, mb: 4, minHeight: '100%' }}
|
||||
onClick={() => setShowMenu(false)}
|
||||
>
|
||||
<IconMenu
|
||||
posX={menuPos.x}
|
||||
posY={menuPos.y}
|
||||
hide={!showMenu}
|
||||
onDownload={() => {
|
||||
if (currentFile) {
|
||||
downloadFile(currentFile?.path)
|
||||
setCurrentFile(undefined)
|
||||
}
|
||||
}}
|
||||
onDelete={() => {
|
||||
if (currentFile) {
|
||||
deleteFile(currentFile)
|
||||
setCurrentFile(undefined)
|
||||
}
|
||||
}}
|
||||
/>
|
||||
<Backdrop
|
||||
sx={{ color: '#fff', zIndex: (theme) => theme.zIndex.drawer + 1 }}
|
||||
open={!(files$.observed) || isPending}
|
||||
>
|
||||
<CircularProgress color="primary" />
|
||||
</Backdrop>
|
||||
<Paper
|
||||
sx={{
|
||||
p: 2,
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
}}
|
||||
onClick={() => setShowMenu(false)}
|
||||
>
|
||||
<List sx={{ width: '100%', bgcolor: 'background.paper' }}>
|
||||
{selectable.length === 0 && i18n.t('noFilesFound')}
|
||||
{selectable.map((file, idx) => (
|
||||
<ListItem
|
||||
onContextMenu={(e) => {
|
||||
e.preventDefault()
|
||||
setCurrentFile(file)
|
||||
setMenuPos({ x: e.clientX, y: e.clientY })
|
||||
setShowMenu(true)
|
||||
}}
|
||||
key={idx}
|
||||
secondaryAction={
|
||||
<div>
|
||||
{!file.isDirectory && <Typography
|
||||
variant="caption"
|
||||
component="span"
|
||||
>
|
||||
{formatSize(file.size)}
|
||||
</Typography>
|
||||
}
|
||||
{!file.isDirectory && <>
|
||||
<Checkbox
|
||||
edge="end"
|
||||
checked={file.selected}
|
||||
onChange={() => addSelected(file.name)}
|
||||
/>
|
||||
</>}
|
||||
</div>
|
||||
}
|
||||
disablePadding
|
||||
>
|
||||
<ListItemButton onClick={
|
||||
() => file.isDirectory
|
||||
? onFolderClick(file.path)
|
||||
: onFileClick(file.path)
|
||||
}>
|
||||
<ListItemIcon>
|
||||
{file.isDirectory
|
||||
? <FolderIcon />
|
||||
: file.isVideo
|
||||
? <VideoFileIcon />
|
||||
: <InsertDriveFileIcon />
|
||||
}
|
||||
</ListItemIcon>
|
||||
<ListItemText
|
||||
primary={file.name}
|
||||
secondary={file.name != '..' && new Date(file.modTime).toLocaleString()}
|
||||
/>
|
||||
</ListItemButton>
|
||||
</ListItem>
|
||||
))}
|
||||
</List>
|
||||
</Paper>
|
||||
<SpeedDial
|
||||
ariaLabel='archive actions'
|
||||
sx={{ position: 'absolute', bottom: 64, right: 24 }}
|
||||
icon={<SpeedDialIcon />}
|
||||
>
|
||||
<SpeedDialAction
|
||||
icon={<DeleteForeverIcon />}
|
||||
tooltipTitle={i18n.t('deleteSelected')}
|
||||
tooltipOpen
|
||||
onClick={() => {
|
||||
if (selected$.value.length > 0) {
|
||||
setOpenDialog(true)
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</SpeedDial>
|
||||
<Dialog
|
||||
open={openDialog}
|
||||
onClose={() => setOpenDialog(false)}
|
||||
>
|
||||
<DialogTitle>
|
||||
Are you sure?
|
||||
</DialogTitle>
|
||||
<DialogContent>
|
||||
<DialogContentText id="alert-dialog-description">
|
||||
You're deleting:
|
||||
</DialogContentText>
|
||||
<ul>
|
||||
{selected$.value.map((entry, idx) => (
|
||||
<li key={idx}>{entry}</li>
|
||||
))}
|
||||
</ul>
|
||||
</DialogContent>
|
||||
<DialogActions>
|
||||
<Button onClick={() => setOpenDialog(false)}>
|
||||
Cancel
|
||||
</Button>
|
||||
<Button
|
||||
onClick={() => {
|
||||
deleteSelected()
|
||||
setOpenDialog(false)
|
||||
}}
|
||||
autoFocus
|
||||
>
|
||||
Ok
|
||||
</Button>
|
||||
</DialogActions>
|
||||
</Dialog>
|
||||
</Container>
|
||||
)
|
||||
}
|
||||
|
||||
const IconMenu: React.FC<{
|
||||
posX: number
|
||||
posY: number
|
||||
hide: boolean
|
||||
onDownload: () => void
|
||||
onDelete: () => void
|
||||
}> = ({ posX, posY, hide, onDelete, onDownload }) => {
|
||||
return (
|
||||
<Paper sx={{
|
||||
width: 320,
|
||||
maxWidth: '100%',
|
||||
position: 'absolute',
|
||||
top: posY,
|
||||
left: posX,
|
||||
display: hide ? 'none' : 'block',
|
||||
zIndex: (theme) => theme.zIndex.drawer + 1,
|
||||
}}>
|
||||
<MenuList>
|
||||
<MenuItem onClick={onDownload}>
|
||||
<ListItemIcon>
|
||||
<DownloadIcon fontSize="small" />
|
||||
</ListItemIcon>
|
||||
<ListItemText>
|
||||
Download
|
||||
</ListItemText>
|
||||
</MenuItem>
|
||||
<MenuItem onClick={onDelete}>
|
||||
<ListItemIcon>
|
||||
<DeleteForeverIcon fontSize="small" />
|
||||
</ListItemIcon>
|
||||
<ListItemText>
|
||||
Delete
|
||||
</ListItemText>
|
||||
</MenuItem>
|
||||
</MenuList>
|
||||
</Paper>
|
||||
)
|
||||
}
|
||||
@@ -1,15 +1,19 @@
|
||||
import {
|
||||
Container
|
||||
} from '@mui/material'
|
||||
import { loadingAtom } from '../atoms/ui'
|
||||
import Downloads from '../components/Downloads'
|
||||
import HomeActions from '../components/HomeActions'
|
||||
import LoadingBackdrop from '../components/LoadingBackdrop'
|
||||
import Splash from '../components/Splash'
|
||||
import { useAtomValue } from 'jotai'
|
||||
|
||||
export default function Home() {
|
||||
const isLoading = useAtomValue(loadingAtom)
|
||||
|
||||
return (
|
||||
<Container maxWidth="xl" sx={{ mt: 2, mb: 8 }}>
|
||||
<LoadingBackdrop />
|
||||
<LoadingBackdrop isLoading={isLoading} />
|
||||
<Splash />
|
||||
<Downloads />
|
||||
<HomeActions />
|
||||
|
||||
138
frontend/src/views/Livestream.tsx
Normal file
138
frontend/src/views/Livestream.tsx
Normal file
@@ -0,0 +1,138 @@
|
||||
import {
|
||||
Box,
|
||||
Button,
|
||||
Chip,
|
||||
Container,
|
||||
Paper,
|
||||
Table, TableBody, TableCell, TableContainer, TableHead, TableRow
|
||||
} from '@mui/material'
|
||||
import { useAtomValue } from 'jotai'
|
||||
import { useState } from 'react'
|
||||
import { interval } from 'rxjs'
|
||||
import { rpcPollingTimeState } from '../atoms/rpc'
|
||||
import LivestreamDialog from '../components/livestream/LivestreamDialog'
|
||||
import LivestreamSpeedDial from '../components/livestream/LivestreamSpeedDial'
|
||||
import NoLivestreams from '../components/livestream/NoLivestreams'
|
||||
import LoadingBackdrop from '../components/LoadingBackdrop'
|
||||
import { useSubscription } from '../hooks/observable'
|
||||
import { useI18n } from '../hooks/useI18n'
|
||||
import { useRPC } from '../hooks/useRPC'
|
||||
import { LiveStreamProgress, LiveStreamStatus } from '../types'
|
||||
|
||||
const LiveStreamMonitorView: React.FC = () => {
|
||||
const { i18n } = useI18n()
|
||||
const { client } = useRPC()
|
||||
|
||||
const [progress, setProgress] = useState<LiveStreamProgress>()
|
||||
const [openDialog, setOpenDialog] = useState(false)
|
||||
|
||||
const rpcPollingRate = useAtomValue(rpcPollingTimeState)
|
||||
|
||||
useSubscription(interval(rpcPollingRate), () => {
|
||||
client
|
||||
.progressLivestream()
|
||||
.then(r => setProgress(r.result))
|
||||
})
|
||||
|
||||
const formatMicro = (microseconds: number) => {
|
||||
const ms = microseconds / 1_000_000
|
||||
let s = ms / 1000
|
||||
|
||||
const hr = s / 3600
|
||||
s %= 3600
|
||||
|
||||
const mt = s / 60
|
||||
s %= 60
|
||||
|
||||
// huh?
|
||||
const ss = (Math.abs(s - 1)).toFixed(0).padStart(2, '0')
|
||||
const mts = mt.toFixed(0).padStart(2, '0')
|
||||
const hrs = hr.toFixed(0).padStart(2, '0')
|
||||
|
||||
return `${hrs}:${mts}:${ss}`
|
||||
}
|
||||
|
||||
const mapStatusToChip = (status: LiveStreamStatus): React.ReactNode => {
|
||||
switch (status) {
|
||||
case LiveStreamStatus.WAITING:
|
||||
return <Chip label='Waiting/Wait start' color='warning' size='small' />
|
||||
case LiveStreamStatus.IN_PROGRESS:
|
||||
return <Chip label='Downloading' color='primary' size='small' />
|
||||
case LiveStreamStatus.COMPLETED:
|
||||
return <Chip label='Completed' color='success' size='small' />
|
||||
case LiveStreamStatus.ERRORED:
|
||||
return <Chip label='Errored' color='error' size='small' />
|
||||
default:
|
||||
return <Chip label='Unknown state' color='secondary' size='small' />
|
||||
}
|
||||
}
|
||||
|
||||
const stopAll = () => client.killAllLivestream()
|
||||
const stop = (url: string) => client.killLivestream(url)
|
||||
|
||||
return (
|
||||
<>
|
||||
<LoadingBackdrop isLoading={!progress} />
|
||||
|
||||
<LivestreamSpeedDial onOpen={() => setOpenDialog(s => !s)} onStopAll={stopAll} />
|
||||
<LivestreamDialog open={openDialog} onClose={() => setOpenDialog(s => !s)} />
|
||||
|
||||
{!progress || Object.keys(progress).length === 0 ?
|
||||
<NoLivestreams /> :
|
||||
<Container maxWidth="xl" sx={{ mt: 4, mb: 8 }}>
|
||||
<Paper sx={{
|
||||
p: 2.5,
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
minHeight: '80vh',
|
||||
}}>
|
||||
<TableContainer component={Box}>
|
||||
<Table sx={{ minWidth: '100%' }}>
|
||||
<TableHead>
|
||||
<TableRow>
|
||||
<TableCell>{i18n.t('livestreamURLInput')}</TableCell>
|
||||
<TableCell align="right">Status</TableCell>
|
||||
<TableCell align="right">Time to live</TableCell>
|
||||
<TableCell align="right">Starts on</TableCell>
|
||||
<TableCell align="right">Actions</TableCell>
|
||||
</TableRow>
|
||||
</TableHead>
|
||||
<TableBody>
|
||||
{progress && Object.keys(progress).map(k => (
|
||||
<TableRow
|
||||
key={k}
|
||||
sx={{ '&:last-child td, &:last-child th': { border: 0 } }}
|
||||
>
|
||||
<TableCell>{k}</TableCell>
|
||||
<TableCell align='right'>
|
||||
{mapStatusToChip(progress[k].status)}
|
||||
</TableCell>
|
||||
<TableCell align='right'>
|
||||
{progress[k].status === LiveStreamStatus.WAITING
|
||||
? formatMicro(Number(progress[k].waitTime))
|
||||
: "-"
|
||||
}
|
||||
</TableCell>
|
||||
<TableCell align='right'>
|
||||
{progress[k].status === LiveStreamStatus.WAITING
|
||||
? new Date(progress[k].liveDate).toLocaleString()
|
||||
: "-"
|
||||
}
|
||||
</TableCell>
|
||||
<TableCell align='right'>
|
||||
<Button variant='contained' size='small' onClick={() => stop(k)}>
|
||||
Stop
|
||||
</Button>
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
))}
|
||||
</TableBody>
|
||||
</Table>
|
||||
</TableContainer>
|
||||
</Paper>
|
||||
</Container>}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default LiveStreamMonitorView
|
||||
@@ -6,19 +6,20 @@ import styled from '@emotion/styled'
|
||||
import {
|
||||
Button,
|
||||
Container,
|
||||
Divider,
|
||||
Paper,
|
||||
Stack,
|
||||
TextField,
|
||||
Typography
|
||||
} from '@mui/material'
|
||||
import { matchW } from 'fp-ts/lib/TaskEither'
|
||||
import { pipe } from 'fp-ts/lib/function'
|
||||
import { useState } from 'react'
|
||||
import { useNavigate } from 'react-router-dom'
|
||||
import { useRecoilValue } from 'recoil'
|
||||
import { serverURL } from '../atoms/settings'
|
||||
import { useToast } from '../hooks/toast'
|
||||
import { ffetch } from '../lib/httpClient'
|
||||
import { matchW } from 'fp-ts/lib/TaskEither'
|
||||
import { pipe } from 'fp-ts/lib/function'
|
||||
import { useAtomValue } from 'jotai'
|
||||
|
||||
const LoginContainer = styled(Container)({
|
||||
display: 'flex',
|
||||
@@ -42,7 +43,7 @@ export default function Login() {
|
||||
|
||||
const [formHasError, setFormHasError] = useState(false)
|
||||
|
||||
const url = useRecoilValue(serverURL)
|
||||
const url = useAtomValue(serverURL)
|
||||
|
||||
const navigate = useNavigate()
|
||||
|
||||
@@ -81,6 +82,8 @@ export default function Login() {
|
||||
)()
|
||||
}
|
||||
|
||||
const loginWithOpenId = () => window.open(`${url}/auth/openid/login`)
|
||||
|
||||
return (
|
||||
<LoginContainer>
|
||||
<Paper sx={{ padding: '1.5rem', minWidth: '25%' }}>
|
||||
@@ -89,12 +92,8 @@ export default function Login() {
|
||||
yt-dlp WebUI
|
||||
</Title>
|
||||
<Title fontWeight={'500'} fontSize={16} color={'gray'}>
|
||||
Authentication token will expire after 30 days.
|
||||
</Title>
|
||||
<Title fontWeight={'500'} fontSize={16} color={'gray'}>
|
||||
In order to enable RPC authentication append the --auth,
|
||||
<br />
|
||||
--user [username] and --pass [password] flags.
|
||||
To configure authentication check the
|
||||
<a href='https://github.com/marcopiovanello/yt-dlp-web-ui/wiki/Authentication-methods'>wiki</a>.
|
||||
</Title>
|
||||
<TextField
|
||||
label="Username"
|
||||
@@ -113,6 +112,16 @@ export default function Login() {
|
||||
<Button variant="contained" size="large" onClick={() => login()}>
|
||||
Submit
|
||||
</Button>
|
||||
|
||||
<Divider>
|
||||
<Typography color={'gray'}>
|
||||
or use your authentication provider
|
||||
</Typography>
|
||||
</Divider>
|
||||
|
||||
<Button variant="contained" size="large" onClick={loginWithOpenId}>
|
||||
Login with OpenID
|
||||
</Button>
|
||||
</Stack>
|
||||
</Paper>
|
||||
</LoginContainer>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import {
|
||||
Button,
|
||||
Checkbox,
|
||||
Container,
|
||||
FormControl,
|
||||
@@ -18,8 +17,8 @@ import {
|
||||
Typography,
|
||||
capitalize
|
||||
} from '@mui/material'
|
||||
import { useEffect, useMemo, useState } from 'react'
|
||||
import { useRecoilState } from 'recoil'
|
||||
import { useAtom } from 'jotai'
|
||||
import { Suspense, useCallback, useEffect, useMemo, useState } from 'react'
|
||||
import {
|
||||
Subject,
|
||||
debounceTime,
|
||||
@@ -29,11 +28,15 @@ import {
|
||||
} from 'rxjs'
|
||||
import { rpcPollingTimeState } from '../atoms/rpc'
|
||||
import {
|
||||
Accent,
|
||||
Language,
|
||||
Theme,
|
||||
accentState,
|
||||
accents,
|
||||
appTitleState,
|
||||
enableCustomArgsState,
|
||||
fileRenamingState,
|
||||
autoFileExtensionState,
|
||||
formatSelectionState,
|
||||
languageState,
|
||||
languages,
|
||||
@@ -45,34 +48,36 @@ import {
|
||||
themeState
|
||||
} from '../atoms/settings'
|
||||
import CookiesTextField from '../components/CookiesTextField'
|
||||
import UpdateBinaryButton from '../components/UpdateBinaryButton'
|
||||
import { useToast } from '../hooks/toast'
|
||||
import { useI18n } from '../hooks/useI18n'
|
||||
import { useRPC } from '../hooks/useRPC'
|
||||
import Translator from '../lib/i18n'
|
||||
import { validateDomain, validateIP } from '../utils'
|
||||
|
||||
// NEED ABSOLUTELY TO BE SPLIT IN MULTIPLE COMPONENTS
|
||||
export default function Settings() {
|
||||
const [reverseProxy, setReverseProxy] = useRecoilState(servedFromReverseProxyState)
|
||||
const [baseURL, setBaseURL] = useRecoilState(servedFromReverseProxySubDirState)
|
||||
const [reverseProxy, setReverseProxy] = useAtom(servedFromReverseProxyState)
|
||||
const [baseURL, setBaseURL] = useAtom(servedFromReverseProxySubDirState)
|
||||
|
||||
const [formatSelection, setFormatSelection] = useRecoilState(formatSelectionState)
|
||||
const [pathOverriding, setPathOverriding] = useRecoilState(pathOverridingState)
|
||||
const [fileRenaming, setFileRenaming] = useRecoilState(fileRenamingState)
|
||||
const [enableArgs, setEnableArgs] = useRecoilState(enableCustomArgsState)
|
||||
const [formatSelection, setFormatSelection] = useAtom(formatSelectionState)
|
||||
const [pathOverriding, setPathOverriding] = useAtom(pathOverridingState)
|
||||
const [fileRenaming, setFileRenaming] = useAtom(fileRenamingState)
|
||||
const [autoFileExtension, setAutoFileExtension] = useAtom(autoFileExtensionState)
|
||||
const [enableArgs, setEnableArgs] = useAtom(enableCustomArgsState)
|
||||
|
||||
const [serverAddr, setServerAddr] = useRecoilState(serverAddressState)
|
||||
const [serverPort, setServerPort] = useRecoilState(serverPortState)
|
||||
const [serverAddr, setServerAddr] = useAtom(serverAddressState)
|
||||
const [serverPort, setServerPort] = useAtom(serverPortState)
|
||||
|
||||
const [pollingTime, setPollingTime] = useRecoilState(rpcPollingTimeState)
|
||||
const [language, setLanguage] = useRecoilState(languageState)
|
||||
const [appTitle, setApptitle] = useRecoilState(appTitleState)
|
||||
const [pollingTime, setPollingTime] = useAtom(rpcPollingTimeState)
|
||||
const [language, setLanguage] = useAtom(languageState)
|
||||
const [appTitle, setApptitle] = useAtom(appTitleState)
|
||||
const [accent, setAccent] = useAtom(accentState)
|
||||
|
||||
const [theme, setTheme] = useRecoilState(themeState)
|
||||
const [theme, setTheme] = useAtom(themeState)
|
||||
|
||||
const [invalidIP, setInvalidIP] = useState(false)
|
||||
|
||||
const { i18n } = useI18n()
|
||||
const { client } = useRPC()
|
||||
|
||||
const { pushMessage } = useToast()
|
||||
|
||||
@@ -80,6 +85,9 @@ export default function Settings() {
|
||||
const serverAddr$ = useMemo(() => new Subject<string>(), [])
|
||||
const serverPort$ = useMemo(() => new Subject<string>(), [])
|
||||
|
||||
const [, updateState] = useState({})
|
||||
const forceUpdate = useCallback(() => updateState({}), [])
|
||||
|
||||
useEffect(() => {
|
||||
const sub = baseURL$
|
||||
.pipe(debounceTime(500))
|
||||
@@ -131,6 +139,11 @@ export default function Settings() {
|
||||
*/
|
||||
const handleLanguageChange = (event: SelectChangeEvent<Language>) => {
|
||||
setLanguage(event.target.value as Language)
|
||||
|
||||
Translator.instance.setLanguage(event.target.value)
|
||||
setTimeout(() => {
|
||||
forceUpdate()
|
||||
}, 100)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -140,13 +153,6 @@ export default function Settings() {
|
||||
setTheme(event.target.value as Theme)
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates yt-dlp binary via RPC
|
||||
*/
|
||||
const updateBinary = () => {
|
||||
client.updateExecutable().then(() => pushMessage(i18n.t('toastUpdated'), 'success'))
|
||||
}
|
||||
|
||||
return (
|
||||
<Container maxWidth="xl" sx={{ mt: 4, mb: 8 }}>
|
||||
<Paper
|
||||
@@ -185,7 +191,6 @@ export default function Settings() {
|
||||
</Grid>
|
||||
<Grid item xs={12} md={12}>
|
||||
<TextField
|
||||
disabled={reverseProxy}
|
||||
fullWidth
|
||||
label={i18n.t('appTitle')}
|
||||
defaultValue={appTitle}
|
||||
@@ -254,10 +259,10 @@ export default function Settings() {
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Typography variant="h6" color="primary" sx={{ mt: 0.5, mb: 2 }}>
|
||||
Appaerance
|
||||
Appearance
|
||||
</Typography>
|
||||
<Grid container spacing={2}>
|
||||
<Grid item xs={12} md={6}>
|
||||
<Grid item xs={12}>
|
||||
<FormControl fullWidth>
|
||||
<InputLabel>{i18n.t('languageSelect')}</InputLabel>
|
||||
<Select
|
||||
@@ -281,15 +286,31 @@ export default function Settings() {
|
||||
label={i18n.t('themeSelect')}
|
||||
onChange={handleThemeChange}
|
||||
>
|
||||
<MenuItem value="light">Light</MenuItem>
|
||||
<MenuItem value="dark">Dark</MenuItem>
|
||||
<MenuItem value="light">{i18n.t('lightThemeButton')}</MenuItem>
|
||||
<MenuItem value="dark">{i18n.t('darkThemeButton')}</MenuItem>
|
||||
<MenuItem value="system">System</MenuItem>
|
||||
</Select>
|
||||
</FormControl>
|
||||
</Grid>
|
||||
<Grid item xs={12} md={6}>
|
||||
<FormControl fullWidth>
|
||||
<InputLabel>{i18n.t('accentSelect')}</InputLabel>
|
||||
<Select
|
||||
defaultValue={accent}
|
||||
label={i18n.t('accentSelect')}
|
||||
onChange={(e) => setAccent(e.target.value as Accent)}
|
||||
>
|
||||
{accents.map((accent) => (
|
||||
<MenuItem key={accent} value={accent}>
|
||||
{capitalize(accent)}
|
||||
</MenuItem>
|
||||
))}
|
||||
</Select>
|
||||
</FormControl>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Typography variant="h6" color="primary" sx={{ mt: 2, mb: 0.5 }}>
|
||||
General download settings
|
||||
{i18n.t('generalDownloadSettings')}
|
||||
</Typography>
|
||||
|
||||
<FormControlLabel
|
||||
@@ -324,12 +345,30 @@ export default function Settings() {
|
||||
<Switch
|
||||
defaultChecked={fileRenaming}
|
||||
onChange={() => {
|
||||
if (fileRenaming) {
|
||||
setAutoFileExtension(false)
|
||||
}
|
||||
setFileRenaming(state => !state)
|
||||
}}
|
||||
/>
|
||||
}
|
||||
label={i18n.t('filenameOverrideOption')}
|
||||
/>
|
||||
{
|
||||
<FormControlLabel
|
||||
control={
|
||||
<Switch
|
||||
disabled={!fileRenaming}
|
||||
checked={fileRenaming ? autoFileExtension : false}
|
||||
defaultChecked={autoFileExtension}
|
||||
onChange={() => {
|
||||
setAutoFileExtension(state => !state)
|
||||
}}
|
||||
/>
|
||||
}
|
||||
label={i18n.t('autoFileExtensionOption')}
|
||||
/>
|
||||
}
|
||||
<FormControlLabel
|
||||
control={
|
||||
<Switch
|
||||
@@ -347,17 +386,13 @@ export default function Settings() {
|
||||
<Typography variant="h6" color="primary" sx={{ mb: 2 }}>
|
||||
Cookies
|
||||
</Typography>
|
||||
<CookiesTextField />
|
||||
<Suspense>
|
||||
<CookiesTextField />
|
||||
</Suspense>
|
||||
</Grid>
|
||||
<Grid>
|
||||
<Stack direction="row">
|
||||
<Button
|
||||
sx={{ mr: 1, mt: 3 }}
|
||||
variant="contained"
|
||||
onClick={() => updateBinary()}
|
||||
>
|
||||
{i18n.t('updateBinButton')}
|
||||
</Button>
|
||||
<Stack direction="row" sx={{ pt: 2 }}>
|
||||
<UpdateBinaryButton />
|
||||
</Stack>
|
||||
</Grid>
|
||||
</Paper>
|
||||
|
||||
157
frontend/src/views/Subscriptions.tsx
Normal file
157
frontend/src/views/Subscriptions.tsx
Normal file
@@ -0,0 +1,157 @@
|
||||
import DeleteIcon from '@mui/icons-material/Delete'
|
||||
import EditIcon from '@mui/icons-material/Edit'
|
||||
import {
|
||||
Box,
|
||||
Button,
|
||||
Container,
|
||||
Paper,
|
||||
Table, TableBody, TableCell, TableContainer,
|
||||
TableHead, TablePagination, TableRow
|
||||
} from '@mui/material'
|
||||
import { matchW } from 'fp-ts/lib/Either'
|
||||
import { pipe } from 'fp-ts/lib/function'
|
||||
import { useAtomValue } from 'jotai'
|
||||
import { useState, useTransition } from 'react'
|
||||
import { serverURL } from '../atoms/settings'
|
||||
import LoadingBackdrop from '../components/LoadingBackdrop'
|
||||
import NoSubscriptions from '../components/subscriptions/NoSubscriptions'
|
||||
import SubscriptionsDialog from '../components/subscriptions/SubscriptionsDialog'
|
||||
import SubscriptionsEditDialog from '../components/subscriptions/SubscriptionsEditDialog'
|
||||
import SubscriptionsSpeedDial from '../components/subscriptions/SubscriptionsSpeedDial'
|
||||
import { useToast } from '../hooks/toast'
|
||||
import useFetch from '../hooks/useFetch'
|
||||
import { useI18n } from '../hooks/useI18n'
|
||||
import { ffetch } from '../lib/httpClient'
|
||||
import { Subscription } from '../services/subscriptions'
|
||||
import { PaginatedResponse } from '../types'
|
||||
|
||||
const SubscriptionsView: React.FC = () => {
|
||||
const { i18n } = useI18n()
|
||||
const { pushMessage } = useToast()
|
||||
|
||||
const baseURL = useAtomValue(serverURL)
|
||||
|
||||
const [selectedSubscription, setSelectedSubscription] = useState<Subscription>()
|
||||
const [openDialog, setOpenDialog] = useState(false)
|
||||
|
||||
const [startId, setStartId] = useState(0)
|
||||
const [limit, setLimit] = useState(9)
|
||||
const [page, setPage] = useState(0)
|
||||
|
||||
const { data: subs, fetcher: refecth } = useFetch<PaginatedResponse<Subscription[]>>(
|
||||
`/subscriptions?id=${startId}&limit=${limit}`
|
||||
)
|
||||
|
||||
const [isPending, startTransition] = useTransition()
|
||||
|
||||
const deleteSubscription = async (id: string) => {
|
||||
const task = ffetch<void>(`${baseURL}/subscriptions/${id}`, {
|
||||
method: 'DELETE',
|
||||
})
|
||||
const either = await task()
|
||||
|
||||
pipe(
|
||||
either,
|
||||
matchW(
|
||||
(l) => pushMessage(l, 'error'),
|
||||
() => refecth()
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<LoadingBackdrop isLoading={!subs || isPending} />
|
||||
|
||||
<SubscriptionsSpeedDial onOpen={() => setOpenDialog(s => !s)} />
|
||||
|
||||
<SubscriptionsEditDialog
|
||||
subscription={selectedSubscription}
|
||||
onClose={() => {
|
||||
setSelectedSubscription(undefined)
|
||||
refecth()
|
||||
}}
|
||||
/>
|
||||
<SubscriptionsDialog open={openDialog} onClose={() => {
|
||||
setOpenDialog(s => !s)
|
||||
refecth()
|
||||
}} />
|
||||
|
||||
{!subs || subs.data.length === 0 ?
|
||||
<NoSubscriptions /> :
|
||||
<Container maxWidth="xl" sx={{ mt: 4, mb: 8 }}>
|
||||
<Paper sx={{
|
||||
p: 2.5,
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
minHeight: '80vh',
|
||||
}}>
|
||||
<TableContainer component={Box}>
|
||||
<Table sx={{ minWidth: '100%' }}>
|
||||
<TableHead>
|
||||
<TableRow>
|
||||
<TableCell align="left">URL</TableCell>
|
||||
<TableCell align="right">Params</TableCell>
|
||||
<TableCell align="right">{i18n.t('cronExpressionLabel')}</TableCell>
|
||||
<TableCell align="center">Actions</TableCell>
|
||||
</TableRow>
|
||||
</TableHead>
|
||||
<TableBody sx={{ mb: 'auto' }}>
|
||||
{subs.data.map(x => (
|
||||
<TableRow
|
||||
key={x.id}
|
||||
sx={{ '&:last-child td, &:last-child th': { border: 0 } }}
|
||||
>
|
||||
<TableCell>{x.url}</TableCell>
|
||||
<TableCell align='right'>
|
||||
{x.params}
|
||||
</TableCell>
|
||||
<TableCell align='right'>
|
||||
{x.cron_expression}
|
||||
</TableCell>
|
||||
<TableCell align='center'>
|
||||
<Button
|
||||
variant='contained'
|
||||
size='small'
|
||||
sx={{ mr: 0.5 }}
|
||||
onClick={() => setSelectedSubscription(x)}
|
||||
>
|
||||
<EditIcon />
|
||||
</Button>
|
||||
<Button
|
||||
variant='contained'
|
||||
size='small'
|
||||
onClick={() => startTransition(async () => await deleteSubscription(x.id))}
|
||||
>
|
||||
<DeleteIcon />
|
||||
</Button>
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
))}
|
||||
</TableBody>
|
||||
</Table>
|
||||
</TableContainer>
|
||||
<TablePagination
|
||||
component="div"
|
||||
count={-1}
|
||||
page={page}
|
||||
onPageChange={(_, p) => {
|
||||
if (p < page) {
|
||||
setPage(s => (s - 1 <= 0 ? 0 : s - 1))
|
||||
setStartId(subs.first)
|
||||
return
|
||||
}
|
||||
setPage(s => s + 1)
|
||||
setStartId(subs.next)
|
||||
}}
|
||||
rowsPerPage={limit}
|
||||
rowsPerPageOptions={[9, 10, 25, 50, 100]}
|
||||
onRowsPerPageChange={(e) => { setLimit(parseInt(e.target.value)) }}
|
||||
/>
|
||||
</Paper>
|
||||
</Container>}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default SubscriptionsView
|
||||
@@ -1,12 +1,10 @@
|
||||
import react from '@vitejs/plugin-react-swc'
|
||||
import million from 'million/compiler'
|
||||
import ViteYaml from '@modyfi/vite-plugin-yaml'
|
||||
import { defineConfig } from 'vite'
|
||||
|
||||
export default defineConfig(() => {
|
||||
return {
|
||||
plugins: [
|
||||
million.vite({ auto: true }),
|
||||
react(),
|
||||
ViteYaml(),
|
||||
],
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user