17 Révisions
Auteur SHA1 Message Date
Gitea Actions be31a08921 Update manifest/meta for v1.0.6.5 2026-09-19 19:55:54 +00:00
jimmyGALLAND 51b4909cbd - Add workflow Action
Release / build-and-release (push) Successful in 32s
- Version .5
2026-09-19 21:48:19 +02:00
Francois CB 6304650197 Fold 1.0.7.0 into 1.0.6.0 2026-09-18 17:22:24 +02:00
Francois CB 12ce432f77 Fold 1.0.8.0 into 1.0.7.0 2026-09-18 17:15:13 +02:00
Francois CB 1c7acfe185 Add the client script while index.html is served
Writing the tag into index.html on disk fails on most fresh installs
(linuxserver image, distro packages, Docker as a normal user) because
the web files belong to root. A middleware now adds the tag to the
response instead, so the ShareLink action and the guest lockdown work
right after install. The on-disk edit stays as a best-effort extra, and
the tag uses a relative src so it also works under a base URL.

Bump to 1.0.8.0.
2026-09-18 16:31:45 +02:00
Francois CB d88034c988 Don't let a failed index.html backup block the injection
On linuxserver/jellyfin the web folder belongs to root, so copying
index.html to index.html.sharelinks.bak threw even when index.html itself
was writable, and the ShareLink action never got injected. The backup is
best-effort now.

