Browse Source

iptv route consistency [no ci] (#107)

* use localhost in concat playlist

* expose all playlist artwork under /iptv
pull/110/head
Jason Dove 5 years ago committed by GitHub
parent
commit
9ba6686c44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      ErsatzTV.Core/FFmpeg/ConcatPlaylist.cs
  2. 6
      ErsatzTV.Core/Iptv/ChannelGuide.cs
  3. 2
      ErsatzTV.Core/Iptv/ChannelPlaylist.cs
  4. 2
      ErsatzTV/Controllers/ArtworkController.cs
  5. BIN
      ErsatzTV/wwwroot/iptv/images/ersatztv-500.png

4
ErsatzTV.Core/FFmpeg/ConcatPlaylist.cs

@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
{
public override string ToString() =>
$@"ffconcat version 1.0
file {Scheme}://{Host}/ffmpeg/stream/{ChannelNumber}
file {Scheme}://{Host}/ffmpeg/stream/{ChannelNumber}";
file http://localhost:8409/ffmpeg/stream/{ChannelNumber}
file http://localhost:8409/ffmpeg/stream/{ChannelNumber}";
}
}

6
ErsatzTV.Core/Iptv/ChannelGuide.cs

@ -48,7 +48,7 @@ namespace ErsatzTV.Core.Iptv @@ -48,7 +48,7 @@ namespace ErsatzTV.Core.Iptv
.HeadOrNone()
.Match(
artwork => $"{_scheme}://{_host}/iptv/logos/{artwork.Path}",
() => $"{_scheme}://{_host}/images/ersatztv-500.png");
() => $"{_scheme}://{_host}/iptv/images/ersatztv-500.png");
xml.WriteAttributeString("src", logo);
xml.WriteEndElement(); // icon
@ -122,7 +122,7 @@ namespace ErsatzTV.Core.Iptv @@ -122,7 +122,7 @@ namespace ErsatzTV.Core.Iptv
.Filter(a => a.ArtworkKind == ArtworkKind.Poster)
.HeadOrNone()
.Match(
artwork => $"{_scheme}://{_host}/artwork/posters/{artwork.Path}",
artwork => $"{_scheme}://{_host}/iptv/artwork/posters/{artwork.Path}",
() => string.Empty);
if (!string.IsNullOrWhiteSpace(poster))
@ -161,7 +161,7 @@ namespace ErsatzTV.Core.Iptv @@ -161,7 +161,7 @@ namespace ErsatzTV.Core.Iptv
.Filter(a => a.ArtworkKind == ArtworkKind.Poster)
.HeadOrNone()
.Match(
artwork => $"{_scheme}://{_host}/artwork/posters/{artwork.Path}",
artwork => $"{_scheme}://{_host}/iptv/artwork/posters/{artwork.Path}",
() => string.Empty);
if (!string.IsNullOrWhiteSpace(poster))

2
ErsatzTV.Core/Iptv/ChannelPlaylist.cs

@ -33,7 +33,7 @@ namespace ErsatzTV.Core.Iptv @@ -33,7 +33,7 @@ namespace ErsatzTV.Core.Iptv
.HeadOrNone()
.Match(
artwork => $"{_scheme}://{_host}/iptv/logos/{artwork.Path}",
() => $"{_scheme}://{_host}/images/ersatztv-500.png");
() => $"{_scheme}://{_host}/iptv/images/ersatztv-500.png");
string shortUniqueId = Convert.ToBase64String(channel.UniqueId.ToByteArray())
.TrimEnd('=')

2
ErsatzTV/Controllers/ArtworkController.cs

@ -28,6 +28,7 @@ namespace ErsatzTV.Controllers @@ -28,6 +28,7 @@ namespace ErsatzTV.Controllers
_httpClientFactory = httpClientFactory;
}
[HttpGet("/iptv/artwork/posters/{fileName}")]
[HttpGet("/artwork/posters/{fileName}")]
public async Task<IActionResult> GetPoster(string fileName)
{
@ -48,6 +49,7 @@ namespace ErsatzTV.Controllers @@ -48,6 +49,7 @@ namespace ErsatzTV.Controllers
Right: r => new FileContentResult(r.Contents, r.MimeType));
}
[HttpGet("/iptv/artwork/posters/plex/{plexMediaSourceId}/{*path}")]
[HttpGet("/artwork/posters/plex/{plexMediaSourceId}/{*path}")]
public Task<IActionResult> GetPlexPoster(int plexMediaSourceId, string path) =>
GetPlexArtwork(

BIN
ErsatzTV/wwwroot/iptv/images/ersatztv-500.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Loading…
Cancel
Save