diff --git a/.github/workflows/artifacts.yml b/.github/workflows/artifacts.yml index 6a77c821c..5dcb8be1c 100644 --- a/.github/workflows/artifacts.yml +++ b/.github/workflows/artifacts.yml @@ -47,9 +47,9 @@ jobs: submodules: true - name: Setup .NET Core - uses: actions/setup-dotnet@v2 + uses: actions/setup-dotnet@v3 with: - dotnet-version: 6.0.x + dotnet-version: 7.0.x - name: Setup Node.js uses: actions/setup-node@v3 @@ -81,7 +81,7 @@ jobs: - name: Build shell: bash - run: dotnet publish ErsatzTV/ErsatzTV.csproj --framework net6.0 --runtime "${{ matrix.target }}" -c Release -o publish -p:InformationalVersion="${{ inputs.release_version }}-${{ matrix.target }}" -p:EnableCompressionInSingleFile=true -p:DebugType=Embedded -p:PublishSingleFile=true --self-contained true + run: dotnet publish ErsatzTV/ErsatzTV.csproj --framework net7.0 --runtime "${{ matrix.target }}" -c Release -o publish -p:InformationalVersion="${{ inputs.release_version }}-${{ matrix.target }}" -p:EnableCompressionInSingleFile=true -p:DebugType=Embedded -p:PublishSingleFile=true --self-contained true - name: Bundle shell: bash @@ -174,9 +174,9 @@ jobs: fetch-depth: 0 - name: Setup .NET Core - uses: actions/setup-dotnet@v2 + uses: actions/setup-dotnet@v3 with: - dotnet-version: 6.0.x + dotnet-version: 7.0.x - name: Setup Node.js uses: actions/setup-node@v3 @@ -210,11 +210,11 @@ jobs: echo "RELEASE_NAME=${release_name}" >> $GITHUB_ENV # Build everything - dotnet publish ErsatzTV/ErsatzTV.csproj --framework net6.0 --runtime "${{ matrix.target }}" -c Release -o "$release_name" -p:InformationalVersion="${{ inputs.release_version }}-${{ matrix.target }}" -p:EnableCompressionInSingleFile=true -p:DebugType=Embedded -p:PublishSingleFile=true --self-contained true + dotnet publish ErsatzTV/ErsatzTV.csproj --framework net7.0 --runtime "${{ matrix.target }}" -c Release -o "$release_name" -p:InformationalVersion="${{ inputs.release_version }}-${{ matrix.target }}" -p:EnableCompressionInSingleFile=true -p:DebugType=Embedded -p:PublishSingleFile=true --self-contained true # Build Windows launcher if [ "${{ matrix.kind }}" == "windows" ]; then - dotnet publish ErsatzTV-Windows/ErsatzTV-Windows.csproj --framework net6.0-windows --runtime "${{ matrix.target }}" -c Release -o "$release_name" -p:InformationalVersion="${{ inputs.release_version }}-${{ matrix.target }}" -p:EnableCompressionInSingleFile=true -p:DebugType=Embedded -p:PublishSingleFile=true --self-contained true + dotnet publish ErsatzTV-Windows/ErsatzTV-Windows.csproj --framework net7.0-windows --runtime "${{ matrix.target }}" -c Release -o "$release_name" -p:InformationalVersion="${{ inputs.release_version }}-${{ matrix.target }}" -p:EnableCompressionInSingleFile=true -p:DebugType=Embedded -p:PublishSingleFile=true --self-contained true fi # Download ffmpeg diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index b4b1616d1..461115b9e 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -13,9 +13,9 @@ jobs: uses: actions/checkout@v3 - name: Setup .NET Core - uses: actions/setup-dotnet@v2 + uses: actions/setup-dotnet@v3 with: - dotnet-version: 6.0.x + dotnet-version: 7.0.x - name: Clean run: dotnet clean --configuration Release && dotnet nuget locals all --clear diff --git a/ErsatzTV-Windows/ErsatzTV-Windows.csproj b/ErsatzTV-Windows/ErsatzTV-Windows.csproj index 9e28884ae..809e330ea 100644 --- a/ErsatzTV-Windows/ErsatzTV-Windows.csproj +++ b/ErsatzTV-Windows/ErsatzTV-Windows.csproj @@ -2,7 +2,7 @@ WinExe - net6.0-windows + net7.0-windows ErsatzTV_Windows enable true diff --git a/ErsatzTV.Application/ErsatzTV.Application.csproj b/ErsatzTV.Application/ErsatzTV.Application.csproj index 2a23f4b26..0418936eb 100644 --- a/ErsatzTV.Application/ErsatzTV.Application.csproj +++ b/ErsatzTV.Application/ErsatzTV.Application.csproj @@ -1,7 +1,7 @@ - net6.0 + net7.0 VSTHRD200 enable @@ -11,7 +11,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/ErsatzTV.Core.Tests/ErsatzTV.Core.Tests.csproj b/ErsatzTV.Core.Tests/ErsatzTV.Core.Tests.csproj index fe7537e0e..430312c3b 100644 --- a/ErsatzTV.Core.Tests/ErsatzTV.Core.Tests.csproj +++ b/ErsatzTV.Core.Tests/ErsatzTV.Core.Tests.csproj @@ -1,7 +1,7 @@ - net6.0 + net7.0 VSTHRD200 enable @@ -11,11 +11,11 @@ - - - - - + + + + + all diff --git a/ErsatzTV.Core/ErsatzTV.Core.csproj b/ErsatzTV.Core/ErsatzTV.Core.csproj index 97e722264..0f7a6ce1b 100644 --- a/ErsatzTV.Core/ErsatzTV.Core.csproj +++ b/ErsatzTV.Core/ErsatzTV.Core.csproj @@ -1,7 +1,7 @@ - net6.0 + net7.0 VSTHRD200 enable @@ -13,10 +13,10 @@ - - - - + + + + all diff --git a/ErsatzTV.FFmpeg.Tests/ErsatzTV.FFmpeg.Tests.csproj b/ErsatzTV.FFmpeg.Tests/ErsatzTV.FFmpeg.Tests.csproj index ee5108ed9..e83c35dd6 100644 --- a/ErsatzTV.FFmpeg.Tests/ErsatzTV.FFmpeg.Tests.csproj +++ b/ErsatzTV.FFmpeg.Tests/ErsatzTV.FFmpeg.Tests.csproj @@ -1,7 +1,7 @@  - net6.0 + net7.0 enable false diff --git a/ErsatzTV.FFmpeg/Capabilities/HardwareCapabilitiesFactory.cs b/ErsatzTV.FFmpeg/Capabilities/HardwareCapabilitiesFactory.cs index ff6251683..c3749455b 100644 --- a/ErsatzTV.FFmpeg/Capabilities/HardwareCapabilitiesFactory.cs +++ b/ErsatzTV.FFmpeg/Capabilities/HardwareCapabilitiesFactory.cs @@ -125,7 +125,8 @@ public class HardwareCapabilitiesFactory : IHardwareCapabilitiesFactory private async Task GetNvidiaCapabilities(string ffmpegPath) { if (_memoryCache.TryGetValue(ArchitectureCacheKey, out int cachedArchitecture) - && _memoryCache.TryGetValue(ModelCacheKey, out string cachedModel)) + && _memoryCache.TryGetValue(ModelCacheKey, out string? cachedModel) + && cachedModel is not null) { return new NvidiaHardwareCapabilities(cachedArchitecture, cachedModel); } diff --git a/ErsatzTV.FFmpeg/ErsatzTV.FFmpeg.csproj b/ErsatzTV.FFmpeg/ErsatzTV.FFmpeg.csproj index d30ac040c..400931af6 100644 --- a/ErsatzTV.FFmpeg/ErsatzTV.FFmpeg.csproj +++ b/ErsatzTV.FFmpeg/ErsatzTV.FFmpeg.csproj @@ -1,7 +1,7 @@ - net6.0 + net7.0 enable enable @@ -9,8 +9,8 @@ - - + + diff --git a/ErsatzTV.Infrastructure.Tests/ErsatzTV.Infrastructure.Tests.csproj b/ErsatzTV.Infrastructure.Tests/ErsatzTV.Infrastructure.Tests.csproj index 00c22b5b1..b6bac8ad8 100644 --- a/ErsatzTV.Infrastructure.Tests/ErsatzTV.Infrastructure.Tests.csproj +++ b/ErsatzTV.Infrastructure.Tests/ErsatzTV.Infrastructure.Tests.csproj @@ -1,7 +1,7 @@ - net6.0 + net7.0 enable enable diff --git a/ErsatzTV.Infrastructure/ErsatzTV.Infrastructure.csproj b/ErsatzTV.Infrastructure/ErsatzTV.Infrastructure.csproj index 9bcec5196..4efb8e614 100644 --- a/ErsatzTV.Infrastructure/ErsatzTV.Infrastructure.csproj +++ b/ErsatzTV.Infrastructure/ErsatzTV.Infrastructure.csproj @@ -1,7 +1,7 @@ - net6.0 + net7.0 true VSTHRD200 enable @@ -15,12 +15,12 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/ErsatzTV/ErsatzTV.csproj b/ErsatzTV/ErsatzTV.csproj index 6f8fdcbde..3ed5475b1 100644 --- a/ErsatzTV/ErsatzTV.csproj +++ b/ErsatzTV/ErsatzTV.csproj @@ -1,7 +1,7 @@ - net6.0 + net7.0 client-app\ $(DefaultItemExcludes);$(SpaRoot)node_modules\** true @@ -60,9 +60,9 @@ - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -70,7 +70,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/ErsatzTV/Shared/MarkdownView.razor.cs b/ErsatzTV/Shared/MarkdownView.razor.cs index a5558f649..ace4627c9 100644 --- a/ErsatzTV/Shared/MarkdownView.razor.cs +++ b/ErsatzTV/Shared/MarkdownView.razor.cs @@ -7,7 +7,7 @@ namespace ErsatzTV.Shared; public partial class MarkdownView { - private string _content; + private MarkupString? _markupContent; [Inject] public IHtmlSanitizer HtmlSanitizer { get; set; } @@ -16,21 +16,13 @@ public partial class MarkdownView public IJSRuntime JsRuntime { get; set; } [Parameter] - public string Content - { - get => _content; - set - { - _content = value; - HtmlContent = ConvertStringToMarkupString(_content); - } - } + public string Content { get; set; } - public MarkupString HtmlContent { get; private set; } + public MarkupString HtmlContent => _markupContent ?? (_markupContent = ConvertStringToMarkupString(Content)).Value; private MarkupString ConvertStringToMarkupString(string value) { - if (!string.IsNullOrWhiteSpace(_content)) + if (!string.IsNullOrWhiteSpace(value)) { // Convert markdown string to HTML string html = Markdown.ToHtml(value, new MarkdownPipelineBuilder().UseAdvancedExtensions().Build()); diff --git a/docker/Dockerfile b/docker/Dockerfile index 67407fcc0..25f8e70ef 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,11 +1,11 @@ -FROM mcr.microsoft.com/dotnet/aspnet:6.0-focal-amd64 AS dotnet-runtime +FROM mcr.microsoft.com/dotnet/aspnet:7.0-focal-amd64 AS dotnet-runtime FROM jasongdove/ffmpeg:5.1-ubuntu2004 AS runtime-base COPY --from=dotnet-runtime /usr/share/dotnet /usr/share/dotnet RUN apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y libicu-dev tzdata fontconfig fonts-dejavu libgdiplus # https://hub.docker.com/_/microsoft-dotnet -FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build RUN apt-get update && apt-get install -y ca-certificates RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash - RUN apt-get install -y nodejs diff --git a/docker/arm32v7/Dockerfile b/docker/arm32v7/Dockerfile index ce6e802bf..5ccd2038d 100644 --- a/docker/arm32v7/Dockerfile +++ b/docker/arm32v7/Dockerfile @@ -1,6 +1,6 @@ -FROM mcr.microsoft.com/dotnet/aspnet:6.0-focal-arm32v7 AS dotnet-runtime +FROM mcr.microsoft.com/dotnet/aspnet:7.0-focal-arm32v7 AS dotnet-runtime -FROM linuxserver/ffmpeg:arm32v7-latest AS runtime-base +FROM jasongdove/ersatztv-ffmpeg:5.1.2-arm AS runtime-base COPY --from=dotnet-runtime /usr/share/dotnet /usr/share/dotnet RUN apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y libicu-dev \ tzdata \ @@ -9,7 +9,7 @@ RUN apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y libicu libgdiplus # https://hub.docker.com/_/microsoft-dotnet -FROM mcr.microsoft.com/dotnet/sdk:6.0-focal-amd64 AS build +FROM mcr.microsoft.com/dotnet/sdk:7.0-focal-arm32v7 AS build RUN apt-get update && apt-get install -y ca-certificates RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash - RUN apt-get install -y nodejs @@ -36,7 +36,7 @@ COPY ErsatzTV.FFmpeg/. ./ErsatzTV.FFmpeg/ COPY ErsatzTV.Infrastructure/. ./ErsatzTV.Infrastructure/ WORKDIR /source/ErsatzTV ARG INFO_VERSION="unknown" -RUN dotnet publish ErsatzTV.csproj --framework net6.0 -c release -o /app --runtime linux-arm --no-self-contained --no-restore -p:DebugType=Embedded -p:PublishSingleFile=false -p:PublishTrimmed=false -p:InformationalVersion=${INFO_VERSION} +RUN dotnet publish ErsatzTV.csproj --framework net7.0 -c release -o /app --runtime linux-arm --no-self-contained --no-restore -p:DebugType=Embedded -p:PublishSingleFile=false -p:PublishTrimmed=false -p:InformationalVersion=${INFO_VERSION} # final stage/image FROM runtime-base diff --git a/docker/arm64/Dockerfile b/docker/arm64/Dockerfile index f7664f80b..2cb0a338f 100644 --- a/docker/arm64/Dockerfile +++ b/docker/arm64/Dockerfile @@ -1,6 +1,6 @@ -FROM mcr.microsoft.com/dotnet/aspnet:6.0-focal-arm64v8 AS dotnet-runtime +FROM mcr.microsoft.com/dotnet/aspnet:7.0-focal-arm64v8 AS dotnet-runtime -FROM linuxserver/ffmpeg:arm64v8-latest AS runtime-base +FROM jasongdove/ersatztv-ffmpeg:5.1.2-arm64 AS runtime-base COPY --from=dotnet-runtime /usr/share/dotnet /usr/share/dotnet RUN apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y libicu-dev \ tzdata \ @@ -9,7 +9,7 @@ RUN apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y libicu libgdiplus # https://hub.docker.com/_/microsoft-dotnet -FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:7.0-focal-arm64v8 AS build RUN apt-get update && apt-get install -y ca-certificates RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash - RUN apt-get install -y nodejs @@ -36,7 +36,7 @@ COPY ErsatzTV.FFmpeg/. ./ErsatzTV.FFmpeg/ COPY ErsatzTV.Infrastructure/. ./ErsatzTV.Infrastructure/ WORKDIR /source/ErsatzTV ARG INFO_VERSION="unknown" -RUN dotnet publish ErsatzTV.csproj --framework net6.0 -c release -o /app --runtime linux-arm64 --no-self-contained --no-restore -p:DebugType=Embedded -p:PublishSingleFile=false -p:PublishTrimmed=false -p:InformationalVersion=${INFO_VERSION} +RUN dotnet publish ErsatzTV.csproj --framework net7.0 -c release -o /app --runtime linux-arm64 --no-self-contained --no-restore -p:DebugType=Embedded -p:PublishSingleFile=false -p:PublishTrimmed=false -p:InformationalVersion=${INFO_VERSION} # final stage/image FROM runtime-base diff --git a/docker/nvidia/Dockerfile b/docker/nvidia/Dockerfile index b385bbb2b..689dd1af0 100644 --- a/docker/nvidia/Dockerfile +++ b/docker/nvidia/Dockerfile @@ -1,5 +1,5 @@ # https://hub.docker.com/_/microsoft-dotnet -FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build RUN apt-get update && apt-get install -y ca-certificates RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash - RUN apt-get install -y nodejs @@ -29,7 +29,7 @@ ARG INFO_VERSION="unknown" RUN dotnet publish ErsatzTV.csproj -c release -o /app -r linux-x64 --self-contained false --no-restore /p:DebugType=Embedded /p:InformationalVersion=${INFO_VERSION} # final stage/image -FROM jasongdove/ffmpeg:5.1-nvidia2004 AS runtime-base +FROM jasongdove/ersatztv-ffmpeg:5.1.2-nvidia AS runtime-base ENV FONTCONFIG_PATH=/etc/fonts RUN fc-cache update WORKDIR /app diff --git a/docker/nvidia/ffmpeg.Dockerfile b/docker/nvidia/ffmpeg.Dockerfile deleted file mode 100644 index 67f8325ba..000000000 --- a/docker/nvidia/ffmpeg.Dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -FROM mcr.microsoft.com/dotnet/aspnet:6.0-focal-amd64 AS dotnet-runtime - -FROM jasongdove/ffmpeg-base:5.1-nvidia2004 AS runtime-base -COPY --from=dotnet-runtime /usr/share/dotnet /usr/share/dotnet -RUN apt-get update \ - && DEBIAN_FRONTEND="noninteractive" apt-get install -y libicu-dev tzdata fontconfig fonts-dejavu libgdiplus \ - && rm -rf /var/lib/apt/lists/* diff --git a/docker/vaapi/Dockerfile b/docker/vaapi/Dockerfile index 7b9fb5c88..63dc3ac74 100644 --- a/docker/vaapi/Dockerfile +++ b/docker/vaapi/Dockerfile @@ -1,5 +1,5 @@ # https://hub.docker.com/_/microsoft-dotnet -FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build RUN apt-get update && apt-get install -y ca-certificates RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash - RUN apt-get install -y nodejs @@ -29,7 +29,7 @@ ARG INFO_VERSION="unknown" RUN dotnet publish ErsatzTV.csproj -c release -o /app -r linux-x64 --self-contained false --no-restore /p:DebugType=Embedded /p:InformationalVersion=${INFO_VERSION} # final stage/image -FROM jasongdove/ffmpeg:5.1-vaapi2004 AS runtime-base +FROM jasongdove/ersatztv-ffmpeg:5.1.2-vaapi AS runtime-base ENV FONTCONFIG_PATH=/etc/fonts RUN fc-cache update WORKDIR /app diff --git a/docker/vaapi/ffmpeg.Dockerfile b/docker/vaapi/ffmpeg.Dockerfile deleted file mode 100644 index 20c534f04..000000000 --- a/docker/vaapi/ffmpeg.Dockerfile +++ /dev/null @@ -1,46 +0,0 @@ -FROM mcr.microsoft.com/dotnet/aspnet:6.0-focal-amd64 AS dotnet-runtime - -FROM jasongdove/ffmpeg-base:5.1-vaapi2004 AS runtime-base -COPY --from=dotnet-runtime /usr/share/dotnet /usr/share/dotnet -RUN apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y libicu-dev \ - tzdata \ - fontconfig \ - fonts-dejavu \ - libgdiplus \ - autoconf \ - libtool \ - libdrm-dev \ - libmfx-dev \ - git \ - pkg-config \ - build-essential \ - cmake \ - wget \ - mesa-va-drivers \ - vainfo \ - && mkdir /tmp/intel && cd /tmp/intel \ - && wget -O - https://github.com/intel/libva/archive/refs/tags/2.14.0.tar.gz | tar zxf - \ - && cd libva-2.14.0 \ - && ./autogen.sh \ - && ./configure \ - && make -j$(nproc) \ - && make -j$(nproc) install \ - && cd /tmp/intel \ - && wget -O - https://github.com/intel/gmmlib/archive/refs/tags/intel-gmmlib-22.1.7.tar.gz | tar zxf - \ - && mv gmmlib-intel-gmmlib-22.1.7 gmmlib \ - && cd gmmlib \ - && mkdir build && cd build \ - && cmake .. \ - && make -j$(nproc) \ - && make install \ - && cd /tmp/intel \ - && git clone --depth 1 --branch intel-media-22.4 https://github.com/intel/media-driver \ - && mkdir build_media && cd build_media \ - && cmake ../media-driver \ - && make -j$(nproc) \ - && make install \ - && DEBIAN_FRONTEND="noninteractive" apt-get purge -y autoconf libtool git build-essential cmake wget \ - && apt autoremove -y \ - && rm -rf /tmp/intel \ - && rm -rf /var/lib/apt/lists/* \ - && mv /usr/lib/x86_64-linux-gnu/dri/* /usr/local/lib/dri/ diff --git a/global.json b/global.json index f443bd421..7cd6a1f4f 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "6.0", + "version": "7.0.0", "rollForward": "latestMajor", "allowPrerelease": true }