fixed some db issues and added a preview

This commit is contained in:
Jamie Rees 2016-03-01 23:21:38 +00:00
parent f1b33cf794
commit 7404fd449a
6 changed files with 14 additions and 12 deletions

View file

@ -16,7 +16,7 @@ I wanted to write a similar application in .Net!
#Preview #Preview
TBC ![Preview](http://i.imgur.com/Q8iRI43.gif)
#Installation #Installation

View file

@ -64,7 +64,9 @@ namespace RequestPlex.Core
PosterPath = "http://image.tmdb.org/t/p/w150/" + movieInfo.PosterPath, PosterPath = "http://image.tmdb.org/t/p/w150/" + movieInfo.PosterPath,
Title = movieInfo.Title, Title = movieInfo.Title,
ReleaseDate = movieInfo.ReleaseDate ?? DateTime.MinValue, ReleaseDate = movieInfo.ReleaseDate ?? DateTime.MinValue,
Status = movieInfo.Status Status = movieInfo.Status,
RequestedDate = DateTime.Now,
Approved = false
}; };
} }
else else
@ -79,7 +81,9 @@ namespace RequestPlex.Core
PosterPath = "http://image.tmdb.org/t/p/w150/" + showInfo.PosterPath, PosterPath = "http://image.tmdb.org/t/p/w150/" + showInfo.PosterPath,
Title = showInfo.Name, Title = showInfo.Name,
ReleaseDate = showInfo.FirstAirDate ?? DateTime.MinValue, ReleaseDate = showInfo.FirstAirDate ?? DateTime.MinValue,
Status = showInfo.Status Status = showInfo.Status,
RequestedDate = DateTime.Now,
Approved = false
}; };
} }
var db = new DbConfiguration(new SqliteFactory()); var db = new DbConfiguration(new SqliteFactory());

View file

@ -16,7 +16,7 @@ namespace RequestPlex.Store
public DateTime ReleaseDate { get; set; } public DateTime ReleaseDate { get; set; }
public RequestType Type { get; set; } public RequestType Type { get; set; }
public string Status { get; set; } public string Status { get; set; }
public string RequestedStatus { get; set; } public bool Approved { get; set; }
public string RequestedBy { get; set; } public string RequestedBy { get; set; }
public DateTime RequestedDate { get; set; } public DateTime RequestedDate { get; set; }

View file

@ -21,16 +21,16 @@ CREATE TABLE IF NOT EXISTS Requested
Id INTEGER PRIMARY KEY AUTOINCREMENT, Id INTEGER PRIMARY KEY AUTOINCREMENT,
Type INTEGER NOT NULL, Type INTEGER NOT NULL,
Tmdbid INTEGER NOT NULL, Tmdbid INTEGER NOT NULL,
ImdbId varchar(50) NOT NULL, ImdbId varchar(50),
Overview varchar(50) NOT NULL, Overview varchar(50) NOT NULL,
Title varchar(50) NOT NULL, Title varchar(50) NOT NULL,
PosterPath varchar(50) NOT NULL, PosterPath varchar(50) NOT NULL,
ReleaseDate varchar(50) NOT NULL, ReleaseDate varchar(50) NOT NULL,
Status varchar(50) NOT NULL, Status varchar(50) NOT NULL,
RequestStatus varchar(50) NOT NULL, Approved INTEGER NOT NULL,
RequestedBy varchar(50) NOT NULL, RequestedBy varchar(50),
RequestedDate varchar(50) NOT NULL, RequestedDate varchar(50) NOT NULL,
Available varchar(50) NOT NULL Available varchar(50)
); );

View file

@ -61,7 +61,7 @@ function buildTvShowRequestContext(result) {
var context = { var context = {
posterPath: result.posterPath, posterPath: result.posterPath,
id: result.tmdbid, id: result.tmdbid,
title: result.name, title: result.title,
overview: result.overview, overview: result.overview,
year: year, year: year,
type: "tv", type: "tv",

View file

@ -224,9 +224,7 @@
<DependentUpon>web.config</DependentUpon> <DependentUpon>web.config</DependentUpon>
</None> </None>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup />
<Folder Include="Auth\" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\RequestPlex.Api\RequestPlex.Api.csproj"> <ProjectReference Include="..\RequestPlex.Api\RequestPlex.Api.csproj">
<Project>{8cb8d235-2674-442d-9c6a-35fcaeeb160d}</Project> <Project>{8cb8d235-2674-442d-9c6a-35fcaeeb160d}</Project>