mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Add database entry for optimal count of sectors for multiple read in devices.
This commit is contained in:
@@ -82,7 +82,7 @@ namespace DiscImageChef.Server.Controllers
|
||||
foreach(Device device in ctx.Devices.Where(d => d.ModifiedWhen > lastSync).ToList())
|
||||
sync.Devices.Add(new
|
||||
DeviceDto(JsonConvert.DeserializeObject<DeviceReportV2>(JsonConvert.SerializeObject(device)),
|
||||
device.Id));
|
||||
device.Id, device.OptimalMultipleSectorsRead));
|
||||
|
||||
JsonSerializer js = JsonSerializer.Create();
|
||||
StringWriter sw = new StringWriter();
|
||||
|
||||
@@ -260,6 +260,10 @@
|
||||
<Compile Include="Migrations\201901022133012_AddMultisessionLeadTest.Designer.cs">
|
||||
<DependentUpon>201901022133012_AddMultisessionLeadTest.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Migrations\201901030344456_AddOptimalReadMultipleCount.cs" />
|
||||
<Compile Include="Migrations\201901030344456_AddOptimalReadMultipleCount.Designer.cs">
|
||||
<DependentUpon>201901030344456_AddOptimalReadMultipleCount.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Migrations\Configuration.cs" />
|
||||
<Compile Include="Models\CdOffset.cs" />
|
||||
<Compile Include="Models\Command.cs" />
|
||||
@@ -387,6 +391,9 @@
|
||||
<EmbeddedResource Include="Migrations\201901022133012_AddMultisessionLeadTest.resx">
|
||||
<DependentUpon>201901022133012_AddMultisessionLeadTest.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Migrations\201901030344456_AddOptimalReadMultipleCount.resx">
|
||||
<DependentUpon>201901030344456_AddOptimalReadMultipleCount.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||
|
||||
29
DiscImageChef.Server/Migrations/201901030344456_AddOptimalReadMultipleCount.Designer.cs
generated
Normal file
29
DiscImageChef.Server/Migrations/201901030344456_AddOptimalReadMultipleCount.Designer.cs
generated
Normal file
@@ -0,0 +1,29 @@
|
||||
// <auto-generated />
|
||||
namespace DiscImageChef.Server.Migrations
|
||||
{
|
||||
using System.CodeDom.Compiler;
|
||||
using System.Data.Entity.Migrations;
|
||||
using System.Data.Entity.Migrations.Infrastructure;
|
||||
using System.Resources;
|
||||
|
||||
[GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
|
||||
public sealed partial class AddOptimalReadMultipleCount : IMigrationMetadata
|
||||
{
|
||||
private readonly ResourceManager Resources = new ResourceManager(typeof(AddOptimalReadMultipleCount));
|
||||
|
||||
string IMigrationMetadata.Id
|
||||
{
|
||||
get { return "201901030344456_AddOptimalReadMultipleCount"; }
|
||||
}
|
||||
|
||||
string IMigrationMetadata.Source
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
string IMigrationMetadata.Target
|
||||
{
|
||||
get { return Resources.GetString("Target"); }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using System.Data.Entity.Migrations;
|
||||
|
||||
namespace DiscImageChef.Server.Migrations
|
||||
{
|
||||
public partial class AddOptimalReadMultipleCount : DbMigration
|
||||
{
|
||||
public override void Up()
|
||||
{
|
||||
AddColumn("dbo.Devices", "OptimalMultipleSectorsRead", c => c.Int(false, defaultValue: 0));
|
||||
}
|
||||
|
||||
public override void Down()
|
||||
{
|
||||
DropColumn("dbo.Devices", "OptimalMultipleSectorsRead");
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -31,6 +31,7 @@
|
||||
// ****************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using DiscImageChef.CommonTypes.Metadata;
|
||||
|
||||
@@ -66,5 +67,7 @@ namespace DiscImageChef.Server.Models
|
||||
[Index]
|
||||
public DateTime? ModifiedWhen { get; set; }
|
||||
public virtual CompactDiscOffset CdOffset { get; set; }
|
||||
[DefaultValue(0)]
|
||||
public int OptimalMultipleSectorsRead { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@ DiscImageChef v4.5.99.1693
|
||||
|
||||
Disc Image Chef (because "swiss-army-knife" is used too much)
|
||||
|
||||
Copyright © 2011-2019 Natalia Portillo <claunia@claunia.com>
|
||||
Copyright © 2011-2018 Natalia Portillo <claunia@claunia.com>
|
||||
|
||||
[](https://dev.azure.com/DiscImageChef/DiscImageChef/_build/latest?definitionId=4)
|
||||
[](https://travis-ci.org/claunia/DiscImageChef)
|
||||
|
||||
Reference in New Issue
Block a user