aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-02-06 16:52:32 +0100
committermetamuffin <metamuffin@disroot.org>2025-02-06 16:52:32 +0100
commit87ebdede17007b626b1275c66dde1e5aefd6cddc (patch)
treece023bacfdbd1ba2e8321293dd0aee902a264e03 /doc
parent8fd96b46e73a0e7f984305e487e383a471dfcf88 (diff)
downloadjellything-87ebdede17007b626b1275c66dde1e5aefd6cddc.tar
jellything-87ebdede17007b626b1275c66dde1e5aefd6cddc.tar.bz2
jellything-87ebdede17007b626b1275c66dde1e5aefd6cddc.tar.zst
update book
Diffstat (limited to 'doc')
-rw-r--r--doc/SUMMARY.md3
-rw-r--r--doc/api.md30
-rw-r--r--doc/getting-started/installation.md8
-rw-r--r--doc/getting-started/launch.md9
-rw-r--r--doc/getting-started/setup.md56
-rw-r--r--doc/import.md4
-rw-r--r--doc/import/README.md20
-rw-r--r--doc/import/providers.md82
-rw-r--r--doc/migration.md2
-rw-r--r--doc/paths.md6
10 files changed, 57 insertions, 163 deletions
diff --git a/doc/SUMMARY.md b/doc/SUMMARY.md
index 9ce623e..c9fe850 100644
--- a/doc/SUMMARY.md
+++ b/doc/SUMMARY.md
@@ -8,6 +8,5 @@
- [Launch](getting-started/launch.md)
- [Migrating the Database](migration.md)
- [Paths](paths.md)
-- [Import Guide](import/README.md)
- - [Metadata Providers](import/providers.md)
+- [Imports](import.md)
- [API](api.md)
diff --git a/doc/api.md b/doc/api.md
index 8eedca0..63ed274 100644
--- a/doc/api.md
+++ b/doc/api.md
@@ -12,7 +12,7 @@ those used in the library and for jhls.
- [jellytranscode](/doc/jellytranscode/)
- [jellyimport](/doc/jellyimport/)
- [jellymatroska](/doc/jellymatroska/)
- - [ebml_derive](/doc/ebml_derive/)
+ - [ebml_derive](/doc/ebml_derive/)
- [jellybase](/doc/jellybase/)
- [jellystream](/doc/jellystream/)
- [jellytool](/doc/jellytool/)
@@ -46,13 +46,27 @@ Request body contains JSON with keys `username`, `password`, `expire` (in
seconds) and `drop_permissions` (a list of permissions, that this session cannot
use). The Response contains the session cookie as a string in JSON.
-### GET* `/n/<id>`
+### GET* `/n/<id>?<parents>&<children>&<filter..>`
-Request a library node (either a directory or item). Returns it as `NodePublic`.
+Request a library node with userdata attached. If `parents` or `children` flag
+is set, all parents/children will be returned too, otherwise those lists are
+empty. Returns `ApiNodeResponse`.
-### GET* `/n/<id>/extended`
+### GET* `/n/<id>/userdata`
-Request extended informationf for library node. Returns it as `ExtendedNode`.
+Returns only `NodeUserData` for that node.
+
+### GET* `/search?<query>&<page>`
+
+Returns `ApiSearchResponse`.
+
+### GET* `/items?<filter..>&<page>`
+
+Returns `ApiItemsResponse`.
+
+### GET* `/home`
+
+Returns `ApiHomeResponse`.
## Assets
@@ -61,11 +75,11 @@ coded with AVIF. The `width` parameter is the width of the resolution you want
to image to be.
> [!WARNING] The actual returned resolution must not be exactly what you
-> requested.
+> requested. Currently it is rounded up to the next power of two.
-### GET* `/n/<id>/asset?<role>&<width>`
+### GET* `/n/<id>/poster?<width>`
-Where `role` is one of `backdrop` or `poster` and
+### GET* `/n/<id>/backdrop?<width>`
### GET* `/n/<id>/thumbnail?<t>&<width>`
diff --git a/doc/getting-started/installation.md b/doc/getting-started/installation.md
index ee59ee7..5768a0a 100644
--- a/doc/getting-started/installation.md
+++ b/doc/getting-started/installation.md
@@ -2,8 +2,8 @@
## From the AUR
-This is the recommended option. It will also install a systemd service running
-in its own user.
+This is the recommended option. It will also install a systemd service and
+system user for that service.
```sh
git clone https://aur.archlinux.org/jellything-git.git
@@ -24,8 +24,8 @@ Requirements:
- dav1d
- ffmpeg (only if you use transcoding)
-Jellything was only tested on `x86_64-unknown-linux-gnu` and
-`aarch64-unknown-linux-gnu`. Others _might_ work.
+Jellything was only tested for `x86_64-unknown-linux-gnu` and
+`aarch64-unknown-linux-gnu` targetss. Others _probably_ work too.
```sh
git clone --recursive https://codeberg.org/metamuffin/jellything.git
diff --git a/doc/getting-started/launch.md b/doc/getting-started/launch.md
index 8cabcf6..6064348 100644
--- a/doc/getting-started/launch.md
+++ b/doc/getting-started/launch.md
@@ -11,10 +11,15 @@ will start and serve your library at
```sh
jellything /etc/jellything.yaml
+# Or
JELLYTHING_CONFIG=/etc/jellything.yaml jellything
```
It is also advised to use jellything with a reverse proxy. Configure the network
-interface with the environment variables `BIND_ADDR` and `PORT`. Stderr logging
-can be configured with `LOG`.
+interface with the environment variables `BIND_ADDR` and `PORT`. Logging to
+stderr can be configured with the `LOG` variable and env_logger syntax.
+## Initial import
+
+Next log in with the admin accound and visit `/admin/dashboard` to run an
+initial import.
diff --git a/doc/getting-started/setup.md b/doc/getting-started/setup.md
index a189cf6..d899384 100644
--- a/doc/getting-started/setup.md
+++ b/doc/getting-started/setup.md
@@ -16,7 +16,6 @@ admin_username: admin
media_path: "/srv/media"
asset_path: "/var/lib/jellything/assets"
database_path: "/var/lib/jellything/db"
-library_path: "/var/lib/jellything/library"
temp_path: "/tmp/jellything"
cache_path: "/var/cache/jellything"
secrets_path: "/etc/jellysecrets.yaml" # points to the file below
@@ -33,25 +32,25 @@ session_key: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx="
# Credentials for remote instances. Keep this empty if you are just starting.
federation:
- "example.org": { username: "examplefed", password: "xxxxxxx" }
+ "example.org": { username: "examplefed", password: "xxxxxxx" }
api:
- fanart_tv: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- tmdb: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- omdb: xxxxxxxx
- # This is the Trakt Application `client_id`
- trakt: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- tvdb: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ fanart_tv: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ tmdb: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ omdb: xxxxxxxx
+ # This is the Trakt Application `client_id`
+ trakt: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ tvdb: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
```
## 2. Creating required directories
-Next create directories in place of `cache_path`, `temp_path`, `media_path`,
-`library_path` if jellything is not permitted to do so itself. Also obtain the
-default assets from git.
+Next create directories in place of `cache_path`, `temp_path`, `media_path`. if
+jellything is not permitted to do so itself. Also obtain the default assets from
+the jellything-assets repo.
```sh
-mkdir -p $cache_path $temp_path $media_path $library_path
+mkdir -p $cache_path $temp_path $media_path
git clone https://codeberg.org/metamuffin/jellything-assets.git $asset_path
```
@@ -61,37 +60,14 @@ In _library\_path_, create files like below. This file provides an entry point
to your library. Its exact meaning is described in
[The Import Guide](../import/README.md).
-```yaml
-# root.yaml
-id: library
-sources:
- - !override
- public:
- kind: !collection
- title: "My Library"
- children:
- - movies
-```
-
-```yaml
-# movies/directory.yaml
-id: movies
-sources:
- - !override
- public:
- kind: !collection
- title: "Movies"
- - !auto_children
-```
-
Next place your favorite movies in _media\_path_ and use the import helper to
quickly generate import instructions for it. This requires at least Trakt and
TMDB keys to work.
```sh
-# This should be run from media_path since the path in -m is relative to that no matter PWD.
-# Jellytool will show an interactive wizard to select the correct metadata.
-jellytool add -m big-buck-bunny.mkv
-jellytool add -m agent-327-operation-barbershop.mkv
-jellytool add -m spring.mkv
+# Jellytool will show an interactive wizard to select the correct metadata source.
+# The files will be renamed to include the Trakt id in the name.
+jellytool add big-buck-bunny.mkv
+jellytool add agent-327-operation-barbershop.mkv
+jellytool add spring.mkv
```
diff --git a/doc/import.md b/doc/import.md
new file mode 100644
index 0000000..1f8088a
--- /dev/null
+++ b/doc/import.md
@@ -0,0 +1,4 @@
+# Jellything's Import System
+
+In normal operation, jellything serves all metadata from only the database.
+
diff --git a/doc/import/README.md b/doc/import/README.md
deleted file mode 100644
index d4e014c..0000000
--- a/doc/import/README.md
+++ /dev/null
@@ -1,20 +0,0 @@
-# Jellything's Import System
-
-In normal operation, jellything serves all metadata from only the database.
-
-Whenever you want to change this metadata, you initiate a Reimport from the
-admin panel. This will follow the import instructions in _library\_path_ and
-regenerate that part of the database from scratch.
-
-## The Import Procedure
-
-_library\_path_ is scanned recursively to locate all files that match `*.yaml`
-(YAML import options) or `*.jelly` (JSON import options). Each of these files
-contains a key `id` that specifies which node is primarily affected and an array
-`sources` which lists metadata providers. When all these files have been
-evaluated, each node's children are traversed recursively to generate their
-paths. The imported libraries structure is a directed acyclic graph (DAG) -
-nodes can have multiple parents.
-
-The Sources are applied in-order to that node with decreasing priority. This
-process merges all aquired metadata into single nodes.
diff --git a/doc/import/providers.md b/doc/import/providers.md
deleted file mode 100644
index ecb5095..0000000
--- a/doc/import/providers.md
+++ /dev/null
@@ -1,82 +0,0 @@
-# Metadata Providers
-
-## `override`
-
-Allows for manual hardcoded metadata. This an instance of [`Node`](/doc/jellycommon/struct.Node.html).
-
-Special to this option are the `poster` and `backdrop` properties in the
-`private` section. These are reference images local to _library\_path_ and
-directly set the counterparts in `public`.
-
-### Example
-
-```yaml
-id: library
-sources:
- - !override
- public:
- kind: !collection
- title: "My Library"
- children:
- - movies
- - stuff
- private:
- poster: library.png
-```
-
-## `auto_children`
-
-Scans the directory of the file currently processed for `*.yaml` and `.jelly`,
-parses their ID and adds them as `children`.
-
-## `media`
-
-This references a media file on disk and links it to this node. Additionally it
-extracts matroska metadata aswell.
-
-> [!NOTE]
-> If `path` is a directory, then these options are applied recursively
-> all files inside, automatically creating new nodes based on inferred IDs and
-> linking them up.
-
-### Example
-
-```yaml
-id: decay-2012
-sources:
-- !media
- path: /movies/decay.webm
- ignore_metadata: true
- ignore_attachments: false
- ignore_chapters: false
-```
-
-## `trakt`
-
-The recommended provider for any movie, show or season. It automatically queries
-other linked APIs.
-
-### Example
-
-```yaml
-id: decay-2012
-sources:
-- !trakt
- kind: movie
- id: 98052
-```
-
-## `tmdb`
-
-Just like `trakt` but uses only TMDB instead.
-
-## `federated`
-
-Recursively federates a node with the same ID from another instance. Requires valid credentials in the seecrets file.
-
-```yaml
-id: movies
-sources:
-- !federated
- host: jellything.example.org
-```
diff --git a/doc/migration.md b/doc/migration.md
index 089ebf7..24728a2 100644
--- a/doc/migration.md
+++ b/doc/migration.md
@@ -30,7 +30,7 @@ jellytool migrate export /path/to/db import /tmp/jdb
Delete the old database and the JSON dump, they are not required anymore.
> [!CAUTION]
-> Confirm that everything still works and no data ist lost
+> Confirm that everything still works and no data is lost before!
```
rm /path/to/db.old
diff --git a/doc/paths.md b/doc/paths.md
index 4bbd2ef..da6b763 100644
--- a/doc/paths.md
+++ b/doc/paths.md
@@ -1,7 +1,7 @@
# Paths
-- **media_path**: All your media (videos, movies, etc.) lives here. Jellything
- will only require read-only access to this directory.
+- **media_path**: All your media (videos, movies, etc.) and import flags live
+ here. Jellything will only require read-only access to this directory.
- **asset_path**: Static assets for the page. This includes fallback images,
fonts and the front page. Used read-only.
- `error.avif`: Used when images cant be displayed because of an error. This
@@ -15,8 +15,6 @@
- `fonts/material-icons.woff2` Material Icons Font. Get this from online.
- **database_path**: The database stores all imported nodes, user accound and
such. Write access required.
-- **library_path**: This directory structure contains instructions for importing
- your media.
- **temp_path**: Where to place short-lived files. Write access required. Can be
in volatile memory (e.g. /tmp).
- **cache_path**: In here jellything will place dozens of transcoded imagery,