mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-03 06:18:28 +01:00
Pushing missing changes
This commit is contained in:
26
TestPlugin/Entities/MyPluginFolder.cs
Normal file
26
TestPlugin/Entities/MyPluginFolder.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.ComponentModel.Composition;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Common.Extensions;
|
||||
|
||||
namespace TestPlugin.Entities
|
||||
{
|
||||
[Export(typeof(BasePluginFolder))]
|
||||
public class MyPluginFolder : BasePluginFolder
|
||||
{
|
||||
public MyPluginFolder()
|
||||
{
|
||||
Name = "Test Plug-in Folder";
|
||||
Id = (GetType().FullName + Name.ToLower()).GetMD5();
|
||||
}
|
||||
|
||||
public override bool IsVisible(User user)
|
||||
{
|
||||
return base.IsVisible(user) && user.Name.Equals("Abobader", StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
}
|
||||
}
|
||||
24
TestPlugin/MyStrings.cs
Normal file
24
TestPlugin/MyStrings.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.ComponentModel.Composition;
|
||||
using MediaBrowser.Common.Localization;
|
||||
|
||||
namespace TestPlugin
|
||||
{
|
||||
[Export(typeof(LocalizedStringData))]
|
||||
public class MyStrings : LocalizedStringData
|
||||
{
|
||||
public MyStrings() : base()
|
||||
{
|
||||
ThisVersion = "1.0001";
|
||||
Prefix = "TestPlugin-";
|
||||
}
|
||||
|
||||
public string TestPluginString1 = "This is string 1";
|
||||
public string TestPluginString2 = "This is string 2";
|
||||
public string TestPluginString3 = "This is string 3";
|
||||
}
|
||||
}
|
||||
27
TestPlugin/Plugin.cs
Normal file
27
TestPlugin/Plugin.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.ComponentModel.Composition;
|
||||
using MediaBrowser.Common.Plugins;
|
||||
using MediaBrowser.Common.Logging;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
|
||||
namespace TestPlugin
|
||||
{
|
||||
[Export(typeof(BasePlugin))]
|
||||
public class Plugin : BasePlugin
|
||||
{
|
||||
public override string Name
|
||||
{
|
||||
get { return "Test MB3 Plug-in"; }
|
||||
}
|
||||
|
||||
protected override void InitializeOnServer(bool isFirstRun)
|
||||
{
|
||||
base.InitializeOnServer(isFirstRun);
|
||||
Logger.LogDebugInfo("Test Plug-in Loaded.");
|
||||
}
|
||||
}
|
||||
}
|
||||
36
TestPlugin/Properties/AssemblyInfo.cs
Normal file
36
TestPlugin/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("TestPlugin")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Microsoft")]
|
||||
[assembly: AssemblyProduct("TestPlugin")]
|
||||
[assembly: AssemblyCopyright("Copyright © Microsoft 2012")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("fdd4eff1-87df-4b6c-adef-81d13ddde551")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.*")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.*")]
|
||||
68
TestPlugin/TestPlugin.csproj
Normal file
68
TestPlugin/TestPlugin.csproj
Normal file
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{C454798C-D4AE-4E6E-A0B6-274EF13BCE65}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>TestPlugin</RootNamespace>
|
||||
<AssemblyName>TestPlugin</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="MediaBrowser.Common">
|
||||
<HintPath>..\MediaBrowser.Common\bin\Debug\MediaBrowser.Common.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MediaBrowser.Controller">
|
||||
<HintPath>..\MediaBrowser.Controller\bin\Debug\MediaBrowser.Controller.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MediaBrowser.Model">
|
||||
<HintPath>..\MediaBrowser.Model\bin\Debug\MediaBrowser.Model.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.Composition" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Entities\MyPluginFolder.cs" />
|
||||
<Compile Include="MyStrings.cs" />
|
||||
<Compile Include="Plugin.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>xcopy "$(TargetPath)" "$(SolutionDir)\..\ProgramData-Server\Plugins\" /y</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
20
TestPlugin/TestPlugin.sln
Normal file
20
TestPlugin/TestPlugin.sln
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2012
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestPlugin", "TestPlugin.csproj", "{C454798C-D4AE-4E6E-A0B6-274EF13BCE65}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{C454798C-D4AE-4E6E-A0B6-274EF13BCE65}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C454798C-D4AE-4E6E-A0B6-274EF13BCE65}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C454798C-D4AE-4E6E-A0B6-274EF13BCE65}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C454798C-D4AE-4E6E-A0B6-274EF13BCE65}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
Reference in New Issue
Block a user