From 767cdc1f6f6a63ce997fc9476911e2c361f9d402 Mon Sep 17 00:00:00 2001 From: LukePulverenti Date: Wed, 20 Feb 2013 20:33:05 -0500 Subject: Pushing missing changes --- TestPlugin/Entities/MyPluginFolder.cs | 26 ++++++++++++++ TestPlugin/MyStrings.cs | 24 +++++++++++++ TestPlugin/Plugin.cs | 27 ++++++++++++++ TestPlugin/Properties/AssemblyInfo.cs | 36 +++++++++++++++++++ TestPlugin/TestPlugin.csproj | 68 +++++++++++++++++++++++++++++++++++ TestPlugin/TestPlugin.sln | 20 +++++++++++ 6 files changed, 201 insertions(+) create mode 100644 TestPlugin/Entities/MyPluginFolder.cs create mode 100644 TestPlugin/MyStrings.cs create mode 100644 TestPlugin/Plugin.cs create mode 100644 TestPlugin/Properties/AssemblyInfo.cs create mode 100644 TestPlugin/TestPlugin.csproj create mode 100644 TestPlugin/TestPlugin.sln (limited to 'TestPlugin') diff --git a/TestPlugin/Entities/MyPluginFolder.cs b/TestPlugin/Entities/MyPluginFolder.cs new file mode 100644 index 0000000000..12845bdba2 --- /dev/null +++ b/TestPlugin/Entities/MyPluginFolder.cs @@ -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); + } + } +} diff --git a/TestPlugin/MyStrings.cs b/TestPlugin/MyStrings.cs new file mode 100644 index 0000000000..385793b0bd --- /dev/null +++ b/TestPlugin/MyStrings.cs @@ -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"; + } +} diff --git a/TestPlugin/Plugin.cs b/TestPlugin/Plugin.cs new file mode 100644 index 0000000000..2c878604be --- /dev/null +++ b/TestPlugin/Plugin.cs @@ -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."); + } + } +} diff --git a/TestPlugin/Properties/AssemblyInfo.cs b/TestPlugin/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..94b42ea7af --- /dev/null +++ b/TestPlugin/Properties/AssemblyInfo.cs @@ -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.*")] diff --git a/TestPlugin/TestPlugin.csproj b/TestPlugin/TestPlugin.csproj new file mode 100644 index 0000000000..bab0050736 --- /dev/null +++ b/TestPlugin/TestPlugin.csproj @@ -0,0 +1,68 @@ + + + + + Debug + AnyCPU + {C454798C-D4AE-4E6E-A0B6-274EF13BCE65} + Library + Properties + TestPlugin + TestPlugin + v4.5 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\MediaBrowser.Common\bin\Debug\MediaBrowser.Common.dll + + + ..\MediaBrowser.Controller\bin\Debug\MediaBrowser.Controller.dll + + + ..\MediaBrowser.Model\bin\Debug\MediaBrowser.Model.dll + + + + + + + + + + + + + + + + + + + xcopy "$(TargetPath)" "$(SolutionDir)\..\ProgramData-Server\Plugins\" /y + + + \ No newline at end of file diff --git a/TestPlugin/TestPlugin.sln b/TestPlugin/TestPlugin.sln new file mode 100644 index 0000000000..6e3fa8af01 --- /dev/null +++ b/TestPlugin/TestPlugin.sln @@ -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 -- cgit v1.2.3