Browse Source

add m3u codec hints for channels app (#48)

pull/49/head
Jason Dove 4 years ago committed by GitHub
parent
commit
9841640128
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      ErsatzTV.Core/Iptv/ChannelPlaylist.cs
  2. 1
      ErsatzTV.Infrastructure/Data/Repositories/ChannelRepository.cs

5
ErsatzTV.Core/Iptv/ChannelPlaylist.cs

@ -45,8 +45,11 @@ namespace ErsatzTV.Core.Iptv @@ -45,8 +45,11 @@ namespace ErsatzTV.Core.Iptv
_ => "ts"
};
string vcodec = channel.FFmpegProfile.VideoCodec.Split("_").Head();
string acodec = channel.FFmpegProfile.AudioCodec;
sb.AppendLine(
$"#EXTINF:0 tvg-id=\"{channel.Number}\" channel-id=\"{shortUniqueId}\" channel-number=\"{channel.Number}\" CUID=\"{shortUniqueId}\" tvg-chno=\"{channel.Number}\" tvg-name=\"{channel.Name}\" tvg-logo=\"{logo}\" group-title=\"ErsatzTV\", {channel.Name}");
$"#EXTINF:0 tvg-id=\"{channel.Number}\" channel-id=\"{shortUniqueId}\" channel-number=\"{channel.Number}\" CUID=\"{shortUniqueId}\" tvg-chno=\"{channel.Number}\" tvg-name=\"{channel.Name}\" tvg-logo=\"{logo}\" group-title=\"ErsatzTV\" tvc-stream-vcodec=\"{vcodec}\" tvc-stream-acodec=\"{acodec}\", {channel.Name}");
sb.AppendLine($"{_scheme}://{_host}/iptv/channel/{channel.Number}.{format}");
}

1
ErsatzTV.Infrastructure/Data/Repositories/ChannelRepository.cs

@ -39,6 +39,7 @@ namespace ErsatzTV.Infrastructure.Data.Repositories @@ -39,6 +39,7 @@ namespace ErsatzTV.Infrastructure.Data.Repositories
public Task<List<Channel>> GetAll() =>
_dbContext.Channels
.Include(c => c.FFmpegProfile)
.Include(c => c.Artwork)
.ToListAsync();

Loading…
Cancel
Save