From 51222ffb2f005a8e594f746ca6b9e0828b942f81 Mon Sep 17 00:00:00 2001
From: cxfksword <718792+cxfksword@users.noreply.github.com>
Date: Wed, 19 Jul 2023 13:54:33 +0800
Subject: [PATCH] build: repack to one dll assembly
---
.github/workflows/publish.yaml | 7 ++++---
.../Vendor/AnitomySharp => AnitomySharp}/Anitomy.cs | 0
.../AnitomySharp.csproj | 0
.../Vendor/AnitomySharp => AnitomySharp}/Element.cs | 0
.../Vendor/AnitomySharp => AnitomySharp}/Keyword.cs | 0
.../Vendor/AnitomySharp => AnitomySharp}/Options.cs | 0
.../Vendor/AnitomySharp => AnitomySharp}/Parser.cs | 0
.../AnitomySharp => AnitomySharp}/ParserHelper.cs | 0
.../AnitomySharp => AnitomySharp}/ParserNumber.cs | 0
.../AnitomySharp => AnitomySharp}/StringHelper.cs | 0
.../Vendor/AnitomySharp => AnitomySharp}/Token.cs | 0
.../AnitomySharp => AnitomySharp}/TokenRange.cs | 0
.../AnitomySharp => AnitomySharp}/Tokenizer.cs | 0
Jellyfin.Plugin.MetaShark.sln | 6 ++++++
Jellyfin.Plugin.MetaShark/ILRepack.targets | 10 +++++-----
.../Jellyfin.Plugin.MetaShark.csproj | 13 +++++++++----
README.md | 8 ++------
17 files changed, 26 insertions(+), 18 deletions(-)
rename {Jellyfin.Plugin.MetaShark/Vendor/AnitomySharp => AnitomySharp}/Anitomy.cs (100%)
rename {Jellyfin.Plugin.MetaShark/Vendor/AnitomySharp => AnitomySharp}/AnitomySharp.csproj (100%)
rename {Jellyfin.Plugin.MetaShark/Vendor/AnitomySharp => AnitomySharp}/Element.cs (100%)
rename {Jellyfin.Plugin.MetaShark/Vendor/AnitomySharp => AnitomySharp}/Keyword.cs (100%)
rename {Jellyfin.Plugin.MetaShark/Vendor/AnitomySharp => AnitomySharp}/Options.cs (100%)
rename {Jellyfin.Plugin.MetaShark/Vendor/AnitomySharp => AnitomySharp}/Parser.cs (100%)
rename {Jellyfin.Plugin.MetaShark/Vendor/AnitomySharp => AnitomySharp}/ParserHelper.cs (100%)
rename {Jellyfin.Plugin.MetaShark/Vendor/AnitomySharp => AnitomySharp}/ParserNumber.cs (100%)
rename {Jellyfin.Plugin.MetaShark/Vendor/AnitomySharp => AnitomySharp}/StringHelper.cs (100%)
rename {Jellyfin.Plugin.MetaShark/Vendor/AnitomySharp => AnitomySharp}/Token.cs (100%)
rename {Jellyfin.Plugin.MetaShark/Vendor/AnitomySharp => AnitomySharp}/TokenRange.cs (100%)
rename {Jellyfin.Plugin.MetaShark/Vendor/AnitomySharp => AnitomySharp}/Tokenizer.cs (100%)
diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml
index d6c8e6e..9d2be02 100644
--- a/.github/workflows/publish.yaml
+++ b/.github/workflows/publish.yaml
@@ -33,9 +33,10 @@ jobs:
- name: Install dependencies
run: dotnet restore ${{ env.project }} --no-cache
- name: Build
- run: dotnet publish --nologo --no-restore --configuration=Release --framework=net6.0 --output=artifacts -p:Version=${{steps.vars.outputs.VERSION}} ${{ env.project }}
- - name: Clean publish dll
- run: cd artifacts && rm -rf MediaBrowser*.dll Microsoft*.dll Newtonsoft*.dll System*.dll Emby*.dll Jellyfin.Data*.dll Jellyfin.Extensions*.dll *.json *.pdb
+ run: |
+ dotnet publish --nologo --no-restore --configuration=Release --framework=net6.0 --output=tmp -p:Version=${{steps.vars.outputs.VERSION}} ${{ env.project }}
+ mkdir -p artifacts
+ cp ./tmp/Jellyfin.Plugin.MetaShark.dll ./artifacts/
- name: Compress build files
uses: thedoctor0/zip-release@main
with:
diff --git a/Jellyfin.Plugin.MetaShark/Vendor/AnitomySharp/Anitomy.cs b/AnitomySharp/Anitomy.cs
similarity index 100%
rename from Jellyfin.Plugin.MetaShark/Vendor/AnitomySharp/Anitomy.cs
rename to AnitomySharp/Anitomy.cs
diff --git a/Jellyfin.Plugin.MetaShark/Vendor/AnitomySharp/AnitomySharp.csproj b/AnitomySharp/AnitomySharp.csproj
similarity index 100%
rename from Jellyfin.Plugin.MetaShark/Vendor/AnitomySharp/AnitomySharp.csproj
rename to AnitomySharp/AnitomySharp.csproj
diff --git a/Jellyfin.Plugin.MetaShark/Vendor/AnitomySharp/Element.cs b/AnitomySharp/Element.cs
similarity index 100%
rename from Jellyfin.Plugin.MetaShark/Vendor/AnitomySharp/Element.cs
rename to AnitomySharp/Element.cs
diff --git a/Jellyfin.Plugin.MetaShark/Vendor/AnitomySharp/Keyword.cs b/AnitomySharp/Keyword.cs
similarity index 100%
rename from Jellyfin.Plugin.MetaShark/Vendor/AnitomySharp/Keyword.cs
rename to AnitomySharp/Keyword.cs
diff --git a/Jellyfin.Plugin.MetaShark/Vendor/AnitomySharp/Options.cs b/AnitomySharp/Options.cs
similarity index 100%
rename from Jellyfin.Plugin.MetaShark/Vendor/AnitomySharp/Options.cs
rename to AnitomySharp/Options.cs
diff --git a/Jellyfin.Plugin.MetaShark/Vendor/AnitomySharp/Parser.cs b/AnitomySharp/Parser.cs
similarity index 100%
rename from Jellyfin.Plugin.MetaShark/Vendor/AnitomySharp/Parser.cs
rename to AnitomySharp/Parser.cs
diff --git a/Jellyfin.Plugin.MetaShark/Vendor/AnitomySharp/ParserHelper.cs b/AnitomySharp/ParserHelper.cs
similarity index 100%
rename from Jellyfin.Plugin.MetaShark/Vendor/AnitomySharp/ParserHelper.cs
rename to AnitomySharp/ParserHelper.cs
diff --git a/Jellyfin.Plugin.MetaShark/Vendor/AnitomySharp/ParserNumber.cs b/AnitomySharp/ParserNumber.cs
similarity index 100%
rename from Jellyfin.Plugin.MetaShark/Vendor/AnitomySharp/ParserNumber.cs
rename to AnitomySharp/ParserNumber.cs
diff --git a/Jellyfin.Plugin.MetaShark/Vendor/AnitomySharp/StringHelper.cs b/AnitomySharp/StringHelper.cs
similarity index 100%
rename from Jellyfin.Plugin.MetaShark/Vendor/AnitomySharp/StringHelper.cs
rename to AnitomySharp/StringHelper.cs
diff --git a/Jellyfin.Plugin.MetaShark/Vendor/AnitomySharp/Token.cs b/AnitomySharp/Token.cs
similarity index 100%
rename from Jellyfin.Plugin.MetaShark/Vendor/AnitomySharp/Token.cs
rename to AnitomySharp/Token.cs
diff --git a/Jellyfin.Plugin.MetaShark/Vendor/AnitomySharp/TokenRange.cs b/AnitomySharp/TokenRange.cs
similarity index 100%
rename from Jellyfin.Plugin.MetaShark/Vendor/AnitomySharp/TokenRange.cs
rename to AnitomySharp/TokenRange.cs
diff --git a/Jellyfin.Plugin.MetaShark/Vendor/AnitomySharp/Tokenizer.cs b/AnitomySharp/Tokenizer.cs
similarity index 100%
rename from Jellyfin.Plugin.MetaShark/Vendor/AnitomySharp/Tokenizer.cs
rename to AnitomySharp/Tokenizer.cs
diff --git a/Jellyfin.Plugin.MetaShark.sln b/Jellyfin.Plugin.MetaShark.sln
index 6e391cc..35502b0 100644
--- a/Jellyfin.Plugin.MetaShark.sln
+++ b/Jellyfin.Plugin.MetaShark.sln
@@ -6,6 +6,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Jellyfin.Plugin.MetaShark",
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Jellyfin.Plugin.MetaShark.Test", "Jellyfin.Plugin.MetaShark.Test\Jellyfin.Plugin.MetaShark.Test.csproj", "{80814353-4291-4230-8C4A-4C45CAD4D5D3}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AnitomySharp", "AnitomySharp\AnitomySharp.csproj", "{B6FC3E72-D30D-49D3-B545-0EF0CCFF220A}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -20,6 +22,10 @@ Global
{80814353-4291-4230-8C4A-4C45CAD4D5D3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{80814353-4291-4230-8C4A-4C45CAD4D5D3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{80814353-4291-4230-8C4A-4C45CAD4D5D3}.Release|Any CPU.Build.0 = Release|Any CPU
+ {B6FC3E72-D30D-49D3-B545-0EF0CCFF220A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B6FC3E72-D30D-49D3-B545-0EF0CCFF220A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B6FC3E72-D30D-49D3-B545-0EF0CCFF220A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B6FC3E72-D30D-49D3-B545-0EF0CCFF220A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/Jellyfin.Plugin.MetaShark/ILRepack.targets b/Jellyfin.Plugin.MetaShark/ILRepack.targets
index c75f037..9796132 100644
--- a/Jellyfin.Plugin.MetaShark/ILRepack.targets
+++ b/Jellyfin.Plugin.MetaShark/ILRepack.targets
@@ -7,11 +7,11 @@
-
-
-
-
-
+
+
+
+
+
+
net6.0
Jellyfin.Plugin.MetaShark
@@ -6,6 +6,7 @@
true
enable
AllEnabledByDefault
+ true
False
@@ -13,12 +14,16 @@
False
+
+
+
+
+
-
+
-
@@ -32,6 +37,6 @@
-
+
\ No newline at end of file
diff --git a/README.md b/README.md
index f2a54de..3a92cfe 100644
--- a/README.md
+++ b/README.md
@@ -38,17 +38,13 @@ jellyfin电影元数据插件,影片信息只要从豆瓣获取,并由TheMov
1. Clone or download this repository
-2. Ensure you have .NET Core SDK setup and installed
+2. Ensure you have .NET Core SDK 6.0 setup and installed
3. Build plugin with following command.
```sh
dotnet restore
dotnet publish --output=artifacts Jellyfin.Plugin.MetaShark/Jellyfin.Plugin.MetaShark.csproj
-
-# remove unused dll
-cd artifacts
-rm -rf MediaBrowser*.dll Microsoft*.dll Newtonsoft*.dll System*.dll Emby*.dll Jellyfin.Data*.dll Jellyfin.Extensions*.dll *.json *.pdb
```
@@ -56,7 +52,7 @@ rm -rf MediaBrowser*.dll Microsoft*.dll Newtonsoft*.dll System*.dll Emby*.dll Je
1. Build the plugin
-2. Create a folder, like `metashark` and copy `artifacts/*.dll` into it
+2. Create a folder, like `metashark` and copy `artifacts/Jellyfin.Plugin.MetaShark.dll` into it
3. Move folder `metashark` to jellyfin `data/plugins` folder