Updated DB Schema and added new initial create

This commit is contained in:
2019-01-30 22:49:01 +01:00
parent 273b960979
commit 15e2a650b9
14 changed files with 188 additions and 84 deletions

View File

@@ -25,11 +25,30 @@ namespace Tv7Playlist.Controllers
_appConfig = appConfig ?? throw new ArgumentNullException(nameof(appConfig));
}
[HttpGet]
[Route("without-proxy")]
public async Task<IActionResult> GetPlaylistWithoutProxy()
{
return await GetPlaylistInternal(false);
}
[HttpGet]
[Route("")]
public async Task<IActionResult> GetPlaylist()
{
var playlistStream = await _playlistBuilder.GeneratePlaylistAsync();
return await GetPlaylistInternal(true);
}
[HttpGet]
[Route("with-proxy")]
public async Task<IActionResult> GetPlaylistWithProxy()
{
return await GetPlaylistInternal(true);
}
private async Task<IActionResult> GetPlaylistInternal(bool useProxy)
{
var playlistStream = await _playlistBuilder.GeneratePlaylistAsync(useProxy);
var downloadFileName = GetDownloadFileName();
_logger.LogInformation(LoggingEvents.Playlist, "Sending updated playlist {filename}",