mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 06:11:10 +00:00
Adds playback preferences and auto-persisted playback state to user settings
This commit is contained in:
1 parent
aab36dcd29
commit
dd76309ded
81 files changed
+6102
-173
No files matched your search
@@ -66,6 +66,34 @@ public class UserSettingsConfiguration : IEntityTypeConfiguration<UserSettingsEn
|
||||
.IsRequired()
|
||||
.HasColumnOrder(9);
|
||||
|
||||
builder.Property(settings => settings.ShouldKeepDownloadingWhilePaused)
|
||||
.IsRequired()
|
||||
.HasColumnOrder(14);
|
||||
|
||||
builder.Property(settings => settings.ShouldAutoplay)
|
||||
.IsRequired()
|
||||
.HasColumnOrder(15);
|
||||
|
||||
builder.Property(settings => settings.IsGaplessPlaybackEnabled)
|
||||
.IsRequired()
|
||||
.HasColumnOrder(16);
|
||||
|
||||
builder.Property(settings => settings.ReplayGainMode)
|
||||
.IsRequired()
|
||||
.HasColumnOrder(17);
|
||||
|
||||
builder.Property(settings => settings.StreamingQuality)
|
||||
.IsRequired()
|
||||
.HasColumnOrder(18);
|
||||
|
||||
builder.Property(settings => settings.Volume)
|
||||
.IsRequired()
|
||||
.HasColumnOrder(19);
|
||||
|
||||
builder.Property(settings => settings.IsMuted)
|
||||
.IsRequired()
|
||||
.HasColumnOrder(20);
|
||||
|
||||
// audit
|
||||
builder.Property(settings => settings.CreatedOnUtc)
|
||||
.IsRequired()
|
||||
|
||||
+3463
File diff suppressed because it is too large.
Load diff
+102
@@ -0,0 +1,102 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Lumina.DataAccess.Common.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddsPlaybackPreferencesAndStateToUserSettings : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "IsGaplessPlaybackEnabled",
|
||||
table: "UserSettings",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: true)
|
||||
.Annotation("Relational:ColumnOrder", 16);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "IsMuted",
|
||||
table: "UserSettings",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: false)
|
||||
.Annotation("Relational:ColumnOrder", 20);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "ReplayGainMode",
|
||||
table: "UserSettings",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0)
|
||||
.Annotation("Relational:ColumnOrder", 17);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "ShouldAutoplay",
|
||||
table: "UserSettings",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: true)
|
||||
.Annotation("Relational:ColumnOrder", 15);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "ShouldKeepDownloadingWhilePaused",
|
||||
table: "UserSettings",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: true)
|
||||
.Annotation("Relational:ColumnOrder", 14);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "StreamingQuality",
|
||||
table: "UserSettings",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0)
|
||||
.Annotation("Relational:ColumnOrder", 18);
|
||||
|
||||
migrationBuilder.AddColumn<double>(
|
||||
name: "Volume",
|
||||
table: "UserSettings",
|
||||
type: "REAL",
|
||||
nullable: false,
|
||||
defaultValue: 1.0)
|
||||
.Annotation("Relational:ColumnOrder", 19);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IsGaplessPlaybackEnabled",
|
||||
table: "UserSettings");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IsMuted",
|
||||
table: "UserSettings");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ReplayGainMode",
|
||||
table: "UserSettings");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ShouldAutoplay",
|
||||
table: "UserSettings");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ShouldKeepDownloadingWhilePaused",
|
||||
table: "UserSettings");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "StreamingQuality",
|
||||
table: "UserSettings");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Volume",
|
||||
table: "UserSettings");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2359,6 +2359,14 @@ namespace Lumina.DataAccess.Common.Migrations
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnOrder(5);
|
||||
|
||||
b.Property<bool>("IsGaplessPlaybackEnabled")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnOrder(16);
|
||||
|
||||
b.Property<bool>("IsMuted")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnOrder(20);
|
||||
|
||||
b.Property<bool>("IsPaginationEnabled")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnOrder(2);
|
||||
@@ -2371,6 +2379,10 @@ namespace Lumina.DataAccess.Common.Migrations
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnOrder(3);
|
||||
|
||||
b.Property<int>("ReplayGainMode")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnOrder(17);
|
||||
|
||||
b.Property<bool>("ShouldAggregateArtworkWhenMissing")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnOrder(13);
|
||||
@@ -2379,10 +2391,18 @@ namespace Lumina.DataAccess.Common.Migrations
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnOrder(10);
|
||||
|
||||
b.Property<bool>("ShouldAutoplay")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnOrder(15);
|
||||
|
||||
b.Property<bool>("ShouldIgnoreThePrefixForAlphaPicker")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnOrder(4);
|
||||
|
||||
b.Property<bool>("ShouldKeepDownloadingWhilePaused")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnOrder(14);
|
||||
|
||||
b.Property<bool>("ShouldPreserveBookStyles")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnOrder(12);
|
||||
@@ -2391,6 +2411,10 @@ namespace Lumina.DataAccess.Common.Migrations
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnOrder(11);
|
||||
|
||||
b.Property<int>("StreamingQuality")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnOrder(18);
|
||||
|
||||
b.Property<Guid?>("UpdatedBy")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnOrder(8);
|
||||
@@ -2403,6 +2427,10 @@ namespace Lumina.DataAccess.Common.Migrations
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnOrder(1);
|
||||
|
||||
b.Property<double>("Volume")
|
||||
.HasColumnType("REAL")
|
||||
.HasColumnOrder(19);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("UserId")
|
||||
|
||||
Reference in new issue
Block a user