This commit is contained in:
22
.drone.yml
22
.drone.yml
@@ -5,8 +5,30 @@ steps:
|
|||||||
- name: build
|
- name: build
|
||||||
image: mcr.microsoft.com/dotnet/sdk:9.0
|
image: mcr.microsoft.com/dotnet/sdk:9.0
|
||||||
commands:
|
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
|
- 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
|
- name: docker
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
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">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net9.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
|
<AssemblyOriginatorKeyFile>..\key.snk</AssemblyOriginatorKeyFile>
|
||||||
|
<SignAssembly>true</SignAssembly>
|
||||||
|
<Type>library</Type>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -12,6 +15,8 @@
|
|||||||
<!--ProjectReference Include="..\..\..\jellyfin/MediaBrowser.Controller\MediaBrowser.Controller.csproj" /-->
|
<!--ProjectReference Include="..\..\..\jellyfin/MediaBrowser.Controller\MediaBrowser.Controller.csproj" /-->
|
||||||
<PackageReference Include="Jellyfin.Model" Version="10.10.3" />
|
<PackageReference Include="Jellyfin.Model" Version="10.10.3" />
|
||||||
<!--ProjectReference Include="..\..\..\jellyfin\MediaBrowser.Model\MediaBrowser.Model.csproj" /-->
|
<!--ProjectReference Include="..\..\..\jellyfin\MediaBrowser.Model\MediaBrowser.Model.csproj" /-->
|
||||||
|
|
||||||
|
<PackageReference Include="ILRepack.Lib.MSBuild.Task" Version="2.0.34.2" PrivateAssets="All"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -18,12 +18,9 @@ using Microsoft.Extensions.Primitives;
|
|||||||
using CinemaLib.API;
|
using CinemaLib.API;
|
||||||
using MediaBrowser.Controller;
|
using MediaBrowser.Controller;
|
||||||
using MediaBrowser.Controller.MediaEncoding;
|
using MediaBrowser.Controller.MediaEncoding;
|
||||||
using MediaBrowser.Model.Dlna;
|
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
using LinkGenerator = Cinema.Webshare.LinkGenerator;
|
using LinkGenerator = CinemaLib.Webshare.LinkGenerator;
|
||||||
using MediaBrowser.Common.Net;
|
|
||||||
using MediaBrowser.Controller.Configuration;
|
using MediaBrowser.Controller.Configuration;
|
||||||
using MediaBrowser.Common.Configuration;
|
|
||||||
|
|
||||||
namespace Jellyfin.Plugin.Cinema;
|
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>
|
<PropertyGroup>
|
||||||
<!--OutputType>Exe</OutputType-->
|
<!--OutputType>Exe</OutputType-->
|
||||||
<TargetFramework>net9.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
using Cinema.Webshare;
|
using CinemaLib.Webshare;
|
||||||
|
|
||||||
class Program
|
class Program
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ using System.Security.Cryptography;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
|
|
||||||
namespace Cinema.Webshare;
|
namespace CinemaLib.Webshare;
|
||||||
|
|
||||||
static class ApiExtensions {
|
static class ApiExtensions {
|
||||||
private static readonly BaseEncoding UnixMD5 = new BaseEncoding("./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", false);
|
private static readonly BaseEncoding UnixMD5 = new BaseEncoding("./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", false);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace Cinema.Webshare;
|
namespace CinemaLib.Webshare;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Performs generic binary-to-text encoding.
|
/// Performs generic binary-to-text encoding.
|
||||||
|
|||||||
@@ -2,9 +2,8 @@ using System;
|
|||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
using CinemaLib.Webshare;
|
|
||||||
|
|
||||||
namespace Cinema.Webshare;
|
namespace CinemaLib.Webshare;
|
||||||
|
|
||||||
public static class LinkGenerator
|
public static class LinkGenerator
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
using Cinema.Webshare;
|
|
||||||
|
|
||||||
namespace CinemaLib.Webshare;
|
namespace CinemaLib.Webshare;
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using Microsoft.Extensions.Primitives;
|
using Microsoft.Extensions.Primitives;
|
||||||
using Cinema.Webshare;
|
|
||||||
using CinemaLib.API;
|
|
||||||
using CinemaWeb.Layouts;
|
using CinemaWeb.Layouts;
|
||||||
using LinkGenerator = Cinema.Webshare.LinkGenerator;
|
using LinkGenerator = CinemaLib.Webshare.LinkGenerator;
|
||||||
|
|
||||||
namespace CinemaWeb.Pages;
|
namespace CinemaWeb.Pages;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user