mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-10 15:32:37 -07:00
mre work
This commit is contained in:
parent
b9dd08a8bc
commit
003dd47e3c
13 changed files with 422 additions and 18 deletions
258
PlexRequests.Api/Models/PlexSearch.cs
Normal file
258
PlexRequests.Api/Models/PlexSearch.cs
Normal file
|
@ -0,0 +1,258 @@
|
|||
#region Copyright
|
||||
// /************************************************************************
|
||||
// Copyright (c) 2016 Jamie Rees
|
||||
// File: PlexSearch.cs
|
||||
// Created By: Jamie Rees
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
// ************************************************************************/
|
||||
#endregion
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace PlexRequests.Api.Models
|
||||
{
|
||||
[XmlRoot(ElementName = "Part")]
|
||||
public class Part
|
||||
{
|
||||
[XmlAttribute(AttributeName = "id")]
|
||||
public string Id { get; set; }
|
||||
[XmlAttribute(AttributeName = "key")]
|
||||
public string Key { get; set; }
|
||||
[XmlAttribute(AttributeName = "duration")]
|
||||
public string Duration { get; set; }
|
||||
[XmlAttribute(AttributeName = "file")]
|
||||
public string File { get; set; }
|
||||
[XmlAttribute(AttributeName = "size")]
|
||||
public string Size { get; set; }
|
||||
[XmlAttribute(AttributeName = "audioProfile")]
|
||||
public string AudioProfile { get; set; }
|
||||
[XmlAttribute(AttributeName = "container")]
|
||||
public string Container { get; set; }
|
||||
[XmlAttribute(AttributeName = "videoProfile")]
|
||||
public string VideoProfile { get; set; }
|
||||
[XmlAttribute(AttributeName = "has64bitOffsets")]
|
||||
public string Has64bitOffsets { get; set; }
|
||||
[XmlAttribute(AttributeName = "hasChapterTextStream")]
|
||||
public string HasChapterTextStream { get; set; }
|
||||
[XmlAttribute(AttributeName = "optimizedForStreaming")]
|
||||
public string OptimizedForStreaming { get; set; }
|
||||
}
|
||||
|
||||
[XmlRoot(ElementName = "Media")]
|
||||
public class Media
|
||||
{
|
||||
[XmlElement(ElementName = "Part")]
|
||||
public Part Part { get; set; }
|
||||
[XmlAttribute(AttributeName = "videoResolution")]
|
||||
public string VideoResolution { get; set; }
|
||||
[XmlAttribute(AttributeName = "id")]
|
||||
public string Id { get; set; }
|
||||
[XmlAttribute(AttributeName = "duration")]
|
||||
public string Duration { get; set; }
|
||||
[XmlAttribute(AttributeName = "bitrate")]
|
||||
public string Bitrate { get; set; }
|
||||
[XmlAttribute(AttributeName = "width")]
|
||||
public string Width { get; set; }
|
||||
[XmlAttribute(AttributeName = "height")]
|
||||
public string Height { get; set; }
|
||||
[XmlAttribute(AttributeName = "aspectRatio")]
|
||||
public string AspectRatio { get; set; }
|
||||
[XmlAttribute(AttributeName = "audioChannels")]
|
||||
public string AudioChannels { get; set; }
|
||||
[XmlAttribute(AttributeName = "audioCodec")]
|
||||
public string AudioCodec { get; set; }
|
||||
[XmlAttribute(AttributeName = "videoCodec")]
|
||||
public string VideoCodec { get; set; }
|
||||
[XmlAttribute(AttributeName = "container")]
|
||||
public string Container { get; set; }
|
||||
[XmlAttribute(AttributeName = "videoFrameRate")]
|
||||
public string VideoFrameRate { get; set; }
|
||||
[XmlAttribute(AttributeName = "audioProfile")]
|
||||
public string AudioProfile { get; set; }
|
||||
[XmlAttribute(AttributeName = "videoProfile")]
|
||||
public string VideoProfile { get; set; }
|
||||
[XmlAttribute(AttributeName = "optimizedForStreaming")]
|
||||
public string OptimizedForStreaming { get; set; }
|
||||
[XmlAttribute(AttributeName = "has64bitOffsets")]
|
||||
public string Has64bitOffsets { get; set; }
|
||||
}
|
||||
|
||||
[XmlRoot(ElementName = "Genre")]
|
||||
public class Genre
|
||||
{
|
||||
[XmlAttribute(AttributeName = "tag")]
|
||||
public string Tag { get; set; }
|
||||
}
|
||||
|
||||
[XmlRoot(ElementName = "Writer")]
|
||||
public class Writer
|
||||
{
|
||||
[XmlAttribute(AttributeName = "tag")]
|
||||
public string Tag { get; set; }
|
||||
}
|
||||
|
||||
[XmlRoot(ElementName = "Director")]
|
||||
public class Director
|
||||
{
|
||||
[XmlAttribute(AttributeName = "tag")]
|
||||
public string Tag { get; set; }
|
||||
}
|
||||
|
||||
[XmlRoot(ElementName = "Country")]
|
||||
public class Country
|
||||
{
|
||||
[XmlAttribute(AttributeName = "tag")]
|
||||
public string Tag { get; set; }
|
||||
}
|
||||
|
||||
[XmlRoot(ElementName = "Role")]
|
||||
public class Role
|
||||
{
|
||||
[XmlAttribute(AttributeName = "tag")]
|
||||
public string Tag { get; set; }
|
||||
}
|
||||
|
||||
[XmlRoot(ElementName = "Video")]
|
||||
public class Video
|
||||
{
|
||||
[XmlElement(ElementName = "Media")]
|
||||
public List<Media> Media { get; set; }
|
||||
[XmlElement(ElementName = "Genre")]
|
||||
public List<Genre> Genre { get; set; }
|
||||
[XmlElement(ElementName = "Writer")]
|
||||
public List<Writer> Writer { get; set; }
|
||||
[XmlElement(ElementName = "Director")]
|
||||
public Director Director { get; set; }
|
||||
[XmlElement(ElementName = "Country")]
|
||||
public Country Country { get; set; }
|
||||
[XmlElement(ElementName = "Role")]
|
||||
public List<Role> Role { get; set; }
|
||||
[XmlAttribute(AttributeName = "allowSync")]
|
||||
public string AllowSync { get; set; }
|
||||
[XmlAttribute(AttributeName = "librarySectionID")]
|
||||
public string LibrarySectionID { get; set; }
|
||||
[XmlAttribute(AttributeName = "librarySectionTitle")]
|
||||
public string LibrarySectionTitle { get; set; }
|
||||
[XmlAttribute(AttributeName = "librarySectionUUID")]
|
||||
public string LibrarySectionUUID { get; set; }
|
||||
[XmlAttribute(AttributeName = "personal")]
|
||||
public string Personal { get; set; }
|
||||
[XmlAttribute(AttributeName = "sourceTitle")]
|
||||
public string SourceTitle { get; set; }
|
||||
[XmlAttribute(AttributeName = "ratingKey")]
|
||||
public string RatingKey { get; set; }
|
||||
[XmlAttribute(AttributeName = "key")]
|
||||
public string Key { get; set; }
|
||||
[XmlAttribute(AttributeName = "studio")]
|
||||
public string Studio { get; set; }
|
||||
[XmlAttribute(AttributeName = "type")]
|
||||
public string Type { get; set; }
|
||||
[XmlAttribute(AttributeName = "title")]
|
||||
public string Title { get; set; }
|
||||
[XmlAttribute(AttributeName = "contentRating")]
|
||||
public string ContentRating { get; set; }
|
||||
[XmlAttribute(AttributeName = "summary")]
|
||||
public string Summary { get; set; }
|
||||
[XmlAttribute(AttributeName = "rating")]
|
||||
public string Rating { get; set; }
|
||||
[XmlAttribute(AttributeName = "audienceRating")]
|
||||
public string AudienceRating { get; set; }
|
||||
[XmlAttribute(AttributeName = "year")]
|
||||
public string Year { get; set; }
|
||||
[XmlAttribute(AttributeName = "tagline")]
|
||||
public string Tagline { get; set; }
|
||||
[XmlAttribute(AttributeName = "thumb")]
|
||||
public string Thumb { get; set; }
|
||||
[XmlAttribute(AttributeName = "art")]
|
||||
public string Art { get; set; }
|
||||
[XmlAttribute(AttributeName = "duration")]
|
||||
public string Duration { get; set; }
|
||||
[XmlAttribute(AttributeName = "originallyAvailableAt")]
|
||||
public string OriginallyAvailableAt { get; set; }
|
||||
[XmlAttribute(AttributeName = "addedAt")]
|
||||
public string AddedAt { get; set; }
|
||||
[XmlAttribute(AttributeName = "updatedAt")]
|
||||
public string UpdatedAt { get; set; }
|
||||
[XmlAttribute(AttributeName = "audienceRatingImage")]
|
||||
public string AudienceRatingImage { get; set; }
|
||||
[XmlAttribute(AttributeName = "chapterSource")]
|
||||
public string ChapterSource { get; set; }
|
||||
[XmlAttribute(AttributeName = "ratingImage")]
|
||||
public string RatingImage { get; set; }
|
||||
[XmlAttribute(AttributeName = "titleSort")]
|
||||
public string TitleSort { get; set; }
|
||||
[XmlAttribute(AttributeName = "parentRatingKey")]
|
||||
public string ParentRatingKey { get; set; }
|
||||
[XmlAttribute(AttributeName = "grandparentRatingKey")]
|
||||
public string GrandparentRatingKey { get; set; }
|
||||
[XmlAttribute(AttributeName = "grandparentKey")]
|
||||
public string GrandparentKey { get; set; }
|
||||
[XmlAttribute(AttributeName = "parentKey")]
|
||||
public string ParentKey { get; set; }
|
||||
[XmlAttribute(AttributeName = "grandparentTitle")]
|
||||
public string GrandparentTitle { get; set; }
|
||||
[XmlAttribute(AttributeName = "index")]
|
||||
public string Index { get; set; }
|
||||
[XmlAttribute(AttributeName = "parentIndex")]
|
||||
public string ParentIndex { get; set; }
|
||||
[XmlAttribute(AttributeName = "parentThumb")]
|
||||
public string ParentThumb { get; set; }
|
||||
[XmlAttribute(AttributeName = "grandparentThumb")]
|
||||
public string GrandparentThumb { get; set; }
|
||||
[XmlAttribute(AttributeName = "grandparentArt")]
|
||||
public string GrandparentArt { get; set; }
|
||||
[XmlAttribute(AttributeName = "viewCount")]
|
||||
public string ViewCount { get; set; }
|
||||
[XmlAttribute(AttributeName = "lastViewedAt")]
|
||||
public string LastViewedAt { get; set; }
|
||||
[XmlAttribute(AttributeName = "grandparentTheme")]
|
||||
public string GrandparentTheme { get; set; }
|
||||
}
|
||||
|
||||
[XmlRoot(ElementName = "Provider")]
|
||||
public class Provider
|
||||
{
|
||||
[XmlAttribute(AttributeName = "key")]
|
||||
public string Key { get; set; }
|
||||
[XmlAttribute(AttributeName = "title")]
|
||||
public string Title { get; set; }
|
||||
[XmlAttribute(AttributeName = "type")]
|
||||
public string Type { get; set; }
|
||||
}
|
||||
|
||||
[XmlRoot(ElementName = "MediaContainer")]
|
||||
public class PlexSearch
|
||||
{
|
||||
[XmlElement(ElementName = "Video")]
|
||||
public List<Video> Video { get; set; }
|
||||
[XmlElement(ElementName = "Provider")]
|
||||
public List<Provider> Provider { get; set; }
|
||||
[XmlAttribute(AttributeName = "size")]
|
||||
public string Size { get; set; }
|
||||
[XmlAttribute(AttributeName = "identifier")]
|
||||
public string Identifier { get; set; }
|
||||
[XmlAttribute(AttributeName = "mediaTagPrefix")]
|
||||
public string MediaTagPrefix { get; set; }
|
||||
[XmlAttribute(AttributeName = "mediaTagVersion")]
|
||||
public string MediaTagVersion { get; set; }
|
||||
}
|
||||
}
|
|
@ -85,6 +85,34 @@ namespace PlexRequests.Api
|
|||
|
||||
return users;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the users.
|
||||
/// </summary>
|
||||
/// <param name="authToken">The authentication token.</param>
|
||||
/// <param name="searchTerm">The search term.</param>
|
||||
/// <param name="plexFullHost">The full plex host.</param>
|
||||
/// <returns></returns>
|
||||
public PlexSearch SearchContent(string authToken, string searchTerm, Uri plexFullHost)
|
||||
{
|
||||
var request = new RestRequest
|
||||
{
|
||||
Method = Method.GET,
|
||||
Resource = "search?query={searchTerm}"
|
||||
};
|
||||
|
||||
request.AddUrlSegment("searchTerm", searchTerm);
|
||||
request.AddHeader("X-Plex-Client-Identifier", "Test213");
|
||||
request.AddHeader("X-Plex-Product", "Request Plex");
|
||||
request.AddHeader("X-Plex-Version", Version);
|
||||
request.AddHeader("X-Plex-Token", authToken);
|
||||
request.AddHeader("Content-Type", "application/xml");
|
||||
|
||||
var api = new ApiRequest();
|
||||
var search = api.ExecuteXml<PlexSearch>(request, plexFullHost);
|
||||
|
||||
return search;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -71,6 +71,7 @@
|
|||
<Compile Include="Models\PlexAuthentication.cs" />
|
||||
<Compile Include="Models\PlexError.cs" />
|
||||
<Compile Include="Models\PlexFriends.cs" />
|
||||
<Compile Include="Models\PlexSearch.cs" />
|
||||
<Compile Include="Models\PlexUserRequest.cs" />
|
||||
<Compile Include="Models\Tv\Authentication.cs" />
|
||||
<Compile Include="Models\Tv\TvSearchResult.cs" />
|
||||
|
|
|
@ -34,21 +34,22 @@ namespace PlexRequests.Core
|
|||
{
|
||||
public class Setup
|
||||
{
|
||||
|
||||
private static DbConfiguration Db { get; set; }
|
||||
public string SetupDb()
|
||||
{
|
||||
var db = new DbConfiguration(new SqliteFactory());
|
||||
var created = db.CheckDb();
|
||||
TableCreation.CreateTables(db.DbConnection());
|
||||
Db = new DbConfiguration(new SqliteFactory());
|
||||
var created = Db.CheckDb();
|
||||
TableCreation.CreateTables(Db.DbConnection());
|
||||
|
||||
if (created)
|
||||
{
|
||||
CreateDefaultSettingsPage();
|
||||
}
|
||||
|
||||
return db.DbConnection().ConnectionString;
|
||||
return Db.DbConnection().ConnectionString;
|
||||
}
|
||||
|
||||
public static string ConnectionString => Db.DbConnection().ConnectionString;
|
||||
|
||||
private void CreateDefaultSettingsPage()
|
||||
{
|
||||
|
|
|
@ -35,10 +35,34 @@
|
|||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Hangfire.Core, Version=1.5.3.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Hangfire.Core.1.5.3\lib\net45\Hangfire.Core.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Hangfire.SqlServer, Version=1.5.3.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Hangfire.SqlServer.1.5.3\lib\net45\Hangfire.SqlServer.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Owin, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Owin.3.0.1\lib\net45\Microsoft.Owin.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Owin.Host.SystemWeb, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Owin.Host.SystemWeb.3.0.0\lib\net45\Microsoft.Owin.Host.SystemWeb.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="nunit.framework, Version=3.0.5813.39031, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NUnit.3.0.1\lib\net45\nunit.framework.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
</ItemGroup>
|
||||
<Choose>
|
||||
|
@ -58,6 +82,7 @@
|
|||
<Compile Include="UriHelperTests.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
|
15
PlexRequests.Helpers.Tests/app.config
Normal file
15
PlexRequests.Helpers.Tests/app.config
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
|
@ -1,4 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Hangfire.Core" version="1.5.3" targetFramework="net46" />
|
||||
<package id="Hangfire.SqlServer" version="1.5.3" targetFramework="net46" />
|
||||
<package id="Microsoft.Owin" version="3.0.1" targetFramework="net46" />
|
||||
<package id="Microsoft.Owin.Host.SystemWeb" version="3.0.0" targetFramework="net46" />
|
||||
<package id="Newtonsoft.Json" version="8.0.2" targetFramework="net46" />
|
||||
<package id="NUnit" version="3.0.1" targetFramework="net46" />
|
||||
<package id="Owin" version="1.0" targetFramework="net46" />
|
||||
</packages>
|
|
@ -24,12 +24,15 @@
|
|||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
// ************************************************************************/
|
||||
#endregion
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
using Humanizer;
|
||||
|
||||
using Nancy;
|
||||
using Nancy.Responses.Negotiation;
|
||||
using PlexRequests.Api;
|
||||
using PlexRequests.Core;
|
||||
using PlexRequests.Core.SettingModels;
|
||||
using PlexRequests.Store;
|
||||
|
@ -40,10 +43,12 @@ namespace PlexRequests.UI.Modules
|
|||
public class RequestsModule : BaseModule
|
||||
{
|
||||
|
||||
public RequestsModule(IRepository<RequestedModel> service, ISettingsService<PlexRequestSettings> prSettings) : base("requests")
|
||||
public RequestsModule(IRepository<RequestedModel> service, ISettingsService<PlexRequestSettings> prSettings, ISettingsService<AuthenticationSettings> auth, ISettingsService<PlexSettings> plex) : base("requests")
|
||||
{
|
||||
Service = service;
|
||||
PrSettings = prSettings;
|
||||
AuthSettings = auth;
|
||||
PlexSettings = plex;
|
||||
|
||||
Get["/"] = _ => LoadRequests();
|
||||
Get["/movies"] = _ => GetMovies();
|
||||
|
@ -56,6 +61,8 @@ namespace PlexRequests.UI.Modules
|
|||
}
|
||||
private IRepository<RequestedModel> Service { get; }
|
||||
private ISettingsService<PlexRequestSettings> PrSettings { get; }
|
||||
private ISettingsService<AuthenticationSettings> AuthSettings { get; }
|
||||
private ISettingsService<PlexSettings> PlexSettings { get; }
|
||||
|
||||
private Negotiator LoadRequests()
|
||||
{
|
||||
|
@ -65,6 +72,10 @@ namespace PlexRequests.UI.Modules
|
|||
|
||||
private Response GetMovies()
|
||||
{
|
||||
// TODO check plex to see the availability
|
||||
var settings = AuthSettings.GetSettings();
|
||||
var plexSettings = PlexSettings.GetSettings();
|
||||
var plex = new PlexApi();
|
||||
var dbMovies = Service.GetAll().Where(x => x.Type == RequestType.Movie);
|
||||
var viewModel = dbMovies.Select(tv => new RequestViewModel
|
||||
{
|
||||
|
@ -82,6 +93,9 @@ namespace PlexRequests.UI.Modules
|
|||
RequestedBy = tv.RequestedBy,
|
||||
ReleaseYear = tv.ReleaseDate.Year.ToString()
|
||||
}).ToList();
|
||||
|
||||
|
||||
|
||||
//TODO check if Available in CP
|
||||
return Response.AsJson(viewModel);
|
||||
}
|
||||
|
|
|
@ -57,6 +57,22 @@
|
|||
</StartupObject>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Dapper, Version=1.40.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Dapper.1.42\lib\net45\Dapper.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Hangfire.Core, Version=1.5.3.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Hangfire.Core.1.5.3\lib\net45\Hangfire.Core.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Hangfire.SQLite, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Hangfire.SQLite.1.1.0.0\lib\net45\Hangfire.SQLite.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Hangfire.SqlServer, Version=1.5.3.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Hangfire.SqlServer.1.5.3\lib\net45\Hangfire.SqlServer.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Humanizer, Version=2.0.1.0, Culture=neutral, PublicKeyToken=979442b78dfc278e, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Humanizer.Core.2.0.1\lib\dotnet\Humanizer.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
|
@ -69,6 +85,10 @@
|
|||
<HintPath>..\packages\Microsoft.Owin.Host.HttpListener.3.0.1\lib\net45\Microsoft.Owin.Host.HttpListener.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Owin.Host.SystemWeb, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Owin.Host.SystemWeb.3.0.0\lib\net45\Microsoft.Owin.Host.SystemWeb.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Owin.Hosting, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Owin.Hosting.3.0.1\lib\net45\Microsoft.Owin.Hosting.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
|
@ -101,6 +121,10 @@
|
|||
<HintPath>..\packages\Nancy.Viewengines.Razor.1.4.1\lib\net40\Nancy.ViewEngines.Razor.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NLog.4.2.3\lib\net45\NLog.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
|
@ -117,6 +141,10 @@
|
|||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Data.SQLite, Version=1.0.99.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Data.SQLite.Core.1.0.99.0\lib\net46\System.Data.SQLite.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Web.Extensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
|
@ -307,7 +335,9 @@
|
|||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\Nancy.Viewengines.Razor.1.4.1\build\Nancy.ViewEngines.Razor.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Nancy.Viewengines.Razor.1.4.1\build\Nancy.ViewEngines.Razor.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\System.Data.SQLite.Core.1.0.99.0\build\net46\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.Data.SQLite.Core.1.0.99.0\build\net46\System.Data.SQLite.Core.targets'))" />
|
||||
</Target>
|
||||
<Import Project="..\packages\System.Data.SQLite.Core.1.0.99.0\build\net46\System.Data.SQLite.Core.targets" Condition="Exists('..\packages\System.Data.SQLite.Core.1.0.99.0\build\net46\System.Data.SQLite.Core.targets')" />
|
||||
<!-- 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">
|
||||
|
|
|
@ -25,8 +25,10 @@
|
|||
// ************************************************************************/
|
||||
#endregion
|
||||
using System;
|
||||
|
||||
using Hangfire;
|
||||
using Hangfire.SQLite;
|
||||
using Owin;
|
||||
using PlexRequests.Core;
|
||||
|
||||
namespace PlexRequests.UI
|
||||
{
|
||||
|
@ -37,6 +39,12 @@ namespace PlexRequests.UI
|
|||
try
|
||||
{
|
||||
app.UseNancy();
|
||||
|
||||
//GlobalConfiguration.Configuration.UseSQLiteStorage("Sqlite");
|
||||
|
||||
//app.UseHangfireDashboard();
|
||||
//app.UseHangfireServer();
|
||||
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
|
|
|
@ -1,40 +1,48 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
||||
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false"/>
|
||||
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
|
||||
<appSettings>
|
||||
|
||||
<add key="ClientSettingsProvider.ServiceUri" value=""/>
|
||||
<add key="webPages:Enabled" value="false"/></appSettings>
|
||||
<add key="ClientSettingsProvider.ServiceUri" value="" />
|
||||
<add key="webPages:Enabled" value="false" /></appSettings>
|
||||
|
||||
<system.web>
|
||||
<membership defaultProvider="ClientAuthenticationMembershipProvider">
|
||||
<providers>
|
||||
<add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri=""/>
|
||||
<add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" />
|
||||
</providers>
|
||||
</membership>
|
||||
<roleManager defaultProvider="ClientRoleProvider" enabled="true">
|
||||
<providers>
|
||||
<add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400"/>
|
||||
<add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" />
|
||||
</providers>
|
||||
</roleManager>
|
||||
</system.web>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0"/>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Data.SQLite" publicKeyToken="db937bc2d44ff139" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.0.99.0" newVersion="1.0.99.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<system.web.webPages.razor>
|
||||
<pages pageBaseType="Nancy.ViewEngines.Razor.NancyRazorViewBase">
|
||||
<namespaces>
|
||||
<add namespace="Nancy.ViewEngines.Razor"/>
|
||||
<add namespace="Nancy.ViewEngines.Razor" />
|
||||
</namespaces>
|
||||
</pages>
|
||||
</system.web.webPages.razor><startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/></startup></configuration>
|
||||
</system.web.webPages.razor><startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" /></startup></configuration>
|
||||
|
|
|
@ -1,9 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Dapper" version="1.42" targetFramework="net46" />
|
||||
<package id="Hangfire" version="1.5.3" targetFramework="net46" />
|
||||
<package id="Hangfire.Core" version="1.5.3" targetFramework="net46" />
|
||||
<package id="Hangfire.SQLite" version="1.1.0.0" targetFramework="net46" />
|
||||
<package id="Hangfire.SqlServer" version="1.5.3" targetFramework="net46" />
|
||||
<package id="Humanizer.Core" version="2.0.1" targetFramework="net452" />
|
||||
<package id="Microsoft.AspNet.Razor" version="2.0.30506.0" targetFramework="net452" />
|
||||
<package id="Microsoft.Owin" version="3.0.1" targetFramework="net452" />
|
||||
<package id="Microsoft.Owin.Host.HttpListener" version="3.0.1" targetFramework="net452" />
|
||||
<package id="Microsoft.Owin.Host.SystemWeb" version="3.0.0" targetFramework="net46" />
|
||||
<package id="Microsoft.Owin.Hosting" version="3.0.1" targetFramework="net452" />
|
||||
<package id="Nancy" version="1.4.3" targetFramework="net452" />
|
||||
<package id="Nancy.Authentication.Basic" version="1.4.1" targetFramework="net452" />
|
||||
|
@ -11,12 +17,14 @@
|
|||
<package id="Nancy.Hosting.Self" version="1.4.1" targetFramework="net452" />
|
||||
<package id="Nancy.Owin" version="1.4.1" targetFramework="net452" />
|
||||
<package id="Nancy.Viewengines.Razor" version="1.4.1" targetFramework="net452" />
|
||||
<package id="Newtonsoft.Json" version="8.0.2" targetFramework="net46" />
|
||||
<package id="NLog" version="4.2.3" targetFramework="net452" />
|
||||
<package id="NLog.Config" version="4.2.3" targetFramework="net452" />
|
||||
<package id="NLog.Schema" version="4.0.0" targetFramework="net452" />
|
||||
<package id="Owin" version="1.0" targetFramework="net452" />
|
||||
<package id="RestSharp" version="105.2.3" targetFramework="net452" requireReinstallation="true" />
|
||||
<package id="System.Collections" version="4.0.0" targetFramework="net452" />
|
||||
<package id="System.Data.SQLite.Core" version="1.0.99.0" targetFramework="net46" />
|
||||
<package id="System.Diagnostics.Debug" version="4.0.0" targetFramework="net452" />
|
||||
<package id="System.Globalization" version="4.0.0" targetFramework="net452" />
|
||||
<package id="System.Linq" version="4.0.0" targetFramework="net452" />
|
||||
|
|
|
@ -26,7 +26,9 @@
|
|||
<add verb="*" type="Nancy.Hosting.Aspnet.NancyHttpRequestHandler" path="*" />
|
||||
</httpHandlers>
|
||||
</system.web>
|
||||
|
||||
<connectionStrings>
|
||||
<add name="Sqlite" connectionString="Data Source=RequestPlex.sqlite"/>
|
||||
</connectionStrings>
|
||||
<appSettings>
|
||||
<add key="webPages:Enabled" value="false" />
|
||||
</appSettings>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue