Skip to content

Commit

Permalink
Merge pull request #251 from pathartl/develop
Browse files Browse the repository at this point in the history
Merging the mamoth Version 1.0.0 develop branch to master.
  • Loading branch information
pathartl authored Jan 25, 2019
2 parents 216555e + 5888de3 commit c08669d
Show file tree
Hide file tree
Showing 2,270 changed files with 166,318 additions and 1,569 deletions.
3 changes: 3 additions & 0 deletions .bowerrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"directory": "BleemSync/wwwroot/lib"
}
11 changes: 10 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ x64/
x86/
build/
bld/
[Bb]in/
[Oo]bj/
[Oo]ut/
msbuild.log
Expand All @@ -32,6 +31,16 @@ msbuild.wrn

# Visual Studio 2015
.vs/

BleemSync-*.zip
Publish/
BleemSync.Payload/System/BleemSync/
*.flag
Payload/system/bleemsync/
Payload/system/defaults/cover.png
Payload/system/defaults/pcsx.cfg

BleemSync/BleemSync.db
System/Databases/regional.db
BleemSync/Games/
BleemSync/ui_menu.db
40 changes: 22 additions & 18 deletions BleemSync.Central.Data/BleemSync.Central.Data.csproj
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<RootNamespace>BleemSync.Central.Data</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="2.2.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.2.0" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="2.1.4" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\BleemSync.Utilities\BleemSync.Utilities.csproj" />
</ItemGroup>

</Project>
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<RootNamespace>BleemSync.Central.Data</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="2.1.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.1.1" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="2.1.4" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\BleemSync.Utilities\BleemSync.Utilities.csproj" />
</ItemGroup>

<ItemGroup>
<RuntimeHostConfigurationOption Include="System.Globalization.Invariant" Value="true" />
</ItemGroup>

</Project>
2 changes: 0 additions & 2 deletions BleemSync.Central.Data/DatabaseContext.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using BleemSync.Central.Data.Models;
using Microsoft.EntityFrameworkCore;
using System;
using System.IO;

