jellyfin/Jellyfin.Server.Implementations/Migrations/20240729140605_AddMediaSegments.cs
JPVenson 00eb6c0d6f
Add media segments API (#12345)
* Added Media segment manager

* Added "HasSegments" to MediaSourceInfo when requesting though baseitem

* Fixed ordering of Media Segements

* Added media segment API controller

* Added .ConfigureAwait(false) on media segments manager

* renamed MediaSegmentsController
removed empty route

* Added Model layer for Media Segments
Fixed review comments Media segments

* Updated media segment naming
refactored api and manager usage

* Added mediaSegment type filter

* Fixed codesmell

* Fixed naming and typos

* Added EF Migration

* Added Identity Generation for MediaSegments
Made mediasegment filter optional

* Fixed optional filter parameter

* refactored segment namespace

* Added SegmentProviderId to MediaSegment

* Media segment comment indentation

* Added MediaSegmentManager query notracking
2024-08-05 14:20:27 +02:00

39 lines
1.3 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Jellyfin.Server.Implementations.Migrations
{
/// <inheritdoc />
public partial class AddMediaSegments : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "MediaSegments",
columns: table => new
{
Id = table.Column<Guid>(type: "TEXT", nullable: false),
ItemId = table.Column<Guid>(type: "TEXT", nullable: false),
Type = table.Column<int>(type: "INTEGER", nullable: false),
EndTicks = table.Column<long>(type: "INTEGER", nullable: false),
StartTicks = table.Column<long>(type: "INTEGER", nullable: false),
SegmentProviderId = table.Column<string>(type: "TEXT", nullable: false),
},
constraints: table =>
{
table.PrimaryKey("PK_MediaSegments", x => x.Id);
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "MediaSegments");
}
}
}