Share Channels, Domains, Playlists, and Repos as torrents (#1041)
Some checks are pending
Backend Tests / api-tests (core) (push) Waiting to run
Backend Tests / api-tests (files) (push) Waiting to run
Backend Tests / api-tests (media) (push) Waiting to run
Backend Tests / api-tests (rest) (push) Waiting to run
Backend Tests / api-contract-tests (push) Waiting to run
Backend Tests / api-migrations-and-start (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
Controller Tests / controller-tests (push) Waiting to run
Cypress Tests / cypress-component-tests (push) Waiting to run
Cypress Tests / cypress-e2e-tests (push) Waiting to run
Dead Code / vulture (push) Waiting to run
Jest Tests / jest-tests (push) Waiting to run

* Share Channels, Domains, Playlists, and Repos as torrents

A Share button on each one's edit page opens Share as Torrent for its
directory (disabled in WROL Mode, or without a directory). A Playlist
shares its hard-linked copy of its items, in order, so it does not
depend on the sender's library layout. The torrent is named after the
directory's last part (the Playlist or Channel), never its parents;
the modal now shows that name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Share: a Channel or Domain shares its saved directory, not an unsaved pick

useChannel and useDomain return the form's data, which holds a directory
as soon as one is picked, before Save; its files are not there until
then (and it may be another Collection's). They now also return the
directory the server has, and Share uses that.

The Playlist spec now commits an unsaved directory the way the field does
(blur), and checks it took, before checking what is shared.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
lrnselfreliance 2026-11-30 17:23:26 -07:00 • committed by GitHub
parent 6975053146
commit daae0b1d67
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 349 additions and 8 deletions

View file

@ -38,6 +38,7 @@ import {
import {useOneQuery, useWROLMode} from "../hooks/customHooks";
import {CollectionTable} from "./collections/CollectionTable";
import {CollectionTagModal} from "./collections/CollectionTagModal";
import {ShareCollectionButton} from "./collections/ShareCollectionButton";
import {
createRepo,
deleteRepo,
@ -1028,6 +1029,7 @@ export function RepoEditPage() {
<Button role='save' type='submit' disabled={wrolMode}>Save</Button>
<Button type='button' color='violet' disabled={wrolMode}
onClick={() => setTagModalOpen(true)}>Tag</Button>
<ShareCollectionButton directory={repo.directory} size='sm'/>
<Button type='button' role='danger' disabled={wrolMode}
onClick={() => setDeleteModalOpen(true)}>Delete</Button>
</div>