mirror of https://github.com/ErsatzTV/ErsatzTV.git
10 changed files with 1397 additions and 17 deletions
@ -1,9 +1,12 @@
@@ -1,9 +1,12 @@
|
||||
namespace ErsatzTV.Core.Domain |
||||
using System; |
||||
|
||||
namespace ErsatzTV.Core.Domain |
||||
{ |
||||
public abstract class MediaSource |
||||
{ |
||||
public int Id { get; set; } |
||||
public MediaSourceType SourceType { get; set; } |
||||
public string Name { get; set; } |
||||
public DateTimeOffset? LastScan { get; set; } |
||||
} |
||||
} |
||||
|
||||
@ -0,0 +1,10 @@
@@ -0,0 +1,10 @@
|
||||
namespace ErsatzTV.Core.Errors |
||||
{ |
||||
public class MediaSourceRecentlyScanned : BaseError |
||||
{ |
||||
public MediaSourceRecentlyScanned(string folder) : |
||||
base($"Media source {folder} was already scanned recently; skipping scan.") |
||||
{ |
||||
} |
||||
} |
||||
} |
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,24 @@
@@ -0,0 +1,24 @@
|
||||
using System; |
||||
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
||||
namespace ErsatzTV.Infrastructure.Migrations |
||||
{ |
||||
public partial class MediaSourceLastScan : Migration |
||||
{ |
||||
protected override void Up(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.AddColumn<DateTimeOffset>( |
||||
name: "LastScan", |
||||
table: "MediaSources", |
||||
type: "TEXT", |
||||
nullable: true); |
||||
} |
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.DropColumn( |
||||
name: "LastScan", |
||||
table: "MediaSources"); |
||||
} |
||||
} |
||||
} |
||||
Loading…
Reference in new issue