diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1f2174ab3..bf7546c78 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,6 +40,13 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + with: + fetch-depth: 50 + - name: Extract Git Tag + shell: bash + run: | + tag=$(git describe --tags --abbrev=0) + echo "GIT_TAG=${tag:1}" >> $GITHUB_ENV - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 - name: Cache Docker layers @@ -54,11 +61,6 @@ jobs: with: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - - name: Extract Git Tag - shell: bash - run: | - tag=$(git describe --tags --abbrev=0) - echo "GIT_TAG=${tag:1}" >> $GITHUB_ENV - name: Build and push base uses: docker/build-push-action@v2 with: diff --git a/ErsatzTV.Application/Streaming/Queries/GetPlayoutItemProcessByChannelNumberHandler.cs b/ErsatzTV.Application/Streaming/Queries/GetPlayoutItemProcessByChannelNumberHandler.cs index 218fb4817..bf22032e7 100644 --- a/ErsatzTV.Application/Streaming/Queries/GetPlayoutItemProcessByChannelNumberHandler.cs +++ b/ErsatzTV.Application/Streaming/Queries/GetPlayoutItemProcessByChannelNumberHandler.cs @@ -10,6 +10,7 @@ using ErsatzTV.Core.FFmpeg; using ErsatzTV.Core.Interfaces.Repositories; using LanguageExt; using Microsoft.Extensions.Logging; +using static LanguageExt.Prelude; namespace ErsatzTV.Application.Streaming.Queries { @@ -68,15 +69,18 @@ namespace ErsatzTV.Application.Streaming.Queries playoutItem.StartOffset, now); }, - async () => + () => { if (channel.FFmpegProfile.Transcode) { - return _ffmpegProcessService.ForOfflineImage(ffmpegPath, channel); + return Right(_ffmpegProcessService.ForOfflineImage(ffmpegPath, channel)) + .AsTask(); } - return BaseError.New( - $"Unable to locate playout item for channel {channel.Number}; offline image is unavailable because transcoding is disabled in ffmpeg profile '{channel.FFmpegProfile.Name}'"); + var message = + $"Unable to locate playout item for channel {channel.Number}; offline image is unavailable because transcoding is disabled in ffmpeg profile '{channel.FFmpegProfile.Name}'"; + + return Left(BaseError.New(message)).AsTask(); }); }