Add collections, videos, images to shareable items
Cette révision appartient à :
@@ -0,0 +1,66 @@
|
|||||||
|
## .NET / C# / Visual Studio / Rider
|
||||||
|
|
||||||
|
# Build results
|
||||||
|
[Bb]in/
|
||||||
|
[Oo]bj/
|
||||||
|
[Oo]ut/
|
||||||
|
[Rr]elease/
|
||||||
|
[Dd]ebug/
|
||||||
|
x64/
|
||||||
|
x86/
|
||||||
|
build/
|
||||||
|
bld/
|
||||||
|
|
||||||
|
# Visual Studio
|
||||||
|
.vs/
|
||||||
|
*.user
|
||||||
|
*.suo
|
||||||
|
*.userosscache
|
||||||
|
*.sln.docstates
|
||||||
|
|
||||||
|
# Rider / JetBrains
|
||||||
|
.idea/
|
||||||
|
*.sln.iml
|
||||||
|
|
||||||
|
# VS Code
|
||||||
|
.vscode/
|
||||||
|
!.vscode/settings.json
|
||||||
|
!.vscode/tasks.json
|
||||||
|
!.vscode/launch.json
|
||||||
|
!.vscode/extensions.json
|
||||||
|
|
||||||
|
# NuGet
|
||||||
|
*.nupkg
|
||||||
|
*.snupkg
|
||||||
|
**/[Pp]ackages/*
|
||||||
|
!**/[Pp]ackages/build/
|
||||||
|
*.nuget.props
|
||||||
|
*.nuget.targets
|
||||||
|
project.lock.json
|
||||||
|
project.fragment.lock.json
|
||||||
|
artifacts/
|
||||||
|
|
||||||
|
# Test results
|
||||||
|
[Tt]est[Rr]esult*/
|
||||||
|
*.trx
|
||||||
|
*.coverage
|
||||||
|
*.coveragexml
|
||||||
|
|
||||||
|
# Rider/VS temp files
|
||||||
|
*.tmp
|
||||||
|
*.log
|
||||||
|
*.cache
|
||||||
|
|
||||||
|
# OS files
|
||||||
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
|
|
||||||
|
# Publish output
|
||||||
|
publish/
|
||||||
|
PublishProfiles/
|
||||||
|
|
||||||
|
# Jellyfin plugin packaging (dossiers de sortie générés lors du zip/publish)
|
||||||
|
*.zip
|
||||||
|
|
||||||
|
# Docker (si vous ajoutez des overrides locaux)
|
||||||
|
docker-compose.override.yml
|
||||||
@@ -227,7 +227,7 @@ public sealed class ShareLinksController : ControllerBase
|
|||||||
itemId,
|
itemId,
|
||||||
item.Name,
|
item.Name,
|
||||||
item.GetType().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
|
try
|
||||||
@@ -526,16 +526,18 @@ setTimeout(function () { window.location.replace({{redirectUrlJson}}); }, 4000);
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Only real video titles are shareable. Anything else - a person, studio,
|
/// Real video titles, home videos, photos and collections are shareable.
|
||||||
/// genre, library, collection, playlist, music track or book - would either
|
/// Anything else - a person, studio, genre, library, playlist, music track or
|
||||||
/// give the guest nothing to play or pull unrelated items into the guest's tag
|
/// book - would either give the guest nothing to play or pull unrelated items
|
||||||
/// policy, so the API refuses it even when a client asks for it.
|
/// 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>
|
/// </summary>
|
||||||
private static bool IsShareableItem(BaseItem item)
|
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)
|
private static bool IsExpired(ShareLinkRecord record)
|
||||||
{
|
{
|
||||||
return record.ExpiresAtUtc <= DateTimeOffset.UtcNow;
|
return record.ExpiresAtUtc <= DateTimeOffset.UtcNow;
|
||||||
|
|||||||
Fichier diff supprimé car celui-ci est trop grand
Voir la Diff
@@ -0,0 +1,7 @@
|
|||||||
|
FROM mcr.microsoft.com/dotnet/sdk:10.0
|
||||||
|
|
||||||
|
WORKDIR /src
|
||||||
|
|
||||||
|
# Le code sera monté en volume, pas copié, pour que les modifs
|
||||||
|
# faites en local (et les sorties de build) restent synchronisées
|
||||||
|
ENTRYPOINT ["bash"]
|
||||||
Référencer dans un nouveau ticket
Bloquer un utilisateur