namespace BleemSync.Central.Data
{
Expand Down
5 changes: 1 addition & 4 deletions BleemSync.Central.Data/Game/Cover.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;
using System.ComponentModel.DataAnnotations;

namespace BleemSync.Central.Data.Models
{
Expand Down
5 changes: 1 addition & 4 deletions BleemSync.Central.Data/Game/Disc.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;
using System.ComponentModel.DataAnnotations;

namespace BleemSync.Central.Data.Models
{
Expand Down
2 changes: 1 addition & 1 deletion BleemSync.Central.Data/Game/Game.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace BleemSync.Central.Data.Models
{
Expand All @@ -11,6 +10,7 @@ public class Game
{
[Key]
public int Id { get; set; }
public String RelativePath { get; set; }
public string Title { get; set; }
public string CommonTitle { get; set; }
public string Region { get; set; }
Expand Down
7 changes: 6 additions & 1 deletion BleemSync.Central.Services/BleemSync.Central.Services.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@
<TargetFramework>netcoreapp2.1</TargetFramework>
<RootNamespace>BleemSync.Central.Services</RootNamespace>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\BleemSync.Central.Data\BleemSync.Central.Data.csproj" />
</ItemGroup>

<ItemGroup>
<RuntimeHostConfigurationOption Include="System.Globalization.Invariant" Value="true" />
</ItemGroup>


</Project>
2 changes: 0 additions & 2 deletions BleemSync.Central.Services/GameService.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using BleemSync.Central.Data;
using BleemSync.Central.Data.Models;
using BleemSync.Central.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;

Expand Down
4 changes: 0 additions & 4 deletions BleemSync.Central.Services/ViewModels/CoverDTO.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using BleemSync.Central.Data.Models;
using BleemSync.Central.ViewModels;
using System;
using System.Collections.Generic;
using System.Text;

namespace BleemSync.Central.ViewModels
{
Expand Down
4 changes: 0 additions & 4 deletions BleemSync.Central.Services/ViewModels/DiscDTO.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using BleemSync.Central.Data.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace BleemSync.Central.ViewModels
{
Expand Down
2 changes: 0 additions & 2 deletions BleemSync.Central.Services/ViewModels/GameDTO.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using BleemSync.Central.Data.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace BleemSync.Central.ViewModels
{
Expand Down
44 changes: 22 additions & 22 deletions BleemSync.Central/BleemSync.Central.csproj
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<AssemblyName>BleemSync.Central</AssemblyName>
</PropertyGroup>

<ItemGroup>
<Folder Include="wwwroot\" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.Net.Compilers" Version="2.10.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\BleemSync.Central.Services\BleemSync.Central.Services.csproj" />
</ItemGroup>

</Project>
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<AssemblyName>BleemSync.Central</AssemblyName>
</PropertyGroup>

<ItemGroup>
<Folder Include="wwwroot\" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.1.1" PrivateAssets="All" />
<PackageReference Include="Microsoft.Net.Compilers" Version="2.10.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\BleemSync.Central.Services\BleemSync.Central.Services.csproj" />
</ItemGroup>

</Project>
12 changes: 9 additions & 3 deletions BleemSync.Central/Controllers/PlayStationApiController.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using BleemSync.Central.Services;
using BleemSync.Central.Data;
Expand Down Expand Up @@ -48,6 +46,14 @@ public ActionResult GetBySerial(string serial)
return new JsonResult(game);
}

[HttpGet("{serial}")]
public ActionResult GetByFingerprint(string serial)
{
var game = _service.GetGameBySerialNumber(serial);

return new JsonResult(game);
}

[HttpGet("{serial}")]
public ActionResult GetCoverBySerial(string serial)
{
Expand Down
2 changes: 0 additions & 2 deletions BleemSync.Central/Controllers/PlayStationController.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
using BleemSync.Central.Data;
using BleemSync.Central.Services;
using BleemSync.Central.ViewModels;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace BleemSync.Central.Controllers
{
Expand Down
9 changes: 1 addition & 8 deletions BleemSync.Central/Program.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;

namespace BleemSync.Central
{
Expand Down
14 changes: 6 additions & 8 deletions BleemSync.Central/Startup.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.HttpsPolicy;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Newtonsoft.Json.Serialization;
using BleemSync.Central.Data;
using Microsoft.EntityFrameworkCore;
Expand Down Expand Up @@ -50,6 +43,11 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env)
app.UseHsts();
}

app.UseCors(builder => builder
.AllowAnyOrigin()
.AllowAnyMethod()
.AllowAnyHeader()
.AllowCredentials());
app.UseStaticFiles();
app.UseHttpsRedirection();
app.UseMvc();
Expand Down
15 changes: 15 additions & 0 deletions BleemSync.Data/Abstractions/IGameManagerFileRepository.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using BleemSync.Data.Entities;
using ExtCore.Data.Abstractions;
using System.Collections.Generic;

namespace BleemSync.Data.Abstractions
{
public interface IGameManagerFileRepository : IRepository
{
IEnumerable<GameManagerFile> All();
GameManagerFile Get(int id);
void Create(GameManagerFile file);
void Update(GameManagerFile file);
void Delete(GameManagerFile file);
}
}
15 changes: 15 additions & 0 deletions BleemSync.Data/Abstractions/IGameManagerNodeRepository.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using BleemSync.Data.Entities;
using ExtCore.Data.Abstractions;
using System.Collections.Generic;

namespace BleemSync.Data.Abstractions
{
public interface IGameManagerNodeRepository : IRepository
{
IEnumerable<GameManagerNode> All();
GameManagerNode Get(int id);
void Create(GameManagerNode node);
void Update(GameManagerNode node);
void Delete(GameManagerNode node);
}
}
13 changes: 6 additions & 7 deletions BleemSync.Data/BleemSync.Data.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,17 @@
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<RootNamespace>BleemSync.Data</RootNamespace>
<AssemblyVersion>0.4.0.0</AssemblyVersion>
<FileVersion>0.4.0.0</FileVersion>
<Version>0.4.0</Version>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="2.2.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.2.0" />
<PackageReference Include="ExtCore.Data.Abstractions" Version="3.3.0" />
<PackageReference Include="ExtCore.Data.Entities.Abstractions" Version="3.3.0" />
<PackageReference Include="ExtCore.Data.EntityFramework.Sqlite" Version="3.3.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\BleemSync.Utilities\BleemSync.Utilities.csproj" />
<RuntimeHostConfigurationOption Include="System.Globalization.Invariant" Value="true" />
</ItemGroup>


</Project>
12 changes: 12 additions & 0 deletions BleemSync.Data/Entities/GameGenre.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using ExtCore.Data.Entities.Abstractions;
using System.ComponentModel.DataAnnotations;

namespace BleemSync.Data.Entities
{
public class GameGenre : IEntity
{
[Key]
public int Id { get; set; }
public string Name { get; set; }
}
}
15 changes: 15 additions & 0 deletions BleemSync.Data/Entities/GameManagerFile.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using ExtCore.Data.Entities.Abstractions;
using System.ComponentModel.DataAnnotations;

namespace BleemSync.Data.Entities
{
public class GameManagerFile : IEntity
{
[Key]
public int Id { get; set; }
public string Name { get; set; }
public string Path { get; set; }
public int NodeId { get; set; }
public virtual GameManagerNode Node { get; set; }
}
}
Loading

0 comments on commit c08669d

Please sign in to comment.