cap how many people can watch one multi-use link at once
New setting, ten by default, zero for no limit. Single-use links are unaffected, they are one viewer by definition. The catch is what happens at the ceiling. Jellyfin throws SecurityException once a user is at MaxActiveSessions, and that was landing in the generic handler, which marks the record failed and runs cleanup, which deletes the guest account. So without care, adding a ceiling would mean the eleventh person to open a link kicks out the ten already watching and destroys the link. Capacity is caught separately now: the record goes back to the state it was in, nothing is torn down, and the new arrival gets a 503 page inviting them to try again. Worth being honest that this caps how many people can start watching at once, not how many ever get in: each redemption issues its own session token that keeps working until the link is revoked or expires. Revoke is still the hard stop. README picks up the multi-use option, the new setting, and a section on what a multi-use link does and does not protect, plus the known limits around the token in the query string, the unthrottled redeem endpoint, and the tag being hidden in the web UI only.
Cette révision appartient à :
@@ -2,7 +2,7 @@
|
||||
var pluginId = '68540b76-ee74-436d-85ff-2abc884bbea6';
|
||||
var copyLabel = 'Copy Stream URL';
|
||||
var actionLabel = 'ShareLink';
|
||||
var clientVersion = '1.0.3-ui-1';
|
||||
var clientVersion = '1.0.3-ui-2';
|
||||
var allowedItemStorageKey = 'sharelinks.allowedItemId';
|
||||
var guestClassName = 'sharelinks-guest';
|
||||
var hiddenAttr = 'data-sharelinks-hidden';
|
||||
@@ -67,6 +67,7 @@
|
||||
pickFuture: 'Pick a time in the future.',
|
||||
multiUseLabel: 'Let several people use this link',
|
||||
multiUseHint: 'The link keeps working for anyone you send it to until it expires, instead of dying once the first person opens it.',
|
||||
multiUseLimit: 'Up to {count} of them can watch at the same time.',
|
||||
resultMultiUseNote: 'Anyone you send this link to can open it until it expires.',
|
||||
cannotDetermineItem: 'Could not determine which item to share. Open the item page and retry.',
|
||||
adminOnly: 'ShareLinks is available to administrators only.',
|
||||
@@ -94,6 +95,7 @@
|
||||
pickFuture: 'Choisissez une date dans le futur.',
|
||||
multiUseLabel: 'Autoriser plusieurs personnes à utiliser ce lien',
|
||||
multiUseHint: 'Le lien reste valable pour toutes les personnes à qui vous l\'envoyez jusqu\'à son expiration, au lieu de mourir dès la première ouverture.',
|
||||
multiUseLimit: 'Jusqu\'a {count} d\'entre elles peuvent regarder en meme temps.',
|
||||
resultMultiUseNote: 'Toutes les personnes à qui vous envoyez ce lien peuvent l\'ouvrir jusqu\'à son expiration.',
|
||||
cannotDetermineItem: 'Impossible de déterminer l\'élément à partager. Ouvrez la page du média et réessayez.',
|
||||
adminOnly: 'ShareLinks est réservé aux administrateurs.',
|
||||
@@ -1143,7 +1145,7 @@
|
||||
cancelText: t('cancel'),
|
||||
toggle: {
|
||||
label: t('multiUseLabel'),
|
||||
hint: t('multiUseHint'),
|
||||
hint: buildMultiUseHint(config),
|
||||
checked: !(config && config.OneUseDefault !== false)
|
||||
},
|
||||
datePicker: {
|
||||
@@ -1155,6 +1157,16 @@
|
||||
});
|
||||
}
|
||||
|
||||
function buildMultiUseHint(config) {
|
||||
var hint = t('multiUseHint');
|
||||
var limit = config ? parseInt(config.MaxConcurrentViewers, 10) : NaN;
|
||||
if (Number.isFinite(limit) && limit > 0) {
|
||||
hint += ' ' + t('multiUseLimit').replace('{count}', limit);
|
||||
}
|
||||
|
||||
return hint;
|
||||
}
|
||||
|
||||
function copyTextWhenReady(textPromise) {
|
||||
if (navigator.clipboard && navigator.clipboard.write && window.ClipboardItem && window.Blob) {
|
||||
try {
|
||||
|
||||
Référencer dans un nouveau ticket
Bloquer un utilisateur