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:
5
.idea/.idea.DiscImageChef/.idea/contentModel.xml
generated
5
.idea/.idea.DiscImageChef/.idea/contentModel.xml
generated
@@ -333,6 +333,8 @@
|
|||||||
<e p="20181225214500_StoreReadResultsInReportDatabase.cs" t="Include" />
|
<e p="20181225214500_StoreReadResultsInReportDatabase.cs" t="Include" />
|
||||||
<e p="20190102061236_AddMultisessionLeadTest.Designer.cs" t="Include" />
|
<e p="20190102061236_AddMultisessionLeadTest.Designer.cs" t="Include" />
|
||||||
<e p="20190102061236_AddMultisessionLeadTest.cs" t="Include" />
|
<e p="20190102061236_AddMultisessionLeadTest.cs" t="Include" />
|
||||||
|
<e p="20190102230036_AddOptimalReadMultipleCount.Designer.cs" t="Include" />
|
||||||
|
<e p="20190102230036_AddOptimalReadMultipleCount.cs" t="Include" />
|
||||||
<e p="DicContextModelSnapshot.cs" t="Include" />
|
<e p="DicContextModelSnapshot.cs" t="Include" />
|
||||||
</e>
|
</e>
|
||||||
<e p="Models" t="Include">
|
<e p="Models" t="Include">
|
||||||
@@ -1859,6 +1861,9 @@
|
|||||||
<e p="201901022133012_AddMultisessionLeadTest.Designer.cs" t="Include" />
|
<e p="201901022133012_AddMultisessionLeadTest.Designer.cs" t="Include" />
|
||||||
<e p="201901022133012_AddMultisessionLeadTest.cs" t="Include" />
|
<e p="201901022133012_AddMultisessionLeadTest.cs" t="Include" />
|
||||||
<e p="201901022133012_AddMultisessionLeadTest.resx" t="Include" />
|
<e p="201901022133012_AddMultisessionLeadTest.resx" t="Include" />
|
||||||
|
<e p="201901030344456_AddOptimalReadMultipleCount.Designer.cs" t="Include" />
|
||||||
|
<e p="201901030344456_AddOptimalReadMultipleCount.cs" t="Include" />
|
||||||
|
<e p="201901030344456_AddOptimalReadMultipleCount.resx" t="Include" />
|
||||||
<e p="Configuration.cs" t="Include" />
|
<e p="Configuration.cs" t="Include" />
|
||||||
</e>
|
</e>
|
||||||
<e p="Models" t="Include">
|
<e p="Models" t="Include">
|
||||||
|
|||||||
@@ -344,13 +344,20 @@ namespace DiscImageChef.Core
|
|||||||
if(existing != null)
|
if(existing != null)
|
||||||
{
|
{
|
||||||
modifiedDevices++;
|
modifiedDevices++;
|
||||||
existing = new Device(device) {Id = device.Id};
|
existing = new Device(device)
|
||||||
|
{
|
||||||
|
Id = device.Id, OptimalMultipleSectorsRead = device.OptimalMultipleSectorsRead
|
||||||
|
};
|
||||||
mctx.Devices.Update(existing);
|
mctx.Devices.Update(existing);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
addedDevices++;
|
addedDevices++;
|
||||||
mctx.Devices.Add(new Device(device) {Id = device.Id});
|
mctx.Devices.Add(new Device(device)
|
||||||
|
{
|
||||||
|
Id = device.Id,
|
||||||
|
OptimalMultipleSectorsRead = device.OptimalMultipleSectorsRead
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -93,6 +93,8 @@
|
|||||||
<Compile Include="Migrations\20181225214500_StoreReadResultsInReportDatabase.Designer.cs" />
|
<Compile Include="Migrations\20181225214500_StoreReadResultsInReportDatabase.Designer.cs" />
|
||||||
<Compile Include="Migrations\20190102061236_AddMultisessionLeadTest.cs" />
|
<Compile Include="Migrations\20190102061236_AddMultisessionLeadTest.cs" />
|
||||||
<Compile Include="Migrations\20190102061236_AddMultisessionLeadTest.Designer.cs" />
|
<Compile Include="Migrations\20190102061236_AddMultisessionLeadTest.Designer.cs" />
|
||||||
|
<Compile Include="Migrations\20190102230036_AddOptimalReadMultipleCount.cs" />
|
||||||
|
<Compile Include="Migrations\20190102230036_AddOptimalReadMultipleCount.Designer.cs" />
|
||||||
<Compile Include="Migrations\DicContextModelSnapshot.cs" />
|
<Compile Include="Migrations\DicContextModelSnapshot.cs" />
|
||||||
<Compile Include="Models\CdOffset.cs" />
|
<Compile Include="Models\CdOffset.cs" />
|
||||||
<Compile Include="Models\Command.cs" />
|
<Compile Include="Models\Command.cs" />
|
||||||
|
|||||||
1561
DiscImageChef.Database/Migrations/20190102230036_AddOptimalReadMultipleCount.Designer.cs
generated
Normal file
1561
DiscImageChef.Database/Migrations/20190102230036_AddOptimalReadMultipleCount.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,17 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
namespace DiscImageChef.Database.Migrations
|
||||||
|
{
|
||||||
|
public partial class AddOptimalReadMultipleCount : Migration
|
||||||
|
{
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<int>("OptimalMultipleSectorsRead", "Devices", nullable: false, defaultValue: 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn("OptimalMultipleSectorsRead", "Devices");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1078,6 +1078,8 @@ namespace DiscImageChef.Database.Migrations
|
|||||||
|
|
||||||
b.Property<int?>("MultiMediaCardId");
|
b.Property<int?>("MultiMediaCardId");
|
||||||
|
|
||||||
|
b.Property<int>("OptimalMultipleSectorsRead");
|
||||||
|
|
||||||
b.Property<int?>("PCMCIAId");
|
b.Property<int?>("PCMCIAId");
|
||||||
|
|
||||||
b.Property<string>("Revision");
|
b.Property<string>("Revision");
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
// ****************************************************************************/
|
// ****************************************************************************/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.ComponentModel;
|
||||||
using DiscImageChef.CommonTypes.Metadata;
|
using DiscImageChef.CommonTypes.Metadata;
|
||||||
|
|
||||||
namespace DiscImageChef.Database.Models
|
namespace DiscImageChef.Database.Models
|
||||||
@@ -61,5 +62,8 @@ namespace DiscImageChef.Database.Models
|
|||||||
}
|
}
|
||||||
|
|
||||||
public DateTime LastSynchronized { get; set; }
|
public DateTime LastSynchronized { get; set; }
|
||||||
|
|
||||||
|
[DefaultValue(0)]
|
||||||
|
public int OptimalMultipleSectorsRead { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -58,7 +58,7 @@ namespace DiscImageChef.Dto
|
|||||||
Type = report.Type;
|
Type = report.Type;
|
||||||
}
|
}
|
||||||
|
|
||||||
public DeviceDto(DeviceReportV2 report, int id)
|
public DeviceDto(DeviceReportV2 report, int id, int optimalMultipleSectorsRead)
|
||||||
{
|
{
|
||||||
ATA = report.ATA;
|
ATA = report.ATA;
|
||||||
ATAPI = report.ATAPI;
|
ATAPI = report.ATAPI;
|
||||||
@@ -149,8 +149,11 @@ namespace DiscImageChef.Dto
|
|||||||
if(USB != null) USB.Descriptors = null;
|
if(USB != null) USB.Descriptors = null;
|
||||||
|
|
||||||
Id = id;
|
Id = id;
|
||||||
|
OptimalMultipleSectorsRead = optimalMultipleSectorsRead;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int OptimalMultipleSectorsRead { get; set; }
|
||||||
|
|
||||||
public new int Id { get; set; }
|
public new int Id { get; set; }
|
||||||
|
|
||||||
static TestedMedia ClearBinaries(TestedMedia media)
|
static TestedMedia ClearBinaries(TestedMedia media)
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
<RootNamespace>DiscImageChef.Server.Task</RootNamespace>
|
<RootNamespace>DiscImageChef.Server.Task</RootNamespace>
|
||||||
<AssemblyName>DiscImageChef.Server.Task</AssemblyName>
|
<AssemblyName>DiscImageChef.Server.Task</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
|
||||||
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ namespace DiscImageChef.Server.Controllers
|
|||||||
foreach(Device device in ctx.Devices.Where(d => d.ModifiedWhen > lastSync).ToList())
|
foreach(Device device in ctx.Devices.Where(d => d.ModifiedWhen > lastSync).ToList())
|
||||||
sync.Devices.Add(new
|
sync.Devices.Add(new
|
||||||
DeviceDto(JsonConvert.DeserializeObject<DeviceReportV2>(JsonConvert.SerializeObject(device)),
|
DeviceDto(JsonConvert.DeserializeObject<DeviceReportV2>(JsonConvert.SerializeObject(device)),
|
||||||
device.Id));
|
device.Id, device.OptimalMultipleSectorsRead));
|
||||||
|
|
||||||
JsonSerializer js = JsonSerializer.Create();
|
JsonSerializer js = JsonSerializer.Create();
|
||||||
StringWriter sw = new StringWriter();
|
StringWriter sw = new StringWriter();
|
||||||
|
|||||||
@@ -260,6 +260,10 @@
|
|||||||
<Compile Include="Migrations\201901022133012_AddMultisessionLeadTest.Designer.cs">
|
<Compile Include="Migrations\201901022133012_AddMultisessionLeadTest.Designer.cs">
|
||||||
<DependentUpon>201901022133012_AddMultisessionLeadTest.cs</DependentUpon>
|
<DependentUpon>201901022133012_AddMultisessionLeadTest.cs</DependentUpon>
|
||||||
</Compile>
|
</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="Migrations\Configuration.cs" />
|
||||||
<Compile Include="Models\CdOffset.cs" />
|
<Compile Include="Models\CdOffset.cs" />
|
||||||
<Compile Include="Models\Command.cs" />
|
<Compile Include="Models\Command.cs" />
|
||||||
@@ -387,6 +391,9 @@
|
|||||||
<EmbeddedResource Include="Migrations\201901022133012_AddMultisessionLeadTest.resx">
|
<EmbeddedResource Include="Migrations\201901022133012_AddMultisessionLeadTest.resx">
|
||||||
<DependentUpon>201901022133012_AddMultisessionLeadTest.cs</DependentUpon>
|
<DependentUpon>201901022133012_AddMultisessionLeadTest.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Migrations\201901030344456_AddOptimalReadMultipleCount.resx">
|
||||||
|
<DependentUpon>201901030344456_AddOptimalReadMultipleCount.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
<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;
|
||||||
|
using System.ComponentModel;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
using DiscImageChef.CommonTypes.Metadata;
|
using DiscImageChef.CommonTypes.Metadata;
|
||||||
|
|
||||||
@@ -66,5 +67,7 @@ namespace DiscImageChef.Server.Models
|
|||||||
[Index]
|
[Index]
|
||||||
public DateTime? ModifiedWhen { get; set; }
|
public DateTime? ModifiedWhen { get; set; }
|
||||||
public virtual CompactDiscOffset CdOffset { 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)
|
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://dev.azure.com/DiscImageChef/DiscImageChef/_build/latest?definitionId=4)
|
||||||
[](https://travis-ci.org/claunia/DiscImageChef)
|
[](https://travis-ci.org/claunia/DiscImageChef)
|
||||||
|
|||||||
Reference in New Issue
Block a user