update config page

This commit is contained in:
Luke Pulverenti
2016-09-11 20:12:59 -04:00
parent c052019a04
commit bafedc2784
7 changed files with 276 additions and 123 deletions
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<solution>
<add key="disableSourceControlIntegration" value="true" />
</solution>
</configuration>
Binary file not shown.
+144
View File
@@ -0,0 +1,144 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\</SolutionDir>
<!-- Enable the restore command to run before builds -->
<RestorePackages Condition=" '$(RestorePackages)' == '' ">false</RestorePackages>
<!-- Property that enables building a package from a project -->
<BuildPackage Condition=" '$(BuildPackage)' == '' ">false</BuildPackage>
<!-- Determines if package restore consent is required to restore packages -->
<RequireRestoreConsent Condition=" '$(RequireRestoreConsent)' != 'false' ">true</RequireRestoreConsent>
<!-- Download NuGet.exe if it does not already exist -->
<DownloadNuGetExe Condition=" '$(DownloadNuGetExe)' == '' ">false</DownloadNuGetExe>
</PropertyGroup>
<ItemGroup Condition=" '$(PackageSources)' == '' ">
<!-- Package sources used to restore packages. By default, registered sources under %APPDATA%\NuGet\NuGet.Config will be used -->
<!-- The official NuGet package source (https://www.nuget.org/api/v2/) will be excluded if package sources are specified and it does not appear in the list -->
<!--
<PackageSource Include="https://www.nuget.org/api/v2/" />
<PackageSource Include="https://my-nuget-source/nuget/" />
-->
</ItemGroup>
<PropertyGroup Condition=" '$(OS)' == 'Windows_NT'">
<!-- Windows specific commands -->
<NuGetToolsPath>$([System.IO.Path]::Combine($(SolutionDir), ".nuget"))</NuGetToolsPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(OS)' != 'Windows_NT'">
<!-- We need to launch nuget.exe with the mono command if we're not on windows -->
<NuGetToolsPath>$(SolutionDir).nuget</NuGetToolsPath>
</PropertyGroup>
<PropertyGroup>
<PackagesProjectConfig Condition=" '$(OS)' == 'Windows_NT'">$(MSBuildProjectDirectory)\packages.$(MSBuildProjectName.Replace(' ', '_')).config</PackagesProjectConfig>
<PackagesProjectConfig Condition=" '$(OS)' != 'Windows_NT'">$(MSBuildProjectDirectory)\packages.$(MSBuildProjectName).config</PackagesProjectConfig>
</PropertyGroup>
<PropertyGroup>
<PackagesConfig Condition="Exists('$(MSBuildProjectDirectory)\packages.config')">$(MSBuildProjectDirectory)\packages.config</PackagesConfig>
<PackagesConfig Condition="Exists('$(PackagesProjectConfig)')">$(PackagesProjectConfig)</PackagesConfig>
</PropertyGroup>
<PropertyGroup>
<!-- NuGet command -->
<NuGetExePath Condition=" '$(NuGetExePath)' == '' ">$(NuGetToolsPath)\NuGet.exe</NuGetExePath>
<PackageSources Condition=" $(PackageSources) == '' ">@(PackageSource)</PackageSources>
<NuGetCommand Condition=" '$(OS)' == 'Windows_NT'">"$(NuGetExePath)"</NuGetCommand>
<NuGetCommand Condition=" '$(OS)' != 'Windows_NT' ">mono --runtime=v4.0.30319 "$(NuGetExePath)"</NuGetCommand>
<PackageOutputDir Condition="$(PackageOutputDir) == ''">$(TargetDir.Trim('\\'))</PackageOutputDir>
<RequireConsentSwitch Condition=" $(RequireRestoreConsent) == 'true' ">-RequireConsent</RequireConsentSwitch>
<NonInteractiveSwitch Condition=" '$(VisualStudioVersion)' != '' AND '$(OS)' == 'Windows_NT' ">-NonInteractive</NonInteractiveSwitch>
<PaddedSolutionDir Condition=" '$(OS)' == 'Windows_NT'">"$(SolutionDir) "</PaddedSolutionDir>
<PaddedSolutionDir Condition=" '$(OS)' != 'Windows_NT' ">"$(SolutionDir)"</PaddedSolutionDir>
<!-- Commands -->
<RestoreCommand>$(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir $(PaddedSolutionDir)</RestoreCommand>
<BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -Properties "Configuration=$(Configuration);Platform=$(Platform)" $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols</BuildCommand>
<!-- We need to ensure packages are restored prior to assembly resolve -->
<BuildDependsOn Condition="$(RestorePackages) == 'true'">
RestorePackages;
$(BuildDependsOn);
</BuildDependsOn>
<!-- Make the build depend on restore packages -->
<BuildDependsOn Condition="$(BuildPackage) == 'true'">
$(BuildDependsOn);
BuildPackage;
</BuildDependsOn>
</PropertyGroup>
<Target Name="CheckPrerequisites">
<!-- Raise an error if we're unable to locate nuget.exe -->
<Error Condition="'$(DownloadNuGetExe)' != 'true' AND !Exists('$(NuGetExePath)')" Text="Unable to locate '$(NuGetExePath)'" />
<!--
Take advantage of MsBuild's build dependency tracking to make sure that we only ever download nuget.exe once.
This effectively acts as a lock that makes sure that the download operation will only happen once and all
parallel builds will have to wait for it to complete.
-->
<MsBuild Targets="_DownloadNuGet" Projects="$(MSBuildThisFileFullPath)" Properties="Configuration=NOT_IMPORTANT;DownloadNuGetExe=$(DownloadNuGetExe)" />
</Target>
<Target Name="_DownloadNuGet">
<DownloadNuGet OutputFilename="$(NuGetExePath)" Condition=" '$(DownloadNuGetExe)' == 'true' AND !Exists('$(NuGetExePath)')" />
</Target>
<Target Name="RestorePackages" DependsOnTargets="CheckPrerequisites">
<Exec Command="$(RestoreCommand)"
Condition="'$(OS)' != 'Windows_NT' And Exists('$(PackagesConfig)')" />
<Exec Command="$(RestoreCommand)"
LogStandardErrorAsError="true"
Condition="'$(OS)' == 'Windows_NT' And Exists('$(PackagesConfig)')" />
</Target>
<Target Name="BuildPackage" DependsOnTargets="CheckPrerequisites">
<Exec Command="$(BuildCommand)"
Condition=" '$(OS)' != 'Windows_NT' " />
<Exec Command="$(BuildCommand)"
LogStandardErrorAsError="true"
Condition=" '$(OS)' == 'Windows_NT' " />
</Target>
<UsingTask TaskName="DownloadNuGet" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
<ParameterGroup>
<OutputFilename ParameterType="System.String" Required="true" />
</ParameterGroup>
<Task>
<Reference Include="System.Core" />
<Using Namespace="System" />
<Using Namespace="System.IO" />
<Using Namespace="System.Net" />
<Using Namespace="Microsoft.Build.Framework" />
<Using Namespace="Microsoft.Build.Utilities" />
<Code Type="Fragment" Language="cs">
<![CDATA[
try {
OutputFilename = Path.GetFullPath(OutputFilename);
Log.LogMessage("Downloading latest version of NuGet.exe...");
WebClient webClient = new WebClient();
webClient.DownloadFile("https://www.nuget.org/nuget.exe", OutputFilename);
return true;
}
catch (Exception ex) {
Log.LogErrorFromException(ex);
return false;
}
]]>
</Code>
</Task>
</UsingTask>
</Project>
+102 -107
View File
@@ -4,122 +4,117 @@
<title>Vu+</title> <title>Vu+</title>
</head> </head>
<body> <body>
<div data-role="page" class="page type-interior pluginConfigurationPage VuPlusConfigurationPage"> <div data-role="page" class="page type-interior pluginConfigurationPage VuPlusConfigurationPage" data-require="emby-button,emby-checkbox,emby-input">
<div data-role="content"> <div data-role="content">
<div class="content-primary"> <div class="content-primary">
<h1>VuPlus</h1>
<form class="VuPlusConfigurationForm"> <form class="VuPlusConfigurationForm">
<ul class="ulForm" data-role="listview"> <div class="inputContainer">
<li> <input is="emby-input" id="txtHostName" type="text" label="Vu+ hostname or ip address:" />
<label for="txtHostName">Vu+ hostname or ip address:</label> <div class="fieldDescription">
<input type="text" id="txtHostName" name="txtHostName" /> The host name (address) or ip address of your receiver
<div class="fieldDescription"> </div>
The host name (address) or ip address of your receiver </div>
</div> <div class="inputContainer">
</li> <input is="emby-input" id="txtStreamingPort" type="text" label="Vu+ streaming port:" />
<li> <div class="fieldDescription">
<label for="txtStreamingPort">Vu+ streaming port:</label> The Streaming port of your receiver eg. 8001
<input type="text" id="txtStreamingPort" name="txtStreamingPort" /> </div>
<div class="fieldDescription"> </div>
The Streaming port of your receiver eg. 8001 <div class="inputContainer">
</div> <input is="emby-input" id="txtWebInterfacePort" type="text" label="Vu+ Web Interface port:" />
</li> <div class="fieldDescription">
<li> The web Interface port of your receiver eg. 8000
<label for="txtWebInterfacePort">Vu+ Web Interface port:</label> </div>
<input type="text" id="txtWebInterfacePort" name="txtWebInterfacePort" /> </div>
<div class="fieldDescription"> <div class="inputContainer">
The web Interface port of your receiver eg. 8000 <input is="emby-input" id="txtWebInterfaceUsername" type="text" label="Vu+ Web Interface username:" />
</div> <div class="fieldDescription">
</li> The web Interface username of your receiver (optional)
<li> </div>
<label for="txtWebInterfaceUsername">Vu+ Web Interface username:</label> </div>
<input type="text" id="txtWebInterfaceUsername" name="txtWebInterfaceUsername" /> <div class="inputContainer">
<div class="fieldDescription"> <input is="emby-input" id="txtWebInterfacePassword" type="text" label="Vu+ Web Interface password:" />
The web Interface username of your receiver (optional) <div class="fieldDescription">
</div> The web Interface password of your receiver (optional)
</li> </div>
<li> </div>
<label for="txtWebInterfacePassword">Vu+ Web Interface password:</label>
<input type="text" id="txtWebInterfacePassword" name="txtWebInterfacePassword" />
<div class="fieldDescription">
The web Interface password of your receiver (optional)
</div>
</li>
<li> <div class="checkboxContainer checkboxContainer-withDescription">
<label for="chkUseSecureHTTPS">Use secure HTTP (HTTPS)</label> <label>
<input type="checkbox" id="chkUseSecureHTTPS" data-mini="true" /> <input is="emby-checkbox" type="checkbox" id="chkUseSecureHTTPS" />
<div class="fieldDescription"> <span>Use secure HTTP (HTTPS)</span>
Use HTTPS to connect to your receiver </label>
</div> <div class="fieldDescription checkboxFieldDescription">
</li> Use HTTPS to connect to your receiver
</div>
</div>
<div class="checkboxContainer checkboxContainer-withDescription">
<label>
<input is="emby-checkbox" type="checkbox" id="chkOnlyOneBouquet" />
<span>Fetch Only one TV bouquet</span>
</label>
<div class="fieldDescription checkboxFieldDescription">
Limit channels to only those contained within the specified TV Bouquet below (optional)
</div>
</div>
<li> <div class="inputContainer">
<label for="chkOnlyOneBouquet">Fetch Only one TV bouquet</label> <input is="emby-input" id="txtTVBouquet" type="text" label="Vu+ TVBouquet:" />
<input type="checkbox" id="chkOnlyOneBouquet" data-mini="true" /> <div class="fieldDescription">
<div class="fieldDescription"> The TV Bouquet to load channels for (optional)
Limit channels to only those contained within the specified TV Bouquet below (optional) </div>
</div> </div>
</li>
<div class="checkboxContainer checkboxContainer-withDescription">
<label>
<input is="emby-checkbox" type="checkbox" id="chkZapToChannel" />
<span>Zap before Channel switch (single tuner)</span>
</label>
<div class="fieldDescription checkboxFieldDescription">
Set if only one tuner within receiver
</div>
</div>
<div class="checkboxContainer checkboxContainer-withDescription">
<label>
<input is="emby-checkbox" type="checkbox" id="chkFetchPiconsFromWebInterface" />
<span>Fetch picons from webinterface</span>
</label>
<div class="fieldDescription checkboxFieldDescription">
Set if you want to retrieve Picons from the web interface of the receiver
</div>
</div>
<li> <div class="inputContainer">
<label for="txtTVBouquet">Vu+ TVBouquet:</label> <input is="emby-input" id="txtPiconsPath" type="text" label="Picons Path:" />
<input type="text" id="txtTVBouquet" name="txtTVBouquet" /> <div class="fieldDescription">
<div class="fieldDescription"> The local location of your Picons eg. C:\Picons\ (optional)
The TV Bouquet to load channels for (optional) </div>
</div> </div>
</li> <div class="inputContainer">
<input is="emby-input" id="txtRecordingPath" type="text" label="Recording Path:" />
<div class="fieldDescription">
The location to store your recordings on your receiver eg. /hdd/movie/ (optional)
</div>
</div>
<li> <label class="checkboxContainer">
<label for="chkZapToChannel">Zap before Channel switch (single tuner)</label> <input is="emby-checkbox" type="checkbox" id="chkDebugLogging" />
<input type="checkbox" id="chkZapToChannel" data-mini="true" /> <span>Enable VuPlus debug logging</span>
<div class="fieldDescription"> </label>
Set if only one tuner within receiver
</div>
</li>
<div>
<button is="emby-button" type="submit" class="raised button-submit block"><span>Save</span></button>
<li> </div>
<label for="chkFetchPiconsFromWebInterface">Fetch picons from webinterface</label>
<input type="checkbox" id="chkFetchPiconsFromWebInterface" data-mini="true" />
<div class="fieldDescription">
Set if you want to retrieve Picons from the web interface of the receiver
</div>
</li>
<li>
<label for="txtPiconsPath">Picons Path:</label>
<input type="text" id="txtPiconsPath" name="txtPiconsPath" />
<div class="fieldDescription">
The local location of your Picons eg. C:\Picons\ (optional)
</div>
</li>
<li>
<label for="txtRecordingPath">Recording Path:</label>
<input type="text" id="txtRecordingPath" name="txtRecordingPath" />
<div class="fieldDescription">
The location to store your recordings on your receiver eg. /hdd/movie/ (optional)
</div>
</li>
<li>
<label for="chkDebugLogging">Enable VuPlus debug logging</label>
<input type="checkbox" id="chkDebugLogging" data-mini="true" />
</li>
<li>
<button type="submit" data-theme="b">Save</button>
<button type="button" onclick="history.back();">Cancel</button>
</li>
</ul>
</form> </form>
</div> </div>
@@ -130,7 +125,7 @@
var VuPlusConfigurationPage = { var VuPlusConfigurationPage = {
pluginUniqueId: "9564ac10-af23-39bc-449f-624f23cfa48f" pluginUniqueId: "9564ac10-af23-39bc-449f-624f23cfa48f"
}; };
$('.VuPlusConfigurationPage').on('pageshow', function (event) { $('.VuPlusConfigurationPage').on('pageshow', function (event) {
@@ -138,7 +133,7 @@
var page = this; var page = this;
ApiClient.getPluginConfiguration(VuPlusConfigurationPage.pluginUniqueId).done(function (config) { ApiClient.getPluginConfiguration(VuPlusConfigurationPage.pluginUniqueId).then(function (config) {
$('#txtHostName', page).val(config.HostName || ""); $('#txtHostName', page).val(config.HostName || "");
$('#txtStreamingPort', page).val(config.StreamingPort || ""); $('#txtStreamingPort', page).val(config.StreamingPort || "");
@@ -166,7 +161,7 @@
var form = this; var form = this;
ApiClient.getPluginConfiguration(VuPlusConfigurationPage.pluginUniqueId).done(function (config) { ApiClient.getPluginConfiguration(VuPlusConfigurationPage.pluginUniqueId).then(function (config) {
//reset TV bouquet reference if TV Bouquet changed //reset TV bouquet reference if TV Bouquet changed
//if (config.TVBouquet != $('#txtTVBouquet', form).val()) { //if (config.TVBouquet != $('#txtTVBouquet', form).val()) {
@@ -197,7 +192,7 @@
config.EnableDebugLogging = $('#chkDebugLogging', form).checked(); config.EnableDebugLogging = $('#chkDebugLogging', form).checked();
ApiClient.updatePluginConfiguration(VuPlusConfigurationPage.pluginUniqueId, config).done(Dashboard.processPluginConfigurationUpdateResult); ApiClient.updatePluginConfiguration(VuPlusConfigurationPage.pluginUniqueId, config).then(Dashboard.processPluginConfigurationUpdateResult);
}); });
// Disable default form submission // Disable default form submission
+14 -11
View File
@@ -32,17 +32,20 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="MediaBrowser.Common, Version=3.0.5518.28641, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Interfaces.IO">
<SpecificVersion>False</SpecificVersion> <HintPath>packages\Interfaces.IO.1.0.0.5\lib\portable-net45+sl4+wp71+win8+wpa81\Interfaces.IO.dll</HintPath>
<HintPath>..\packages\MediaBrowser.Common.3.0.566\lib\net45\MediaBrowser.Common.dll</HintPath>
</Reference> </Reference>
<Reference Include="MediaBrowser.Controller, Version=3.0.5518.28640, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="MediaBrowser.Common, Version=3.1.6096.27920, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <HintPath>packages\MediaBrowser.Common.3.0.658\lib\net45\MediaBrowser.Common.dll</HintPath>
<HintPath>..\packages\MediaBrowser.Server.Core.3.0.566\lib\net45\MediaBrowser.Controller.dll</HintPath> <Private>True</Private>
</Reference> </Reference>
<Reference Include="MediaBrowser.Model, Version=3.0.5518.28642, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="MediaBrowser.Controller, Version=3.1.6096.27919, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <HintPath>packages\MediaBrowser.Server.Core.3.0.658\lib\net45\MediaBrowser.Controller.dll</HintPath>
<HintPath>..\packages\MediaBrowser.Common.3.0.566\lib\net45\MediaBrowser.Model.dll</HintPath> <Private>True</Private>
</Reference>
<Reference Include="MediaBrowser.Model, Version=3.1.6096.27920, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\MediaBrowser.Common.3.0.658\lib\net45\MediaBrowser.Model.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
@@ -53,7 +56,7 @@
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="..\SharedVersion.cs"> <Compile Include="..\..\Emby.Plugins\SharedVersion.cs">
<Link>Properties\SharedVersion.cs</Link> <Link>Properties\SharedVersion.cs</Link>
</Compile> </Compile>
<Compile Include="Configuration\VuPlusConfigurationPage.cs" /> <Compile Include="Configuration\VuPlusConfigurationPage.cs" />
@@ -76,7 +79,7 @@
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" /> <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
<PropertyGroup> <PropertyGroup>
<PostBuildEvent>xcopy "$(TargetPath)" "$(SolutionDir)\..\MediaBrowser\ProgramData-Server\Plugins\" /y</PostBuildEvent> <PostBuildEvent>xcopy "$(TargetPath)" "$(SolutionDir)\..\..\Emby.dev\ProgramData-Server\Plugins\" /y</PostBuildEvent>
</PropertyGroup> </PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- 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. Other similar extension points exist, see Microsoft.Common.targets.
+3 -2
View File
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="MediaBrowser.Common" version="1.0.0.0" targetFramework="net45" /> <package id="Interfaces.IO" version="1.0.0.5" targetFramework="net45" />
<package id="MediaBrowser.Server.Core" version="1.0.0.0" targetFramework="net45" /> <package id="MediaBrowser.Common" version="3.0.658" targetFramework="net45" />
<package id="MediaBrowser.Server.Core" version="3.0.658" targetFramework="net45" />
</packages> </packages>
+4
View File
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<repositories>
<repository path="..\packages.config" />
</repositories>