Skip to content

One self-hosted app for your shows, movies and music.

HolyArrs 1.0.1

CoderLuiida89e47f13a3
diff --git a/CHANGELOG.md b/CHANGELOG.md
index eec9379..91d9370 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,17 @@
All notable changes to HolyArrs are listed here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and versions follow [Semantic Versioning](https://semver.org/).
+## 1.0.1
+
+### Added
+
+- Libraries and downloads made of symlinks work when you set `HOLYARRS_FOLLOW_LINKS=1`. Linked files are never read in full or copied. ([#158](https://github.com/HolyArrs/HolyArrs/issues/158))
+
+### Fixed
+
+- Setup no longer ends on an error page after moving over two downloaders of the same kind. ([#160](https://github.com/HolyArrs/HolyArrs/issues/160))
+- A Newznab or Torznab Source works with just the site address, and its key field says **API key**. ([#159](https://github.com/HolyArrs/HolyArrs/issues/159))
+
## 1.0.0
First release. HolyArrs runs movies, shows and music requests, downloads and your library in one app.
diff --git a/VERSION b/VERSION
index 3eefcb9..7dea76e 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.0.0
+1.0.1
diff --git a/app/backend/internal/importer/import_check.go b/app/backend/internal/importer/import_check.go
index a0cad1f..20a2fc2 100644
--- a/app/backend/internal/importer/import_check.go
+++ b/app/backend/internal/importer/import_check.go
@@ -31,7 +31,7 @@ func guardPlanWith(plan []mediafiles.PlanStep, lib string, cands []Candidate, ru
plan[i].Why = append([]string{why}, plan[i].Why...)
}
}
- if plan[i].Method == "hardlink" && !rules.SkipFreeSpaceCheck {
+ if _, isLink := LinkedFile(plan[i].SourceFile); plan[i].Method == "hardlink" && !rules.SkipFreeSpaceCheck && !isLink {
dir := existingDir(filepath.Dir(plan[i].TargetPath))
key := diskID(dir)
if key == "" {
diff --git a/app/backend/internal/importer/importer.go b/app/backend/internal/importer/importer.go
index eeb4c41..3eca621 100644
--- a/app/backend/internal/importer/importer.go
+++ b/app/backend/internal/importer/importer.go
@@ -104,10 +104,14 @@ func Scan(root string) ([]Candidate, error) {
if err != nil {
return err
}
- if d.Type()&fs.ModeSymlink != 0 || d.IsDir() {
+ linked, isLink := LinkedFile(p)
+ if (d.Type()&fs.ModeSymlink != 0 && !isLink) || d.IsDir() {
return nil
}
fi, err := d.Info()
+ if isLink {
+ fi, err = linked, nil
+ }
if err != nil {
return err
}
@@ -445,7 +449,8 @@ func place(s mediafiles.PlanStep, ops Ops, resumeFrom time.Time) mediafiles.Plac
r.Outcome, r.Error = "failed", err.Error()
return r
}
- if !sfi.Mode().IsRegular() {
+ _, isLink := LinkedFile(s.SourceFile)
+ if !sfi.Mode().IsRegular() && !isLink {
r.Outcome, r.Error = "refused", "the source is not a plain file (a symlink or something else)"
return r
}
@@ -461,6 +466,15 @@ func place(s mediafiles.PlanStep, ops Ops, resumeFrom time.Time) mediafiles.Plac
r.Outcome, r.Error = "refused", "a file HolyArrs did not place is already at the target"
return r
}
+ if isLink {
+ // A followed link is placed as a link: its target is never copied.
+ if err := placeLink(s.SourceFile, s.TargetPath); err != nil {
+ r.Outcome, r.Error = "failed", err.Error()
+ return r
+ }
+ r.Outcome, r.PlacedBy = "placed", "copy" // placed_by has no link kind; a link is a copy of the entry
+ return r
+ }
if err := os.MkdirAll(filepath.Dir(s.TargetPath), 0o777); err != nil {
r.Outcome, r.Error = "failed", err.Error()
return r
@@ -526,7 +540,11 @@ func candidates(root string, files []domain.SeenFile) ([]Candidate, []mediafiles
ok = under(root, cand)
}
if ok && rootErr == nil {
- if real, err := filepath.EvalSymlinks(cand); err == nil && !under(realRoot, real) {
+ if _, isLink := LinkedFile(cand); isLink {
+ if real, err := filepath.EvalSymlinks(filepath.Dir(cand)); err == nil && real != realRoot && !under(realRoot, real) {
+ ok = false
+ }
+ } else if real, err := filepath.EvalSymlinks(cand); err == nil && !under(realRoot, real) {
ok = false
}
}
diff --git a/app/backend/internal/importer/links.go b/app/backend/internal/importer/links.go
new file mode 100644
index 0000000..c08fa8c
--- /dev/null
+++ b/app/backend/internal/importer/links.go
@@ -0,0 +1,48 @@
+package importer
+
+import (
+ "os"
+ "path/filepath"
+)
+
+// FollowLinks makes a symlink to a plain file count as that file:
+// setups that stream media through a mounted filesystem keep their Library
+// and downloads as links. Off by default; HOLYARRS_FOLLOW_LINKS=1 turns it on.
+var FollowLinks = os.Getenv("HOLYARRS_FOLLOW_LINKS") == "1"
+
+// LinkedFile returns the target's info when p is a symlink to a plain file
+// and links are followed.
+func LinkedFile(p string) (os.FileInfo, bool) {
+ if !FollowLinks {
+ return nil, false
+ }
+ if fi, err := os.Lstat(p); err != nil || fi.Mode()&os.ModeSymlink == 0 {
+ return nil, false
+ }
+ fi, err := os.Stat(p)
+ if err != nil || !fi.Mode().IsRegular() {
+ return nil, false
+ }
+ return fi, true
+}
+
+// InsideRealFile is InsideReal for a file: a followed link only needs its
+// folder inside root, since its target lives elsewhere by design.
+func InsideRealFile(root, p string) bool {
+ if _, ok := LinkedFile(p); ok {
+ return insideReal(root, filepath.Dir(p))
+ }
+ return insideReal(root, p)
+}
+
+// placeLink puts a new link at target pointing where src's link resolves.
+func placeLink(src, target string) error {
+ real, err := filepath.EvalSymlinks(src)
+ if err != nil {
+ return err
+ }
+ if err := os.MkdirAll(filepath.Dir(target), 0o777); err != nil {
+ return err
+ }
+ return os.Symlink(real, target)
+}
diff --git a/app/backend/internal/importer/links_test.go b/app/backend/internal/importer/links_test.go
new file mode 100644
index 0000000..b53d7d5
--- /dev/null
+++ b/app/backend/internal/importer/links_test.go
@@ -0,0 +1,57 @@
+package importer
+
+import (
+ "os"
+ "path/filepath"
+ "testing"
+ "time"
+
+ domain "github.com/HolyArrs/holyarrs/app/backend/internal/core/model"
+
+ "github.com/HolyArrs/holyarrs/app/backend/internal/mediafiles"
+)
+
+// A downloaded file that is a link is placed as a link when links are
+// followed, and refused otherwise.
+func TestPlaceFollowedLink(t *testing.T) {
+ mount, dl, lib := t.TempDir(), t.TempDir(), t.TempDir()
+ target := filepath.Join(mount, "real.mkv")
+ if err := os.WriteFile(target, []byte("video"), 0o644); err != nil {
+ t.Fatal(err)
+ }
+ src := filepath.Join(dl, "Movie.2020.mkv")
+ if err := os.Symlink(target, src); err != nil {
+ t.Skip("symlinks not available:", err)
+ }
+ old := FollowLinks
+ defer func() { FollowLinks = old }()
+ step := mediafiles.PlanStep{SourceFile: src, TargetPath: filepath.Join(lib, "Movie (2020)", "Movie (2020).mkv"), Method: "hardlink"}
+
+ FollowLinks = false
+ if r := place(step, Ops{}, time.Time{}); r.Outcome != "refused" {
+ t.Fatalf("strict default: want refused, got %+v", r)
+ }
+ FollowLinks = true
+ if cands, bad := candidates(dl, []domain.SeenFile{{Name: "Movie.2020.mkv", Size: 5}}); len(cands) != 1 || len(bad) != 0 {
+ t.Fatalf("want the link accepted as a download file, got %v %v", cands, bad)
+ }
+ r := place(step, Ops{}, time.Time{})
+ if r.Outcome != "placed" {
+ t.Fatalf("want placed, got %+v", r)
+ }
+ fi, err := os.Lstat(step.TargetPath)
+ if err != nil || fi.Mode()&os.ModeSymlink == 0 {
+ t.Fatalf("want a link at the target, got %v %v", fi, err)
+ }
+ if got, _ := filepath.EvalSymlinks(step.TargetPath); got != mustReal(t, target) {
+ t.Fatalf("link points to %q", got)
+ }
+}
+
+func mustReal(t *testing.T, p string) string {
+ r, err := filepath.EvalSymlinks(p)
+ if err != nil {
+ t.Fatal(err)
+ }
+ return r
+}
diff --git a/app/backend/internal/library/adopt.go b/app/backend/internal/library/adopt.go
index f9d6bd9..8661e33 100644
--- a/app/backend/internal/library/adopt.go
+++ b/app/backend/internal/library/adopt.go
@@ -14,6 +14,7 @@ import (
"strconv"
"strings"
+ "github.com/HolyArrs/holyarrs/app/backend/internal/importer"
"github.com/HolyArrs/holyarrs/app/backend/internal/mediafiles"
domain "github.com/HolyArrs/holyarrs/app/backend/internal/core/model"
@@ -108,7 +109,7 @@ const (
)
// listVideos finds the video files in one movie folder, samples left out,
-// biggest first. Symlinks are never followed.
+// biggest first. Symlinks are followed only to plain files, and only when importer.FollowLinks is on.
// NasSystemDir reports whether name is a folder a NAS or OS keeps for
// itself (thumbnails, recycle bins, snapshots). Folder walks skip them:
// they hold no media of the person's, and reading them wakes disks.
@@ -138,7 +139,8 @@ func ListVideosN(lib, folder string, limit int) []AdoptVideo {
}
return nil
}
- if e.Type()&fs.ModeSymlink != 0 || !e.Type().IsRegular() || !videoExt[strings.ToLower(filepath.Ext(p))] || len(out) >= limit {
+ linked, isLink := importer.LinkedFile(p)
+ if (e.Type()&fs.ModeSymlink != 0 && !isLink) || (!isLink && !e.Type().IsRegular()) || !videoExt[strings.ToLower(filepath.Ext(p))] || len(out) >= limit {
return nil
}
base := strings.ToLower(strings.TrimSuffix(e.Name(), filepath.Ext(e.Name())))
@@ -148,6 +150,9 @@ func ListVideosN(lib, folder string, limit int) []AdoptVideo {
}
}
fi, err := e.Info()
+ if isLink {
+ fi, err = linked, nil
+ }
if err != nil {
return nil
}
diff --git a/app/backend/internal/library/adopt_links_test.go b/app/backend/internal/library/adopt_links_test.go
new file mode 100644
index 0000000..ca705ff
--- /dev/null
+++ b/app/backend/internal/library/adopt_links_test.go
@@ -0,0 +1,37 @@
+package library
+
+import (
+ "os"
+ "path/filepath"
+ "testing"
+
+ "github.com/HolyArrs/holyarrs/app/backend/internal/importer"
+)
+
+// A movie file that is a link to a mounted file is found only when
+// links are followed.
+func TestListVideosFollowsFileLinks(t *testing.T) {
+ mount, lib := t.TempDir(), t.TempDir()
+ target := filepath.Join(mount, "real.mkv")
+ if err := os.WriteFile(target, make([]byte, 2048), 0o644); err != nil {
+ t.Fatal(err)
+ }
+ if err := os.MkdirAll(filepath.Join(lib, "Movie (2020)"), 0o755); err != nil {
+ t.Fatal(err)
+ }
+ if err := os.Symlink(target, filepath.Join(lib, "Movie (2020)", "Movie (2020).mkv")); err != nil {
+ t.Skip("symlinks not available:", err)
+ }
+ old := importer.FollowLinks
+ defer func() { importer.FollowLinks = old }()
+
+ importer.FollowLinks = false
+ if got := ListVideosN(lib, "Movie (2020)", 10); len(got) != 0 {
+ t.Fatalf("strict default listed a link: %+v", got)
+ }
+ importer.FollowLinks = true
+ got := ListVideosN(lib, "Movie (2020)", 10)
+ if len(got) != 1 || got[0].Size != 2048 {
+ t.Fatalf("want the linked file with its target size, got %+v", got)
+ }
+}
diff --git a/app/backend/internal/library/adopt_scan.go b/app/backend/internal/library/adopt_scan.go
index a5205d7..09376de 100644
--- a/app/backend/internal/library/adopt_scan.go
+++ b/app/backend/internal/library/adopt_scan.go
@@ -263,7 +263,10 @@ func InspectLibraryVideo(root, relative string, old map[string]any, backfill boo
}
full := filepath.Join(root, rel)
fi, err := os.Lstat(full)
- if err != nil || !fi.Mode().IsRegular() || !importer.InsideReal(root, full) {
+ if linked, ok := importer.LinkedFile(full); ok {
+ fi = linked
+ }
+ if err != nil || !fi.Mode().IsRegular() || !importer.InsideRealFile(root, full) {
return nil, false
}
size, ok := inspectionSize(old["inspection_size"])
diff --git a/app/backend/internal/library/adoptcopy.go b/app/backend/internal/library/adoptcopy.go
index 237f108..87f0cb4 100644
--- a/app/backend/internal/library/adoptcopy.go
+++ b/app/backend/internal/library/adoptcopy.go
@@ -47,7 +47,7 @@ func (s *Service) AdoptMovieCopy(ctx context.Context, titleID, versionID int64,
root := filepath.Join(lf.Path, v.FolderName)
abs := filepath.Join(lf.Path, rel)
within, err := filepath.Rel(root, abs)
- if !filepath.IsLocal(rel) || err != nil || !filepath.IsLocal(within) || !importer.InsideReal(root, abs) || !importer.InsideReal(lf.Path, abs) {
+ if !filepath.IsLocal(rel) || err != nil || !filepath.IsLocal(within) || !importer.InsideRealFile(root, abs) || !importer.InsideRealFile(lf.Path, abs) {
return f, fmt.Errorf("%w: choose a file inside this Version's folder", ErrCopyChoice)
}
fi, err := os.Stat(abs)
diff --git a/app/backend/internal/library/adoptmusic.go b/app/backend/internal/library/adoptmusic.go
index 511aa88..17f1385 100644
--- a/app/backend/internal/library/adoptmusic.go
+++ b/app/backend/internal/library/adoptmusic.go
@@ -149,10 +149,14 @@ func listAudio(lib, folder string, limit int) []AdoptVideo {
}
return nil
}
- if e.Type()&fs.ModeSymlink != 0 || !e.Type().IsRegular() || !importer.IsAudio(filepath.Ext(p)) || len(out) >= limit {
+ linked, isLink := importer.LinkedFile(p)
+ if (e.Type()&fs.ModeSymlink != 0 && !isLink) || (!isLink && !e.Type().IsRegular()) || !importer.IsAudio(filepath.Ext(p)) || len(out) >= limit {
return nil
}
fi, err := e.Info()
+ if isLink {
+ fi, err = linked, nil
+ }
if err != nil {
return nil
}
diff --git a/app/backend/internal/library/move.go b/app/backend/internal/library/move.go
index 0495d51..9eff18d 100644
--- a/app/backend/internal/library/move.go
+++ b/app/backend/internal/library/move.go
@@ -223,9 +223,54 @@ const caseTempSuffix = ".holyarrs-case"
type preparedFileProof struct {
value string
info os.FileInfo
+ link bool
+}
+
+// linkTarget returns where name points when name is a symlink, as an
+// absolute path.
+func linkTarget(name string) (string, os.FileInfo, bool) {
+ fi, err := os.Lstat(name)
+ if err != nil || fi.Mode()&os.ModeSymlink == 0 {
+ return "", nil, false
+ }
+ target, err := os.Readlink(name)
+ if err != nil {
+ return "", nil, false
+ }
+ if !filepath.IsAbs(target) {
+ target = filepath.Join(filepath.Dir(name), target)
+ }
+ return target, fi, true
+}
+
+// moveLink moves a symlink by making it again at to and removing from. The
+// file it points to is never opened: on a streaming mount that would read
+// the whole file. It never replaces anything at to.
+func moveLink(from, to, target string, src os.FileInfo) error {
+ if dst, err := os.Lstat(to); err == nil {
+ if os.SameFile(src, dst) {
+ // One entry under two spellings (a case-only rename).
+ return os.Rename(from, to)
+ }
+ if have, _, ok := linkTarget(to); ok && have == target {
+ return os.Remove(from)
+ }
+ return fmt.Errorf("%s already exists and is a different file; HolyArrs never replaces it", to)
+ }
+ if err := os.MkdirAll(filepath.Dir(to), 0o777); err != nil {
+ return err
+ }
+ if err := os.Symlink(target, to); err != nil {
+ return err
+ }
+ return os.Remove(from)
}
func prepareFileProof(name string) (preparedFileProof, error) {
+ // A link's proof is where it points; its file is not read.
+ if target, fi, ok := linkTarget(name); ok {
+ return preparedFileProof{value: "link:" + target, info: fi, link: true}, nil
+ }
f, err := os.Open(name)
if err != nil {
return preparedFileProof{}, err
@@ -259,6 +304,10 @@ func fileProof(name string) (string, error) {
func proofSourceUnchanged(name string, p preparedFileProof) bool {
st, err := os.Stat(name)
+ if p.link {
+ target, fi, ok := linkTarget(name)
+ return ok && os.SameFile(p.info, fi) && p.value == "link:"+target
+ }
return err == nil && os.SameFile(p.info, st) && p.info.Size() == st.Size() && p.info.ModTime().Equal(st.ModTime())
}
@@ -282,6 +331,9 @@ func moveFileWithProof(from, to, proof string) error {
if from == to {
return nil
}
+ if target, fi, ok := linkTarget(from); ok {
+ return moveLink(from, to, target, fi)
+ }
if strings.EqualFold(from, to) {
return caseRename(from, to, proof)
}
diff --git a/app/backend/internal/library/move_links_test.go b/app/backend/internal/library/move_links_test.go
new file mode 100644
index 0000000..e602cfc
--- /dev/null
+++ b/app/backend/internal/library/move_links_test.go
@@ -0,0 +1,59 @@
+package library
+
+import (
+ "os"
+ "path/filepath"
+ "testing"
+)
+
+// Moving a linked file re-points the link and never reads its target.
+func TestMoveFileKeepsLinkAndNeverReadsTarget(t *testing.T) {
+ mount, lib := t.TempDir(), t.TempDir()
+ target := filepath.Join(mount, "real.mkv")
+ if err := os.WriteFile(target, []byte("video"), 0o644); err != nil {
+ t.Fatal(err)
+ }
+ from := filepath.Join(lib, "Old (2020)", "old.mkv")
+ to := filepath.Join(lib, "New (2020)", "New (2020).mkv")
+ if err := os.MkdirAll(filepath.Dir(from), 0o755); err != nil {
+ t.Fatal(err)
+ }
+ // A relative link, so the move must keep it pointing at the same file.
+ rel, _ := filepath.Rel(filepath.Dir(from), target)
+ if err := os.Symlink(rel, from); err != nil {
+ t.Skip("symlinks not available:", err)
+ }
+ // An unreadable target proves nothing opens it.
+ if err := os.Chmod(target, 0); err != nil {
+ t.Fatal(err)
+ }
+ defer os.Chmod(target, 0o644)
+
+ proof, err := prepareFileProof(from)
+ if err != nil || !proof.link || !proofSourceUnchanged(from, proof) {
+ t.Fatalf("link proof: %+v %v", proof, err)
+ }
+ if err := moveRecordedFile(from, to, proof.value); err != nil {
+ t.Fatal(err)
+ }
+ if _, err := os.Lstat(from); !os.IsNotExist(err) {
+ t.Fatalf("old link still there: %v", err)
+ }
+ got, _, ok := linkTarget(to)
+ if !ok || got != target {
+ t.Fatalf("new link points to %q (link %v), want %q", got, ok, target)
+ }
+ // A second try after a cut-off move is clean, and nothing is replaced.
+ if err := os.Symlink(target, from); err != nil {
+ t.Fatal(err)
+ }
+ if err := moveFile(from, to); err != nil {
+ t.Fatalf("finishing a cut-off link move: %v", err)
+ }
+ other := filepath.Join(mount, "other.mkv")
+ _ = os.WriteFile(other, []byte("x"), 0o644)
+ _ = os.Symlink(other, from)
+ if err := moveFile(from, to); err == nil {
+ t.Fatal("a different link at the target was replaced")
+ }
+}
diff --git a/app/backend/internal/sources/client.go b/app/backend/internal/sources/client.go
index de8e778..a37e66d 100644
--- a/app/backend/internal/sources/client.go
+++ b/app/backend/internal/sources/client.go
@@ -199,7 +199,7 @@ func (c *Client) getWithObserver(ctx context.Context, op string, q url.Values, o
if err := c.wait(ctx); err != nil {
return nil, err
}
- raw := strings.TrimRight(c.cfg.URL, "/")
+ raw := feedAddress(c.cfg.URL)
if c.cfg.Format == "rss" {
raw = c.cfg.URL
if c.cfg.APIKey != "" {
@@ -669,3 +669,13 @@ func parseItems(body []byte, protocol string) ([]Item, error) {
}
return out, nil
}
+
+// feedAddress is a Newznab or Torznab address ready to call: an address
+// with no path (https://indexer.example) means its /api.
+func feedAddress(raw string) string {
+ raw = strings.TrimRight(raw, "/")
+ if u, err := url.Parse(raw); err == nil && u.Host != "" && u.Path == "" && u.RawQuery == "" {
+ return raw + "/api"
+ }
+ return raw
+}
diff --git a/app/backend/internal/sources/feed_address_test.go b/app/backend/internal/sources/feed_address_test.go
new file mode 100644
index 0000000..a23f200
--- /dev/null
+++ b/app/backend/internal/sources/feed_address_test.go
@@ -0,0 +1,19 @@
+package sources
+
+import "testing"
+
+// An address with no path calls /api; anything else is left alone.
+func TestFeedAddress(t *testing.T) {
+ for in, want := range map[string]string{
+ "https://indexer.example": "https://indexer.example/api",
+ "https://indexer.example/": "https://indexer.example/api",
+ "https://indexer.example/api": "https://indexer.example/api",
+ "http://prowlarr:9696/1/api": "http://prowlarr:9696/1/api",
+ "http://jackett:9117/api/v2.0/x/": "http://jackett:9117/api/v2.0/x",
+ "https://indexer.example/feed?t=x": "https://indexer.example/feed?t=x",
+ } {
+ if got := feedAddress(in); got != want {
+ t.Errorf("feedAddress(%q) = %q, want %q", in, got, want)
+ }
+ }
+}
diff --git a/app/frontend/src/lib/setup/welcome-sources.svelte.ts b/app/frontend/src/lib/setup/welcome-sources.svelte.ts
index 0dbab90..8662e63 100644
--- a/app/frontend/src/lib/setup/welcome-sources.svelte.ts
+++ b/app/frontend/src/lib/setup/welcome-sources.svelte.ts
@@ -65,11 +65,12 @@ export function createWelcomeSources(ctx: { busy: boolean; listDownloaders: () =
]);
const kindName: Record<string, string> = { movie: 'Movies', show: 'TV shows', music: 'Music' };
const bridgeName: Record<string, string> = { prowlarr: 'Prowlarr', jackett: 'Jackett' };
- haveSet = [
+ // One line each: two downloaders of one kind would repeat a line, and the list is keyed by its text.
+ haveSet = [...new Set([
...(fl ?? []).map((f) => `${kindName[f.kind] ?? f.label} · ${f.path}`),
...(dl ?? []).map((d) => kindWords[d.kind] ?? d.name),
...(br ?? []).map((b) => bridgeName[b.kind] ?? b.kind)
- ];
+ ])];
// Unknown (the list failed to load) counts as set, so nothing is asked twice.
const folders = fl ? fl.length : 1;
const dls = dl ? dl.length : 1;
diff --git a/app/frontend/src/routes/settings/sources/+page.svelte b/app/frontend/src/routes/settings/sources/+page.svelte
index ff04d3f..251c160 100644
--- a/app/frontend/src/routes/settings/sources/+page.svelte
+++ b/app/frontend/src/routes/settings/sources/+page.svelte
@@ -160,7 +160,7 @@
</span>
</Field>
{#if form.format !== 'rss'}
- <Field id="so-key" label="Key" hint="Retype it if the address moves host">
+ <Field id="so-key" label="API key" hint="Retype it if the address moves host">
<input id="so-key" class="input mono" type="password" bind:value={form.api_key} autocomplete="new-password" spellcheck="false" />
</Field>
{/if}
diff --git a/app/tests/sources/sources.spec.ts b/app/tests/sources/sources.spec.ts
index 9cf3ed9..9ffe97a 100644
--- a/app/tests/sources/sources.spec.ts
+++ b/app/tests/sources/sources.spec.ts
@@ -18,7 +18,7 @@ async function addSource(name: string, format: string, url: string, key = '') {
await page.getByLabel('Name', { exact: true }).fill(name);
await page.getByLabel('Kind of feed').selectOption(format);
await page.getByLabel('Address', { exact: true }).fill(url);
- if (key) await page.getByLabel('Key', { exact: true }).fill(key);
+ if (key) await page.getByLabel('API key', { exact: true }).fill(key);
await page.getByText('Reach the local network', { exact: true }).click();
await page.getByRole('button', { name: 'Save', exact: true }).click();
}
@@ -35,14 +35,14 @@ test('a Source is added, tested, shows a wrong key in plain words, pauses and re
// A wrong key.
await row.getByRole('button', { name: 'Change' }).click();
- await page.getByLabel('Key', { exact: true }).fill('not-the-right-key');
+ await page.getByLabel('API key', { exact: true }).fill('not-the-right-key');
await page.getByRole('button', { name: 'Save', exact: true }).click();
await row.getByRole('button', { name: 'Test' }).click();
await expect(row.getByTestId('source-test')).toContainText('turned down the key');
// Back to the right key, then pause and resume.
await row.getByRole('button', { name: 'Change' }).click();
- await page.getByLabel('Key', { exact: true }).fill(indexerKey);
+ await page.getByLabel('API key', { exact: true }).fill(indexerKey);
await page.getByRole('button', { name: 'Save', exact: true }).click();
await row.getByRole('button', { name: 'Pause' }).click();
await expect(row.getByTestId('source-state')).toHaveText('Paused');
diff --git a/docs/reference/env-vars.md b/docs/reference/env-vars.md
index a158ce6..b069f05 100644
--- a/docs/reference/env-vars.md
+++ b/docs/reference/env-vars.md
@@ -37,6 +37,7 @@ HolyArrs drops one newline at the end of the file. If the file is missing, HolyA
| --- | --- | --- | --- |
| `HOLYARRS_SAFE_MODE` | Start only the core: sign-in, Library, settings, backups and health. Remove it after the fix. | off | `1` |
| `HOLYARRS_LOW_MEMORY` | `1` forces low-memory mode on, `0` forces it off. Unset, it turns on at about 2.5 GiB of RAM or less. | by machine size | `1` |
+| `HOLYARRS_FOLLOW_LINKS` | `1` lets the Library scan and imports use video and music files that are symlinks (libraries built from links into a mounted drive). A linked download is placed in the Library as a link. | off | `1` |
| `GOMEMLIMIT` | Override the memory target HolyArrs sets for itself. | set by HolyArrs | `1GiB` |
| `HOLYARRS_SKIP_SPACE_CHECK` | Skip the free-space check before a database update. | off | `yes` |
| `HOLYARRS_CONFIG_IN_MEMORY` | Allow `/config` on a memory-backed folder. For test boxes; data is lost on restart. | off | `yes` |