aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations
diff options
context:
space:
mode:
authorShadowghost <Shadowghost@users.noreply.github.com>2026-11-20 07:23:42 -0500
committerCody Robibero <cody@robibe.ro>2026-11-20 07:23:42 -0500
commit511f1ef882d594df64810d2c36b59ad381fd6e17 (patch)
tree2a4dfabd381bbd23a1e1d65f9f9317c7deb659fb /Emby.Server.Implementations
parent00d8050bf661f6f9050a8de6e55585a8fe6d8beb (diff)
Backport pull request #18048 from jellyfin/release-12.z
Follow the Schedules Direct API contract when refreshing the guide Original-merge: 85fa90cb758dabfb434fbd00c1128091007cf6a4 Merged-by: Bond-009 <bond.009@outlook.com> Backported-by: Cody Robibero <cody@robibe.ro>
Diffstat (limited to 'Emby.Server.Implementations')
-rw-r--r--Emby.Server.Implementations/Library/LibraryManager.cs20
1 files changed, 13 insertions, 7 deletions
diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs
index 2aa41f020d..359b0f1d0c 100644
--- a/Emby.Server.Implementations/Library/LibraryManager.cs
+++ b/Emby.Server.Implementations/Library/LibraryManager.cs
@@ -3769,6 +3769,7 @@ namespace Emby.Server.Implementations.Library
public async Task<ItemImageInfo> ConvertImageToLocal(BaseItem item, ItemImageInfo image, int imageIndex, bool removeOnFailure)
{
+ HttpRequestException? lastHttpException = null;
foreach (var url in image.Path.Split('|'))
{
try
@@ -3800,6 +3801,7 @@ namespace Emby.Server.Implementations.Library
&& (ex.StatusCode.Value == HttpStatusCode.NotFound || ex.StatusCode.Value == HttpStatusCode.Forbidden))
{
_logger.LogDebug(ex, "Error downloading image {Url}", url);
+ lastHttpException = ex;
continue;
}
@@ -3814,13 +3816,17 @@ namespace Emby.Server.Implementations.Library
await item.UpdateToRepositoryAsync(ItemUpdateType.ImageUpdate, CancellationToken.None).ConfigureAwait(false);
}
- throw new InvalidOperationException(string.Format(
- CultureInfo.InvariantCulture,
- "Unable to convert any {0} image url in \"{1}\" to a local file for {2} ({3})",
- image.Type,
- image.Path,
- item.Name,
- item.Id));
+ // Keep the rejection as the inner exception: callers such as the Live TV guide need the
+ // status code to tell a missing image from a provider that is refusing us.
+ throw new InvalidOperationException(
+ string.Format(
+ CultureInfo.InvariantCulture,
+ "Unable to convert any {0} image url in \"{1}\" to a local file for {2} ({3})",
+ image.Type,
+ image.Path,
+ item.Name,
+ item.Id),
+ lastHttpException);
}
public async Task AddVirtualFolder(string name, CollectionTypeOptions? collectionType, LibraryOptions options, bool refreshLibrary)