mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-16 05:43:54 +03:00
[PR #13441] [CLOSED] Fallback to URL extension for image type when content header is invalid #13578
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/jellyfin/jellyfin/pull/13441
Author: @theguymadmax
Created: 1/26/2025
Status: ❌ Closed
Base:
master← Head:bin-image-fix📝 Commits (1)
5915fd7Fallback to URL extension for image type when content header is invalid📊 Changes
1 file changed (+14 additions, -1 deletions)
View changed files
📝
MediaBrowser.Providers/Manager/ItemImageProvider.cs(+14 -1)📄 Description
Changes
This PR modifies the
DownloadImagemethod inItemImageProviderto handle cases where the image's content header does not indicate a valid image type. In these cases, the extension of the image URL is used to infer the content type. If the content type still cannot be determined by either the content header or the URL extension, it defaults toimage/jpeg. This ensures that images are correctly downloaded with the appropriate extension and prevents them from being mistakenly downloaded as binary files.Issues
#12593🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.