Browse Source

add m3u codec hints for channels app

pull/48/head
Jason Dove 5 years ago
parent
commit
49d56c653a
  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
_ => "ts" _ => "ts"
}; };
string vcodec = channel.FFmpegProfile.VideoCodec.Split("_").Head();
string acodec = channel.FFmpegProfile.AudioCodec;
sb.AppendLine( 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}"); 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
public Task<List<Channel>> GetAll() => public Task<List<Channel>> GetAll() =>
_dbContext.Channels _dbContext.Channels
.Include(c => c.FFmpegProfile)
.Include(c => c.Artwork) .Include(c => c.Artwork)
.ToListAsync(); .ToListAsync();

Loading…
Cancel
Save