Bump to 1.0.7.0.
2026-09-18 15:48:42 +02:00
Francois Coutau Bégarie 079a1de23e Fix guest sign-in on Jellyfin 12 (#22)
The sign-in page stored the guest's server entry with LastConnectionMode 1
(Remote) but only a ManualAddress. jellyfin-web 12 builds its ApiClient from
that entry, gets no address, throws "Must supply a serverAddress" and never
leaves the splash screen. Store mode 2 (Manual), which is what jellyfin-web
itself writes after a normal sign-in.

Also hide the Modern layout header links, user menu and drawer toggle for
guests (Modern is the default in 12), and close the item action sheet on
desktop when ShareLink opens its popup. Escape only closes it in the TV
layout, a click on the dialog container works everywhere.

Bump to 1.0.6.0.
2026-09-18 11:55:48 +02:00
Francois Coutau Bégarie f57c1a1955 Keep redemption working on Jellyfin 10.11.9 and later (#20)
Jellyfin 10.11.9 changed IUserManager.ChangePassword to take the user id
instead of the User. A call compiled against either signature throws
MissingMethodException on the other, so look up whichever one the server
has and call it through a delegate. Bumps to 1.0.5.0.
2026-09-11 14:49:55 +02:00
Franciskid 34637f52dc fold the device fix into 1.0.4.0
No point shipping 1.0.5.0 as its own version, neither was ever released.
2026-07-27 20:56:17 +02:00
Francois CB 911ab41b0c delete guest devices on teardown (#18)
Jellyfin does not cascade a user delete to the Device rows redemption
creates, and DeviceManager throws for the whole listing when one device's
user is missing, so a single leftover guest 404s the dashboard devices page.

Deletes the guest's devices before the user, and sweeps devices this plugin
created whose user is already gone at startup for links torn down by older
builds.
2026-07-27 20:56:04 +02:00
Francois CB d1ee74677b Block plugin routes for share guests (#16)
* block plugin routes for share guests

Adds a global MVC filter that refuses share-guest accounts on any plugin
controller. Jellyfin's own API stays open, the share tag policy already
bounds it and playback needs it.

Guests are identified by the auth provider marker on the account, so this
covers a leaked token used from curl or a native client, not just the web
client where the CSS lockdown runs.

* add plugin exception list and honest wording

Config page lists installed plugins with a checkbox each, for the ones that
need to answer guests during playback. Default is unticked.

Renames the hidden selectors setting to say it is cosmetic, and stops the
readme implying the web client lockdown confines anything.

* bump to 1.0.4.0
2026-07-27 20:39:21 +02:00
Franciskid 4ad6d5b1ed add a button to clear out finished share links
The dashboard listed every share ever made, including ones revoked or expired
months ago, and nothing ever pruned them. There is now a "Clean up finished links"
button next to Refresh that runs a normal cleanup pass and then drops the records
that are done with, reporting how many went.

Only revoked, expired and failed records are removed. A link that can still be
used is left alone, including a spent one-use link whose guest is still watching
until it expires, since that record is Redeemed rather than finished.

Folded into 1.0.3.0 rather than shipped as 1.0.3.1: the ceiling fix and this are
going out as one replacement of that version.
2026-07-26 23:04:51 +02:00
Franciskid 01e2235c02 refuse an over-the-ceiling viewer without destroying the link
The ceiling shipped in 1.0.3.0 did the opposite of its job. Jellyfin throws
MediaBrowser.Controller.Net.SecurityException when a user is at their session
limit, and the catch that was meant to handle it named System.Security's type of
the same name, so it never matched. The exception fell through to the failure
path, which marks the record failed and runs cleanup, which deletes the guest
account. Live result with the ceiling at 3: the fourth viewer got a dead-link
page, the three already watching were kicked out, and the link was gone.

Rather than swap one exception type for another and trust it, the over-the-ceiling
viewer is now turned away before anything is written at all: no tag work, no
status change, the guest account untouched. The check mirrors what Jellyfin does
when it creates a session, counting sessions for the guest against the ceiling.
The typed catch stays as a backstop for the race between the check and the call,
and it now names the right type.

A link that has never been redeemed has no guest yet, so it can never be at a
ceiling, and 0 still means no limit.
2026-07-26 21:45:48 +02:00
Franciskid f0b9e8351b let a link be used by several people instead of dying on first open
The create popup now has a "Let several people use this link" box next to the
expiry controls. Tick it and the link stays redeemable by everyone you send it to
until it expires; leave it and you get the old behaviour, where the first person
to open it is the only one who gets in. The plugin setting that used to be the
only control is now just what the box starts out as, and its label on the config
page says so, because "Default one-use links" explained nothing.

Multi-use did not actually work before this. Two things in Jellyfin stopped it,
and both had to change:

Guests were given MaxActiveSessions = 1, and AuthenticateNewSessionInternal throws
SecurityException once a user is at that limit. The second viewer's redemption
would fail, the record would go to Failed, and cleanup would then delete the guest
account, kicking the first viewer out too. Multi-use links now get 0, which is how
Jellyfin spells "no limit" in that check.

The device id was generated once and reused for every redemption, and
GetAuthorizationToken logs out every existing session for the same user and device
before issuing a token. So even under a raised session cap, each new viewer would
have revoked the previous one's token. Multi-use links now mint a device id per
redemption.

Both viewers of a multi-use link share one temporary account, so they also share
playback position and watched state on the shared title.
2026-07-26 21:05:54 +02:00
Franciskid 35631eae46 move the ShareLink action to its own section at the bottom of the item menu
The button used to be cloned in next to "Copy Stream URL", or shoved at the top
of the menu when there was none, which put it in the middle of Jellyfin's own
command groups. Now there is a single injection path: append an actionsheetDivider
plus the action at the end of the sheet's scroller, so it reads as its own
section the way Jellyfin separates its groups.

It also stopped appearing on menus for things that are not media. The old code
resolved the item from the URL, so opening the "..." menu on a cast member inside
a movie page showed ShareLink and would have shared the movie behind it. The item
is now taken from the trigger that opened the menu (card, list row or the detail
page's own button, all of which we can walk up from) and its type is checked
against the server before anything is injected: movie, series, season, episode,
nothing else. The API refuses everything else too, so a hand-rolled request
cannot tag a person or a playlist either.

Clicking the action now dismisses the action sheet instead of leaving it stacked
under the dialog.
2026-07-26 16:21:05 +02:00
Franciskid bbb999842f share whole series and seasons, not just single titles
Sharing a series or season now tags the entire tree (series, seasons,
episodes) so the guest can browse and play everything inside it, and
strips it all again at cleanup. Redeeming re-tags the tree, so episodes
added after the link was created show up on the next redemption. The
guest lockdown in the web client now asks the server whether a page's
item is visible to the guest instead of hard-coding the single shared
id, so guests can navigate inside the shared tree but nowhere else.
Libraries and collections are still rejected.

Bumps the version to 1.0.1.0.
2026-07-08 01:50:57 +02:00
Franciskid c29ea7f20c ShareLinks plugin: guest share links for Jellyfin
Includes fix for redemption failing with DbUpdateConcurrencyException:
change the guest password before applying the user policy, since
UpdatePolicyAsync bumps the user's EF concurrency token and a stale
instance then breaks ChangePassword.
2026-07-06 18:21:22 +02:00