fix artwork in kodi (#359)

This commit is contained in:
Jason Dove
2021-09-11 09:45:09 -05:00
committed by GitHub
parent c932577cb8
commit bb9127e546
5 changed files with 8 additions and 2 deletions
+3
View File
@@ -9,6 +9,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Syntax is a number and a unit (days, weeks, months, years) like `1 week` or `2 years`
- Allow adding smart collections to multi collections
### Fixed
- Use fake image extension (`.jpg`) for artwork in M3U and XMLTV to make Kodi happy since it detects MIME type from URL
## [0.0.56-alpha] - 2021-09-10
### Added
- Add Smart Collections
+1 -1
View File
@@ -276,7 +276,7 @@ namespace ErsatzTV.Core.Iptv
_ => "posters"
};
artworkPath = $"{_scheme}://{_host}/iptv/artwork/{artworkFolder}/{artwork.Path}";
artworkPath = $"{_scheme}://{_host}/iptv/artwork/{artworkFolder}/{artwork.Path}.jpg";
}
return artworkPath;
+1 -1
View File
@@ -32,7 +32,7 @@ namespace ErsatzTV.Core.Iptv
.Filter(a => a.ArtworkKind == ArtworkKind.Logo)
.HeadOrNone()
.Match(
artwork => $"{_scheme}://{_host}/iptv/logos/{artwork.Path}",
artwork => $"{_scheme}://{_host}/iptv/logos/{artwork.Path}.jpg",
() => $"{_scheme}://{_host}/iptv/images/ersatztv-500.png");
string shortUniqueId = Convert.ToBase64String(channel.UniqueId.ToByteArray())
@@ -36,6 +36,7 @@ namespace ErsatzTV.Controllers
}
[HttpGet("/iptv/artwork/posters/{fileName}")]
[HttpGet("/iptv/artwork/posters/{fileName}.jpg")]
[HttpGet("/artwork/posters/{fileName}")]
public async Task<IActionResult> GetPoster(string fileName)
{
@@ -117,6 +118,7 @@ namespace ErsatzTV.Controllers
$"photo/:/transcode?url=/{path}&height=220&width=392&minSize=1&upscale=0");
[HttpGet("/iptv/artwork/thumbnails/{fileName}")]
[HttpGet("/iptv/artwork/thumbnails/{fileName}.jpg")]
[HttpGet("/artwork/thumbnails/{fileName}")]
public async Task<IActionResult> GetThumbnail(string fileName)
{
+1
View File
@@ -71,6 +71,7 @@ namespace ErsatzTV.Controllers
error => BadRequest(error.Value)));
[HttpGet("iptv/logos/{fileName}")]
[HttpGet("iptv/logos/{fileName}.jpg")]
public async Task<IActionResult> GetImage(string fileName)
{
Either<BaseError, CachedImagePathViewModel> cachedImagePath =