This commit is contained in:
22
.drone.yml
22
.drone.yml
@@ -5,8 +5,30 @@ steps:
|
||||
- name: build
|
||||
image: mcr.microsoft.com/dotnet/sdk:9.0
|
||||
commands:
|
||||
# HACK Waiting for "Assembly strong name Linux compatibility" (https://github.com/gluck/il-repack/pull/366) to propagate to the ILRepack.Lib.MSBuild.Task nuget package
|
||||
- dotnet restore CinemaJellyfin/CinemaJellyfin.csproj
|
||||
- wget https://www.ivasoft.cz/share/ILRepack.Lib.MSBuild.Task.dll -O /root/.nuget/packages/ilrepack.lib.msbuild.task/2.0.34.2/build/ILRepack.Lib.MSBuild.Task.dll
|
||||
# END HACK
|
||||
- dotnet build --configuration Release CinemaJellyfin/CinemaJellyfin.csproj
|
||||
- dotnet publish -c Release -o out
|
||||
|
||||
- name: obfuscate
|
||||
image: git.ivasoft.cz/sw/docker-wine-dotnet
|
||||
commands:
|
||||
- wine Eazfuscator.NET.exe CinemaJellyfin/bin/Release/net8.0/CinemaJellyfin.dll -k key.snk -n --newline-flush
|
||||
#when:
|
||||
# event: tag
|
||||
|
||||
- name: gitea_release
|
||||
image: plugins/gitea-release
|
||||
settings:
|
||||
api_key:
|
||||
from_secret: drone_release
|
||||
base_url: https://git.exprojekt.cz
|
||||
files: 'CinemaJellyfin/bin/Release/net8.0/CinemaJellyfin.dll'
|
||||
when:
|
||||
event: tag
|
||||
|
||||
- name: docker
|
||||
image: plugins/docker
|
||||
settings:
|
||||
|
||||
5
CinemaJellyfin/AssemblyInfo.cs
Normal file
5
CinemaJellyfin/AssemblyInfo.cs
Normal file
@@ -0,0 +1,5 @@
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: Obfuscation(Feature = "encrypt symbol names with password 458310E8B81C11EFACB6071FE769D992", Exclude = false)]
|
||||
[assembly: Obfuscation(Feature = "2. Apply to type CinemaLib.API.Metadata: apply to member * when method or property or constructor: virtualization", Exclude = false)]
|
||||
[assembly: Obfuscation(Feature = "2. Apply to type CinemaLib.Webshare.*: apply to member * when method or property or constructor: virtualization", Exclude = false)]
|
||||
@@ -1,9 +1,12 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<AssemblyOriginatorKeyFile>..\key.snk</AssemblyOriginatorKeyFile>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<Type>library</Type>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -12,6 +15,8 @@
|
||||
<!--ProjectReference Include="..\..\..\jellyfin/MediaBrowser.Controller\MediaBrowser.Controller.csproj" /-->
|
||||
<PackageReference Include="Jellyfin.Model" Version="10.10.3" />
|
||||
<!--ProjectReference Include="..\..\..\jellyfin\MediaBrowser.Model\MediaBrowser.Model.csproj" /-->
|
||||
|
||||
<PackageReference Include="ILRepack.Lib.MSBuild.Task" Version="2.0.34.2" PrivateAssets="All"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -18,12 +18,9 @@ using Microsoft.Extensions.Primitives;
|
||||
using CinemaLib.API;
|
||||
using MediaBrowser.Controller;
|
||||
using MediaBrowser.Controller.MediaEncoding;
|
||||
using MediaBrowser.Model.Dlna;
|
||||
using System.Runtime.CompilerServices;
|
||||
using LinkGenerator = Cinema.Webshare.LinkGenerator;
|
||||
using MediaBrowser.Common.Net;
|
||||
using LinkGenerator = CinemaLib.Webshare.LinkGenerator;
|
||||
using MediaBrowser.Controller.Configuration;
|
||||
using MediaBrowser.Common.Configuration;
|
||||
|
||||
namespace Jellyfin.Plugin.Cinema;
|
||||
|
||||
|
||||
23
CinemaJellyfin/ILRepack.targets
Normal file
23
CinemaJellyfin/ILRepack.targets
Normal file
@@ -0,0 +1,23 @@
|
||||
<Project>
|
||||
<Target Name="ILRepackCustom" AfterTargets="Build" Condition="$(Configuration.Contains('Release'))">
|
||||
<ItemGroup>
|
||||
<AssembliesToMerge Include="$(OutputPath)CinemaLib.dll"/>
|
||||
<InputAssemblies Include="$(OutputPath)$(TargetName)$(TargetExt)"/>
|
||||
<InputAssemblies Include="@(AssembliesToMerge)"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ILRepack
|
||||
Parallel="true"
|
||||
DebugInfo="true"
|
||||
AllowDuplicateResources="false"
|
||||
Internalize="true"
|
||||
InputAssemblies="@(InputAssemblies)"
|
||||
TargetKind="SameAsPrimaryAssembly"
|
||||
KeyFile="$(AssemblyOriginatorKeyFile)"
|
||||
OutputFile="$(OutputPath)$(TargetName)$(TargetExt)"
|
||||
LibraryPath="$(MSBuildExtensionsPath)..\..\shared\Microsoft.AspNetCore.App\9.0.0"
|
||||
/>
|
||||
|
||||
<Delete Files="@(AssembliesToMerge)"/>
|
||||
</Target>
|
||||
</Project>
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<!--OutputType>Exe</OutputType-->
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using System;
|
||||
using Cinema.Webshare;
|
||||
using CinemaLib.Webshare;
|
||||
|
||||
class Program
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@ using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Xml;
|
||||
|
||||
namespace Cinema.Webshare;
|
||||
namespace CinemaLib.Webshare;
|
||||
|
||||
static class ApiExtensions {
|
||||
private static readonly BaseEncoding UnixMD5 = new BaseEncoding("./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", false);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.Text;
|
||||
|
||||
namespace Cinema.Webshare;
|
||||
namespace CinemaLib.Webshare;
|
||||
|
||||
/// <summary>
|
||||
/// Performs generic binary-to-text encoding.
|
||||
|
||||
@@ -2,9 +2,8 @@ using System;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Xml;
|
||||
using CinemaLib.Webshare;
|
||||
|
||||
namespace Cinema.Webshare;
|
||||
namespace CinemaLib.Webshare;
|
||||
|
||||
public static class LinkGenerator
|
||||
{
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Xml;
|
||||
using Cinema.Webshare;
|
||||
|
||||
namespace CinemaLib.Webshare;
|
||||
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
using System;
|
||||
using System.Web;
|
||||
using Microsoft.Extensions.Primitives;
|
||||
using Cinema.Webshare;
|
||||
using CinemaLib.API;
|
||||
using CinemaWeb.Layouts;
|
||||
using LinkGenerator = Cinema.Webshare.LinkGenerator;
|
||||
using LinkGenerator = CinemaLib.Webshare.LinkGenerator;
|
||||
|
||||
namespace CinemaWeb.Pages;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user