mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-20 21:33:15 -07:00
Save the language code against the request so we can use it later e.g. Sending to the DVR apps
This commit is contained in:
parent
7755053ba0
commit
9cc9bf7e78
9 changed files with 1248 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using Ombi.Helpers;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
|
@ -19,5 +19,13 @@ namespace Ombi.Store.Entities.Requests
|
|||
|
||||
public int RootPathOverride { get; set; }
|
||||
public int QualityOverride { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Only Use for setting the Language Code, Use the LanguageCode property for reading
|
||||
/// </summary>
|
||||
public string LangCode { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public string LanguageCode => LangCode.IsNullOrEmpty() ? "en" : LangCode;
|
||||
}
|
||||
}
|
||||
|
|
1206
src/Ombi.Store/Migrations/20190104203305_LanguageCode.Designer.cs
generated
Normal file
1206
src/Ombi.Store/Migrations/20190104203305_LanguageCode.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
22
src/Ombi.Store/Migrations/20190104203305_LanguageCode.cs
Normal file
22
src/Ombi.Store/Migrations/20190104203305_LanguageCode.cs
Normal file
|
@ -0,0 +1,22 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Ombi.Store.Migrations
|
||||
{
|
||||
public partial class LanguageCode : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "LangCode",
|
||||
table: "MovieRequests",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "LangCode",
|
||||
table: "MovieRequests");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -2,6 +2,7 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Ombi.Store.Context;
|
||||
|
||||
namespace Ombi.Store.Migrations
|
||||
|
@ -730,6 +731,8 @@ namespace Ombi.Store.Migrations
|
|||
|
||||
b.Property<int?>("IssueId");
|
||||
|
||||
b.Property<string>("LangCode");
|
||||
|
||||
b.Property<DateTime>("MarkedAsApproved");
|
||||
|
||||
b.Property<DateTime?>("MarkedAsAvailable");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue