diff --git a/.github/workflows/artifacts.yml b/.github/workflows/artifacts.yml index 177d62ea5..6f440ea21 100644 --- a/.github/workflows/artifacts.yml +++ b/.github/workflows/artifacts.yml @@ -74,7 +74,7 @@ jobs: - name: Calculate Release Name shell: bash run: | - release_name="ErsatzTV-${{ inputs.release_version }}-${{ matrix.target }}" + release_name="ErsatzTV-Legacy-${{ inputs.release_version }}-${{ matrix.target }}" echo "RELEASE_NAME=${release_name}" >> $GITHUB_ENV - name: Build @@ -101,7 +101,7 @@ jobs: run: | brew install create-dmg create-dmg \ - --volname "ErsatzTV" \ + --volname "ErsatzTV-Legacy" \ --volicon "artwork/ErsatzTV.icns" \ --window-pos 200 120 \ --window-size 800 400 \ @@ -111,21 +111,21 @@ jobs: --app-drop-link 600 185 \ --skip-jenkins \ --no-internet-enable \ - "ErsatzTV.dmg" \ - "ErsatzTV.app/" + "ErsatzTV-Legacy.dmg" \ + "ErsatzTV-Legacy.app/" - name: Notarize shell: bash run: | - xcrun notarytool submit ErsatzTV.dmg --apple-id "${{ secrets.ac_username }}" --password "${{ secrets.ac_password }}" --team-id 32MB98Q32R --wait - xcrun stapler staple ErsatzTV.dmg + xcrun notarytool submit ErsatzTV-Legacy.dmg --apple-id "${{ secrets.ac_username }}" --password "${{ secrets.ac_password }}" --team-id 32MB98Q32R --wait + xcrun stapler staple ErsatzTV-Legacy.dmg - name: Cleanup shell: bash run: | - mv ErsatzTV.dmg "${{ env.RELEASE_NAME }}.dmg" + mv ErsatzTV-Legacy.dmg "${{ env.RELEASE_NAME }}.dmg" rm -r publish - rm -r ErsatzTV.app + rm -r ErsatzTV-Legacy.app - name: Delete old release assets uses: mknejp/delete-release-assets@v1 @@ -184,7 +184,7 @@ jobs: shell: bash run: | # Define some variables for things we need - release_name="ErsatzTV-${{ inputs.release_version }}-${{ matrix.target }}" + release_name="ErsatzTV-Legacy-${{ inputs.release_version }}-${{ matrix.target }}" echo "RELEASE_NAME=${release_name}" >> $GITHUB_ENV # Build everything @@ -301,7 +301,7 @@ jobs: - name: Package artifacts shell: bash run: | - release_name="ErsatzTV-${{ inputs.release_version }}-win-x64" + release_name="ErsatzTV-Legacy-${{ inputs.release_version }}-win-x64" echo "RELEASE_NAME=${release_name}" >> $GITHUB_ENV mkdir "$release_name" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d30796ca6..8c0d75dec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,7 +34,7 @@ jobs: artifacts_version: ${{ env.ARTIFACTS_VERSION }} info_version: ${{ env.INFO_VERSION }} build_and_upload: - uses: ersatztv/ersatztv/.github/workflows/artifacts.yml@main + uses: ersatztv/legacy/.github/workflows/artifacts.yml@main needs: calculate_version with: release_tag: develop @@ -51,7 +51,7 @@ jobs: azure_subscription_id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} build_images: - uses: ersatztv/ersatztv/.github/workflows/docker.yml@main + uses: ersatztv/legacy/.github/workflows/docker.yml@main needs: calculate_version with: base_version: develop diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index a5d9f1ad7..824989024 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -80,8 +80,8 @@ jobs: build-args: | INFO_VERSION=${{ inputs.info_version }}-docker${{ matrix.suffix }} outputs: | - type=image,name=jasongdove/ersatztv,name-canonical=true,push-by-digest=true - type=image,name=ghcr.io/ersatztv/ersatztv,name-canonical=true,push-by-digest=true + type=image,name=ersatztv/legacy,name-canonical=true,push-by-digest=true + type=image,name=ghcr.io/ersatztv/legacy,name-canonical=true,push-by-digest=true - name: Save digest to artifact run: echo ${{ steps.build.outputs.digest }} > digest.txt @@ -122,20 +122,20 @@ jobs: ARM32V7_HASH=$(cat digests/digest-arm32v7/digest.txt) ARM64_HASH=$(cat digests/digest-arm64/digest.txt) - DOCKER_HUB_DIGESTS="jasongdove/ersatztv@${AMD64_HASH} jasongdove/ersatztv@${ARM64_HASH} jasongdove/ersatztv@${ARM32V7_HASH}" - GHCR_DIGESTS="ghcr.io/ersatztv/ersatztv@${AMD64_HASH} ghcr.io/ersatztv/ersatztv@${ARM64_HASH} ghcr.io/ersatztv/ersatztv@${ARM32V7_HASH}" + DOCKER_HUB_DIGESTS="ersatztv/legacy@${AMD64_HASH} ersatztv/legacy@${ARM64_HASH} ersatztv/legacy@${ARM32V7_HASH}" + GHCR_DIGESTS="ghcr.io/ersatztv/legacy@${AMD64_HASH} ghcr.io/ersatztv/legacy@${ARM64_HASH} ghcr.io/ersatztv/legacy@${ARM32V7_HASH}" echo "docker_hub_digests=${DOCKER_HUB_DIGESTS}" >> $GITHUB_OUTPUT echo "ghcr_digests=${GHCR_DIGESTS}" >> $GITHUB_OUTPUT - name: Create and push manifests run: | - docker manifest create jasongdove/ersatztv:${{ inputs.base_version }} ${{ steps.digests.outputs.docker_hub_digests }} - docker manifest push jasongdove/ersatztv:${{ inputs.base_version }} - docker manifest create jasongdove/ersatztv:${{ inputs.tag_version }} ${{ steps.digests.outputs.docker_hub_digests }} - docker manifest push jasongdove/ersatztv:${{ inputs.tag_version }} + docker manifest create ersatztv/legacy:${{ inputs.base_version }} ${{ steps.digests.outputs.docker_hub_digests }} + docker manifest push ersatztv/legacy:${{ inputs.base_version }} + docker manifest create ersatztv/legacy:${{ inputs.tag_version }} ${{ steps.digests.outputs.docker_hub_digests }} + docker manifest push ersatztv/legacy:${{ inputs.tag_version }} - docker manifest create ghcr.io/ersatztv/ersatztv:${{ inputs.base_version }} ${{ steps.digests.outputs.ghcr_digests }} - docker manifest push ghcr.io/ersatztv/ersatztv:${{ inputs.base_version }} - docker manifest create ghcr.io/ersatztv/ersatztv:${{ inputs.tag_version }} ${{ steps.digests.outputs.ghcr_digests }} - docker manifest push ghcr.io/ersatztv/ersatztv:${{ inputs.tag_version }} + docker manifest create ghcr.io/ersatztv/legacy:${{ inputs.base_version }} ${{ steps.digests.outputs.ghcr_digests }} + docker manifest push ghcr.io/ersatztv/legacy:${{ inputs.base_version }} + docker manifest create ghcr.io/ersatztv/legacy:${{ inputs.tag_version }} ${{ steps.digests.outputs.ghcr_digests }} + docker manifest push ghcr.io/ersatztv/legacy:${{ inputs.tag_version }} diff --git a/.github/workflows/issue-stale.yml b/.github/workflows/issue-stale.yml deleted file mode 100644 index 56adbfef8..000000000 --- a/.github/workflows/issue-stale.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: 'Close stale issues' - -on: - schedule: - - cron: '30 1 * * *' - workflow_dispatch: - -jobs: - stale: - runs-on: ubuntu-latest - steps: - - uses: actions/stale@v9 - with: - ascending: true - days-before-stale: 120 - days-before-pr-stale: -1 - days-before-close: 21 - days-before-pr-close: -1 - operations-per-run: 500 - exempt-issue-labels: 'regression,security,roadmap,future,feature,enhancement,confirmed' - stale-issue-label: 'stale' - stale-issue-message: |- - This issue has gone 120 days without an update and will be closed within 21 days if there is no new activity. To prevent this issue from being closed, please confirm the issue has not already been fixed by providing updated examples or logs. - - If you have any questions you can use one of several ways to [contact us](https://ersatztv.org). - close-issue-message: |- - This issue was closed due to inactivity. diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5af475650..e449613c0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,7 +29,7 @@ jobs: artifacts_version: ${{ env.ARTIFACTS_VERSION }} info_version: ${{ env.INFO_VERSION }} build_and_upload: - uses: ersatztv/ersatztv/.github/workflows/artifacts.yml@main + uses: ersatztv/legacy/.github/workflows/artifacts.yml@main needs: calculate_version with: release_tag: ${{ needs.calculate_version.outputs.artifacts_version }} @@ -45,7 +45,7 @@ jobs: azure_tenant_id: ${{ secrets.AZURE_TENANT_ID }} azure_subscription_id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} build_images: - uses: ersatztv/ersatztv/.github/workflows/docker.yml@main + uses: ersatztv/legacy/.github/workflows/docker.yml@main needs: calculate_version with: base_version: latest diff --git a/ErsatzTV.Application/ErsatzTV.Application.csproj b/ErsatzTV.Application/ErsatzTV.Application.csproj index df10c6035..cdbbf65b0 100644 --- a/ErsatzTV.Application/ErsatzTV.Application.csproj +++ b/ErsatzTV.Application/ErsatzTV.Application.csproj @@ -10,14 +10,14 @@ - - + + - - + + - + diff --git a/ErsatzTV.Core.Tests/ErsatzTV.Core.Tests.csproj b/ErsatzTV.Core.Tests/ErsatzTV.Core.Tests.csproj index 87a7309a0..1bd40e366 100644 --- a/ErsatzTV.Core.Tests/ErsatzTV.Core.Tests.csproj +++ b/ErsatzTV.Core.Tests/ErsatzTV.Core.Tests.csproj @@ -7,22 +7,22 @@ - + - - - - - - + + + + + + - - - + + + - + diff --git a/ErsatzTV.Core/ErsatzTV.Core.csproj b/ErsatzTV.Core/ErsatzTV.Core.csproj index 342e03ab3..916713aa8 100644 --- a/ErsatzTV.Core/ErsatzTV.Core.csproj +++ b/ErsatzTV.Core/ErsatzTV.Core.csproj @@ -10,25 +10,25 @@ - + - + - - - - + + + + - + - + - - - - + + + + diff --git a/ErsatzTV.Core/Interfaces/GitHub/IGitHubApiClient.cs b/ErsatzTV.Core/Interfaces/GitHub/IGitHubApiClient.cs deleted file mode 100644 index 085e02742..000000000 --- a/ErsatzTV.Core/Interfaces/GitHub/IGitHubApiClient.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace ErsatzTV.Core.Interfaces.GitHub; - -public interface IGitHubApiClient -{ - Task> GetLatestReleaseNotes(CancellationToken cancellationToken); - Task> GetReleaseNotes(string tag, CancellationToken cancellationToken); -} diff --git a/ErsatzTV.FFmpeg.Tests/ErsatzTV.FFmpeg.Tests.csproj b/ErsatzTV.FFmpeg.Tests/ErsatzTV.FFmpeg.Tests.csproj index edb5e6a38..e9422ef92 100644 --- a/ErsatzTV.FFmpeg.Tests/ErsatzTV.FFmpeg.Tests.csproj +++ b/ErsatzTV.FFmpeg.Tests/ErsatzTV.FFmpeg.Tests.csproj @@ -9,11 +9,11 @@ - - + + - - + + all diff --git a/ErsatzTV.FFmpeg/ErsatzTV.FFmpeg.csproj b/ErsatzTV.FFmpeg/ErsatzTV.FFmpeg.csproj index 068391dc3..e89a099df 100644 --- a/ErsatzTV.FFmpeg/ErsatzTV.FFmpeg.csproj +++ b/ErsatzTV.FFmpeg/ErsatzTV.FFmpeg.csproj @@ -11,12 +11,12 @@ - + - - + + diff --git a/ErsatzTV.Infrastructure.MySql/ErsatzTV.Infrastructure.MySql.csproj b/ErsatzTV.Infrastructure.MySql/ErsatzTV.Infrastructure.MySql.csproj index 723beea5d..13a98c266 100644 --- a/ErsatzTV.Infrastructure.MySql/ErsatzTV.Infrastructure.MySql.csproj +++ b/ErsatzTV.Infrastructure.MySql/ErsatzTV.Infrastructure.MySql.csproj @@ -17,7 +17,7 @@ - + diff --git a/ErsatzTV.Infrastructure.Sqlite/ErsatzTV.Infrastructure.Sqlite.csproj b/ErsatzTV.Infrastructure.Sqlite/ErsatzTV.Infrastructure.Sqlite.csproj index 37a4476e2..fb6f5bcc4 100644 --- a/ErsatzTV.Infrastructure.Sqlite/ErsatzTV.Infrastructure.Sqlite.csproj +++ b/ErsatzTV.Infrastructure.Sqlite/ErsatzTV.Infrastructure.Sqlite.csproj @@ -12,10 +12,10 @@ - + - - + + diff --git a/ErsatzTV.Infrastructure.Tests/ErsatzTV.Infrastructure.Tests.csproj b/ErsatzTV.Infrastructure.Tests/ErsatzTV.Infrastructure.Tests.csproj index 6e9575e54..b47b678be 100644 --- a/ErsatzTV.Infrastructure.Tests/ErsatzTV.Infrastructure.Tests.csproj +++ b/ErsatzTV.Infrastructure.Tests/ErsatzTV.Infrastructure.Tests.csproj @@ -9,11 +9,11 @@ - + - - - + + + runtime; build; native; contentfiles; analyzers; buildtransitive all @@ -22,7 +22,7 @@ all - + diff --git a/ErsatzTV.Infrastructure/ErsatzTV.Infrastructure.csproj b/ErsatzTV.Infrastructure/ErsatzTV.Infrastructure.csproj index eead7978f..93e5f11ea 100644 --- a/ErsatzTV.Infrastructure/ErsatzTV.Infrastructure.csproj +++ b/ErsatzTV.Infrastructure/ErsatzTV.Infrastructure.csproj @@ -13,22 +13,22 @@ - - + + - - - - + + + + - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + @@ -36,7 +36,7 @@ - + diff --git a/ErsatzTV.Infrastructure/GitHub/GitHubApiClient.cs b/ErsatzTV.Infrastructure/GitHub/GitHubApiClient.cs deleted file mode 100644 index 17b65b4c7..000000000 --- a/ErsatzTV.Infrastructure/GitHub/GitHubApiClient.cs +++ /dev/null @@ -1,34 +0,0 @@ -using ErsatzTV.Core; -using ErsatzTV.Core.Interfaces.GitHub; -using Refit; - -namespace ErsatzTV.Infrastructure.GitHub; - -public class GitHubApiClient : IGitHubApiClient -{ - public async Task> GetLatestReleaseNotes(CancellationToken cancellationToken) - { - try - { - IGitHubApi service = RestService.For("https://api.github.com"); - return await service.GetReleases(cancellationToken).Map(releases => releases.Head().Body); - } - catch (Exception ex) - { - return BaseError.New(ex.ToString()); - } - } - - public async Task> GetReleaseNotes(string tag, CancellationToken cancellationToken) - { - try - { - IGitHubApi service = RestService.For("https://api.github.com"); - return await service.GetTag(tag, cancellationToken).Map(t => t.Body); - } - catch (Exception ex) - { - return BaseError.New(ex.ToString()); - } - } -} diff --git a/ErsatzTV.Infrastructure/GitHub/IGitHubApi.cs b/ErsatzTV.Infrastructure/GitHub/IGitHubApi.cs deleted file mode 100644 index 9e7cf9cb9..000000000 --- a/ErsatzTV.Infrastructure/GitHub/IGitHubApi.cs +++ /dev/null @@ -1,14 +0,0 @@ -using ErsatzTV.Infrastructure.GitHub.Models; -using Refit; - -namespace ErsatzTV.Infrastructure.GitHub; - -[Headers("Accept: application/vnd.github.v3+json", "User-Agent: ErsatzTV/ErsatzTV")] -public interface IGitHubApi -{ - [Get("/repos/ErsatzTV/ErsatzTV/releases")] - Task> GetReleases(CancellationToken cancellationToken); - - [Get("/repos/ErsatzTV/ErsatzTV/releases/tags/{tag}")] - Task GetTag(string tag, CancellationToken cancellationToken); -} diff --git a/ErsatzTV.Infrastructure/GitHub/Models/GitHubTag.cs b/ErsatzTV.Infrastructure/GitHub/Models/GitHubTag.cs deleted file mode 100644 index c74e018b3..000000000 --- a/ErsatzTV.Infrastructure/GitHub/Models/GitHubTag.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace ErsatzTV.Infrastructure.GitHub.Models; - -public class GitHubTag -{ - public string Body { get; set; } -} diff --git a/ErsatzTV.Scanner.Tests/ErsatzTV.Scanner.Tests.csproj b/ErsatzTV.Scanner.Tests/ErsatzTV.Scanner.Tests.csproj index 2ceee7724..a5187c7bf 100644 --- a/ErsatzTV.Scanner.Tests/ErsatzTV.Scanner.Tests.csproj +++ b/ErsatzTV.Scanner.Tests/ErsatzTV.Scanner.Tests.csproj @@ -10,11 +10,11 @@ - + - - - + + + runtime; build; native; contentfiles; analyzers; buildtransitive all @@ -23,7 +23,7 @@ all - + diff --git a/ErsatzTV.Scanner/ErsatzTV.Scanner.csproj b/ErsatzTV.Scanner/ErsatzTV.Scanner.csproj index 626120a71..450d73f77 100644 --- a/ErsatzTV.Scanner/ErsatzTV.Scanner.csproj +++ b/ErsatzTV.Scanner/ErsatzTV.Scanner.csproj @@ -21,21 +21,21 @@ - + - + - - - - + + + + - + diff --git a/ErsatzTV.Tests/ErsatzTV.Tests.csproj b/ErsatzTV.Tests/ErsatzTV.Tests.csproj index abe870896..4599a96c9 100644 --- a/ErsatzTV.Tests/ErsatzTV.Tests.csproj +++ b/ErsatzTV.Tests/ErsatzTV.Tests.csproj @@ -11,12 +11,12 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/ErsatzTV/ErsatzTV.csproj b/ErsatzTV/ErsatzTV.csproj index 68c9683da..40aa2eb1f 100644 --- a/ErsatzTV/ErsatzTV.csproj +++ b/ErsatzTV/ErsatzTV.csproj @@ -31,33 +31,32 @@ - + - - - - - - - + + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + diff --git a/ErsatzTV/Locals/Shared/MainLayout.resx b/ErsatzTV/Locals/Shared/MainLayout.resx index 67110bc83..11f4a266e 100644 --- a/ErsatzTV/Locals/Shared/MainLayout.resx +++ b/ErsatzTV/Locals/Shared/MainLayout.resx @@ -154,7 +154,7 @@ Troubleshooting - ErsatzTV Version + ErsatzTV Legacy Version Channel diff --git a/ErsatzTV/Pages/Index.razor b/ErsatzTV/Pages/Index.razor index ba878006a..e4893d87e 100644 --- a/ErsatzTV/Pages/Index.razor +++ b/ErsatzTV/Pages/Index.razor @@ -1,13 +1,8 @@ @page "/" @page "/system/health" -@using System.Reflection @using ErsatzTV.Application.Health @using ErsatzTV.Core.Health -@using ErsatzTV.Core.Interfaces.GitHub -@using Microsoft.Extensions.Caching.Memory @implements IDisposable -@inject IGitHubApiClient GitHubApiClient -@inject IMemoryCache MemoryCache @inject IMediator Mediator @inject SystemStartup SystemStartup; @@ -55,7 +50,7 @@ + ServerData="@(ServerReload)"> Check Message @@ -129,24 +124,12 @@ - - - Full changelog is available on GitHub - - - - - } @code { - private CancellationTokenSource _cts; - - private string _releaseNotes; - protected override void OnInitialized() { SystemStartup.OnDatabaseReady += OnStartupProgress; @@ -157,9 +140,6 @@ { SystemStartup.OnDatabaseReady -= OnStartupProgress; SystemStartup.OnSearchIndexReady -= OnStartupProgress; - - _cts?.Cancel(); - _cts?.Dispose(); } private async void OnStartupProgress(object sender, EventArgs e) @@ -174,66 +154,6 @@ } } - protected override async Task OnParametersSetAsync() - { - _cts?.Cancel(); - _cts?.Dispose(); - _cts = new CancellationTokenSource(); - var token = _cts.Token; - - try - { - if (MemoryCache.TryGetValue("Index.ReleaseNotesHtml", out string releaseNotesHtml)) - { - _releaseNotes = releaseNotesHtml; - } - else - { - var assembly = Assembly.GetEntryAssembly(); - if (assembly != null) - { - string version = assembly.GetCustomAttribute()?.InformationalVersion; - if (version != null) - { - Either maybeNotes; - - if (version != "develop") - { - string gitHubVersion = version.Split("-").Head(); - if (!gitHubVersion.StartsWith("v")) - { - gitHubVersion = $"v{gitHubVersion}"; - } - - maybeNotes = await GitHubApiClient.GetReleaseNotes(gitHubVersion, token); - foreach (string notes in maybeNotes.RightToSeq()) - { - _releaseNotes = notes; - } - } - else - { - maybeNotes = await GitHubApiClient.GetLatestReleaseNotes(token); - foreach (string notes in maybeNotes.RightToSeq()) - { - _releaseNotes = notes; - } - } - } - } - - if (_releaseNotes != null) - { - MemoryCache.Set("Index.ReleaseNotesHtml", _releaseNotes); - } - } - } - catch (Exception) - { - // ignore - } - } - private async Task> ServerReload(TableState state, CancellationToken cancellationToken) { List healthCheckResults = await Mediator.Send(new GetAllHealthCheckResults(), cancellationToken); diff --git a/ErsatzTV/Pages/_Host.cshtml b/ErsatzTV/Pages/_Host.cshtml index 8d1c5cf73..1017299c7 100644 --- a/ErsatzTV/Pages/_Host.cshtml +++ b/ErsatzTV/Pages/_Host.cshtml @@ -12,7 +12,7 @@ - @if (Assembly.GetEntryAssembly().GetCustomAttribute<AssemblyConfigurationAttribute>()?.Configuration?.ToLower() != "release") { @(System.Environment.MachineName + " ") }ErsatzTV + @if (Assembly.GetEntryAssembly().GetCustomAttribute<AssemblyConfigurationAttribute>()?.Configuration?.ToLower() != "release") { @(System.Environment.MachineName + " ") }ErsatzTV Legacy diff --git a/ErsatzTV/Shared/MarkdownView.razor b/ErsatzTV/Shared/MarkdownView.razor deleted file mode 100644 index a86559d4a..000000000 --- a/ErsatzTV/Shared/MarkdownView.razor +++ /dev/null @@ -1 +0,0 @@ -@HtmlContent diff --git a/ErsatzTV/Shared/MarkdownView.razor.cs b/ErsatzTV/Shared/MarkdownView.razor.cs deleted file mode 100644 index b376e884f..000000000 --- a/ErsatzTV/Shared/MarkdownView.razor.cs +++ /dev/null @@ -1,69 +0,0 @@ -using Ganss.Xss; -using Markdig; -using Microsoft.AspNetCore.Components; -using Microsoft.JSInterop; - -namespace ErsatzTV.Shared; - -public partial class MarkdownView -{ - private MarkupString? _markupContent; - - [Inject] - public IHtmlSanitizer HtmlSanitizer { get; set; } - - [Inject] - public IJSRuntime JsRuntime { get; set; } - - [Parameter] - public string Content { get; set; } - - public MarkupString? HtmlContent - { - get - { - if (string.IsNullOrWhiteSpace(Content)) - { - return null; - } - - return _markupContent ?? (_markupContent = ConvertStringToMarkupString(Content)).Value; - } - } - - private MarkupString ConvertStringToMarkupString(string value) - { - if (!string.IsNullOrWhiteSpace(value)) - { - // Convert markdown string to HTML - string html = Markdown.ToHtml( - value, - new MarkdownPipelineBuilder() - .UseAdvancedExtensions() - .UseSoftlineBreakAsHardlineBreak() - .Build()); - - // Sanitize HTML before rendering - string sanitizedHtml = HtmlSanitizer.Sanitize(html); - - // Return sanitized HTML as a MarkupString that Blazor can render - return new MarkupString(sanitizedHtml); - } - - return new MarkupString(); - } - - protected override async Task OnAfterRenderAsync(bool firstRender) - { - try - { - await JsRuntime.InvokeVoidAsync("styleMarkdown"); - } - catch (Exception) - { - // ignored - } - - await base.OnAfterRenderAsync(true); - } -} diff --git a/ErsatzTV/Startup.cs b/ErsatzTV/Startup.cs index 2c8f13bb7..6ca87f9b8 100644 --- a/ErsatzTV/Startup.cs +++ b/ErsatzTV/Startup.cs @@ -21,7 +21,6 @@ using ErsatzTV.Core.Images; using ErsatzTV.Core.Interfaces.Database; using ErsatzTV.Core.Interfaces.Emby; using ErsatzTV.Core.Interfaces.FFmpeg; -using ErsatzTV.Core.Interfaces.GitHub; using ErsatzTV.Core.Interfaces.Images; using ErsatzTV.Core.Interfaces.Jellyfin; using ErsatzTV.Core.Interfaces.Locking; @@ -56,7 +55,6 @@ using ErsatzTV.Infrastructure.Data.Repositories; using ErsatzTV.Infrastructure.Database; using ErsatzTV.Infrastructure.Emby; using ErsatzTV.Infrastructure.FFmpeg; -using ErsatzTV.Infrastructure.GitHub; using ErsatzTV.Infrastructure.Health; using ErsatzTV.Infrastructure.Health.Checks; using ErsatzTV.Infrastructure.Images; @@ -340,12 +338,7 @@ public class Startup string etvVersion = Assembly.GetEntryAssembly()?.GetCustomAttribute() ?.InformationalVersion ?? "unknown"; - Log.Logger.Information("ErsatzTV version {Version}", etvVersion); - - Log.Logger.Warning( - "Report bugs to {GitHub} or contact us at {Contact}", - "https://github.com/ErsatzTV/ErsatzTV", - "https://ersatztv.org/contact"); + Log.Logger.Information("ErsatzTV Legacy version {Version}", etvVersion); CopyMacOsConfigFolderIfNeeded(); @@ -836,7 +829,6 @@ public class Startup services.AddScoped(); services.AddScoped(); - services.AddScoped(); services.AddScoped(_ => { var sanitizer = new HtmlSanitizer(); diff --git a/scripts/macOS/bundle.sh b/scripts/macOS/bundle.sh index 45177cb5c..a257b5e66 100755 --- a/scripts/macOS/bundle.sh +++ b/scripts/macOS/bundle.sh @@ -3,7 +3,7 @@ SCRIPT_FOLDER=$(dirname ${BASH_SOURCE[0]}) REPO_ROOT=$(realpath "$SCRIPT_FOLDER/../..") -APP_NAME="$REPO_ROOT/ErsatzTV.app" +APP_NAME="$REPO_ROOT/ErsatzTV-Legacy.app" PUBLISH_OUTPUT_DIRECTORY="$REPO_ROOT/publish/." if [ -d "$APP_NAME" ] diff --git a/scripts/macOS/sign.sh b/scripts/macOS/sign.sh index 49ecc45f8..935629d88 100755 --- a/scripts/macOS/sign.sh +++ b/scripts/macOS/sign.sh @@ -3,7 +3,7 @@ SCRIPT_FOLDER=$(dirname ${BASH_SOURCE[0]}) REPO_ROOT=$(realpath "$SCRIPT_FOLDER/../..") -APP_NAME="$REPO_ROOT/ErsatzTV.app" +APP_NAME="$REPO_ROOT/ErsatzTV-Legacy.app" ENTITLEMENTS="$SCRIPT_FOLDER/ErsatzTV.entitlements" SIGNING_IDENTITY="C3BBCFB2D6851FF0DCA6CAC06A3EF1ECE71F9FFF"