Add collections, videos, images to shareable items

Cette révision appartient à :
2026-09-18 21:56:11 +02:00
Parent e94fda86b6
révision 4450906da9
4 fichiers modifiés avec 1799 ajouts et 1480 suppressions
+9 -7
Voir le fichier
@@ -227,7 +227,7 @@ public sealed class ShareLinksController : ControllerBase
itemId,
item.Name,
item.GetType().Name);
return BadRequest(new { error = "Only a movie, series, season or episode can be shared. Open the title's page and try again." });
return BadRequest(new { error = "Only a video, image, and collection can be shared. Open the title's page and try again." });
}
try
@@ -526,16 +526,18 @@ setTimeout(function () { window.location.replace({{redirectUrlJson}}); }, 4000);
}
/// <summary>
/// Only real video titles are shareable. Anything else - a person, studio,
/// genre, library, collection, playlist, music track or book - would either
/// give the guest nothing to play or pull unrelated items into the guest's tag
/// policy, so the API refuses it even when a client asks for it.
/// Real video titles, home videos, photos and collections are shareable.
/// Anything else - a person, studio, genre, library, playlist, music track or
/// book - would either give the guest nothing to play or pull unrelated items
/// into the guest's tag policy, so the API refuses it even when a client asks
/// for it. A BoxSet shares every item beneath it in one link: ItemTagService
/// tags the whole tree, same as it does for a series' seasons and episodes.
/// </summary>
private static bool IsShareableItem(BaseItem item)
{
return item is Movie or Series or Season or Episode;
return item is Movie or Series or Season or Episode or Video or BoxSet or Photo;
}
private static bool IsExpired(ShareLinkRecord record)
{
return record.ExpiresAtUtc <= DateTimeOffset.UtcNow;
Fichier diff supprimé car celui-ci est trop grand Voir la Diff