From 649a42ebe0c5588fea91d76014f46250e790ae9a Mon Sep 17 00:00:00 2001 From: cxfksword <718792+cxfksword@users.noreply.github.com> Date: Mon, 27 Oct 2025 23:02:52 +0800 Subject: [PATCH] feat: support jellyfin 10.11. #96 --- .github/workflows/beta.yaml | 6 +-- .github/workflows/build.yaml | 2 +- .github/workflows/publish.yaml | 6 +-- .../Jellyfin.Plugin.Danmu.Test.csproj | 2 +- .../Configuration/PluginConfiguration.cs | 4 ++ .../Configuration/configPage.html | 28 +++++++--- .../Jellyfin.Plugin.Danmu.csproj | 6 +-- .../LibraryManagerEventsHelper.cs | 10 +--- Jellyfin.Plugin.Danmu/PluginStartup.cs | 19 +++++++ .../Bilibili/ExternalId/EpisodeExternalId.cs | 3 -- .../ExternalId/ExternalUrlProvider.cs | 54 +++++++++++++++++++ .../Bilibili/ExternalId/MovieExternalId.cs | 3 -- .../Bilibili/ExternalId/SeasonExternalId.cs | 3 -- .../Dandan/ExternalId/EpisodeExternalId.cs | 3 -- .../Dandan/ExternalId/ExternalUrlProvider.cs | 47 ++++++++++++++++ .../Dandan/ExternalId/MovieExternalId.cs | 5 +- .../Dandan/ExternalId/SeasonExternalId.cs | 3 -- .../Iqiyi/ExternalId/EpisodeExternalId.cs | 3 -- .../Iqiyi/ExternalId/ExternalUrlProvider.cs | 47 ++++++++++++++++ .../Iqiyi/ExternalId/MovieExternalId.cs | 3 -- .../Iqiyi/ExternalId/SeasonExternalId.cs | 3 -- .../Mgtv/ExternalId/EpisodeExternalId.cs | 3 -- .../Mgtv/ExternalId/ExternalUrlProvider.cs | 54 +++++++++++++++++++ .../Mgtv/ExternalId/MovieExternalId.cs | 3 -- .../Mgtv/ExternalId/SeasonExternalId.cs | 3 -- .../Tencent/ExternalId/EpisodeExternalId.cs | 3 -- .../Tencent/ExternalId/ExternalUrlProvider.cs | 54 +++++++++++++++++++ .../Tencent/ExternalId/MovieExternalId.cs | 3 -- .../Tencent/ExternalId/SeasonExternalId.cs | 3 -- .../Youku/ExternalId/EpisodeExternalId.cs | 5 +- .../Youku/ExternalId/ExternalUrlProvider.cs | 49 +++++++++++++++++ README.md | 4 +- scripts/generate_manifest.py | 2 +- 33 files changed, 366 insertions(+), 80 deletions(-) create mode 100644 Jellyfin.Plugin.Danmu/Scrapers/Bilibili/ExternalId/ExternalUrlProvider.cs create mode 100644 Jellyfin.Plugin.Danmu/Scrapers/Dandan/ExternalId/ExternalUrlProvider.cs create mode 100644 Jellyfin.Plugin.Danmu/Scrapers/Iqiyi/ExternalId/ExternalUrlProvider.cs create mode 100644 Jellyfin.Plugin.Danmu/Scrapers/Mgtv/ExternalId/ExternalUrlProvider.cs create mode 100644 Jellyfin.Plugin.Danmu/Scrapers/Tencent/ExternalId/ExternalUrlProvider.cs create mode 100644 Jellyfin.Plugin.Danmu/Scrapers/Youku/ExternalId/ExternalUrlProvider.cs diff --git a/.github/workflows/beta.yaml b/.github/workflows/beta.yaml index e942a06..2f8919a 100644 --- a/.github/workflows/beta.yaml +++ b/.github/workflows/beta.yaml @@ -4,7 +4,7 @@ on: workflow_dispatch: env: - dotnet-version: 8.0.x + dotnet-version: 9.0.x python-version: 3.8 project: Jellyfin.Plugin.Danmu/Jellyfin.Plugin.Danmu.csproj artifact: danmu @@ -43,9 +43,9 @@ jobs: - name: Build run: | dotnet restore ${{ env.project }} --no-cache - dotnet publish --nologo --no-restore --configuration=Release --framework=net8.0 ${{ env.project }} + dotnet publish --nologo --no-restore --configuration=Release --framework=net9.0 ${{ env.project }} mkdir -p artifacts - cp ./Jellyfin.Plugin.Danmu/bin/Release/net8.0/Jellyfin.Plugin.Danmu.dll ./artifacts/ + cp ./Jellyfin.Plugin.Danmu/bin/Release/net9.0/Jellyfin.Plugin.Danmu.dll ./artifacts/ - name: Upload artifact uses: actions/upload-artifact@v4 with: diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 293fba8..63f0e63 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -14,7 +14,7 @@ jobs: - uses: actions/setup-dotnet@v3 id: dotnet with: - dotnet-version: 8.0.x + dotnet-version: 9.0.x - name: Change default dotnet version run: | echo '{"sdk":{"version": "${{ steps.dotnet.outputs.dotnet-version }}"}}' > ./global.json diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 1fb1de9..ce20fc0 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -5,7 +5,7 @@ on: tags: ["*"] env: - dotnet-version: 8.0.x + dotnet-version: 9.0.x python-version: 3.8 project: Jellyfin.Plugin.Danmu/Jellyfin.Plugin.Danmu.csproj artifact: danmu @@ -50,9 +50,9 @@ jobs: - name: Build run: | dotnet restore ${{ env.project }} --no-cache - dotnet publish --nologo --no-restore --configuration=Release --framework=net8.0 -p:Version=${{steps.vars.outputs.VERSION}} ${{ env.project }} + dotnet publish --nologo --no-restore --configuration=Release --framework=net9.0 -p:Version=${{steps.vars.outputs.VERSION}} ${{ env.project }} mkdir -p artifacts - zip -j ./artifacts/${{ env.artifact }}_${{steps.vars.outputs.VERSION}}.zip ./Jellyfin.Plugin.Danmu/bin/Release/net8.0/Jellyfin.Plugin.Danmu.dll + zip -j ./artifacts/${{ env.artifact }}_${{steps.vars.outputs.VERSION}}.zip ./Jellyfin.Plugin.Danmu/bin/Release/net9.0/Jellyfin.Plugin.Danmu.dll - name: Generate manifest run: python3 ./scripts/generate_manifest.py ./artifacts/${{ env.artifact }}_${{steps.vars.outputs.VERSION}}.zip ${GITHUB_REF#refs/*/} env: diff --git a/Jellyfin.Plugin.Danmu.Test/Jellyfin.Plugin.Danmu.Test.csproj b/Jellyfin.Plugin.Danmu.Test/Jellyfin.Plugin.Danmu.Test.csproj index ad9d003..6a4ede0 100644 --- a/Jellyfin.Plugin.Danmu.Test/Jellyfin.Plugin.Danmu.Test.csproj +++ b/Jellyfin.Plugin.Danmu.Test/Jellyfin.Plugin.Danmu.Test.csproj @@ -1,6 +1,6 @@ - net8.0 + net9.0 enable enable false diff --git a/Jellyfin.Plugin.Danmu/Configuration/PluginConfiguration.cs b/Jellyfin.Plugin.Danmu/Configuration/PluginConfiguration.cs index 8021e3a..65c6be3 100644 --- a/Jellyfin.Plugin.Danmu/Configuration/PluginConfiguration.cs +++ b/Jellyfin.Plugin.Danmu/Configuration/PluginConfiguration.cs @@ -137,6 +137,10 @@ public class ScraperConfigItem public class DanmuDownloadOption { + /// + /// 弹幕自动匹配下载. + /// + public bool EnableAutoDownload { get; set; } = true; /// /// 检测弹幕数和视频剧集数需要一致才自动下载弹幕. /// diff --git a/Jellyfin.Plugin.Danmu/Configuration/configPage.html b/Jellyfin.Plugin.Danmu/Configuration/configPage.html index e966af2..a1ce01d 100644 --- a/Jellyfin.Plugin.Danmu/Configuration/configPage.html +++ b/Jellyfin.Plugin.Danmu/Configuration/configPage.html @@ -25,16 +25,17 @@
-

弹幕源配置

+

弹幕下载配置

-
-
-
-
- -

弹幕匹配下载配置

-
+
+ +
勾选后,有新影片入库会自动匹配下载,不勾选需要自己搜索下载。
+
+
+ +

弹幕源配置

+
+
+
+
+ +