Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8d55bfd2ff | |||
| f92b5a29d3 | |||
| 5fcc4afcd1 | |||
| b71807cf16 | |||
| b89ae349ca | |||
| cef19f9a22 | |||
| 94802dc123 | |||
| 7f824ee792 |
+19
-12
@@ -1,13 +1,20 @@
|
||||
pipeline:
|
||||
docker:
|
||||
kind: pipeline
|
||||
name: default
|
||||
|
||||
steps:
|
||||
- name: docker
|
||||
image: plugins/docker
|
||||
repo: phaefelfinger/tv7playlist
|
||||
tags:
|
||||
- latest
|
||||
- 2.0
|
||||
- 2.0.1
|
||||
secrets: [ docker_username, docker_password ]
|
||||
debug: true
|
||||
when:
|
||||
event: push
|
||||
branch: master
|
||||
settings:
|
||||
repo: phaefelfinger/tv7playlist
|
||||
tags:
|
||||
- latest
|
||||
- '3.0'
|
||||
- '3.0.0'
|
||||
username:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_password
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
- master
|
||||
+1
-1
@@ -92,7 +92,6 @@ AppPackages/
|
||||
[Bb]in
|
||||
[Oo]bj
|
||||
sql
|
||||
TestResults
|
||||
[Tt]est[Rr]esult*
|
||||
*.Cache
|
||||
ClientBin
|
||||
@@ -107,3 +106,4 @@ _UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
|
||||
*.blob
|
||||
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
FROM microsoft/dotnet:sdk AS build-env
|
||||
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build
|
||||
WORKDIR /app
|
||||
|
||||
# Copy everything else and build
|
||||
@@ -7,12 +7,12 @@ RUN dotnet restore Tv7Playlist.sln
|
||||
RUN dotnet publish -c Release -o out Tv7Playlist.sln
|
||||
|
||||
# Build runtime image
|
||||
FROM microsoft/dotnet:aspnetcore-runtime
|
||||
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1
|
||||
|
||||
WORKDIR /app
|
||||
RUN mkdir /data
|
||||
|
||||
COPY --from=build-env /app/Tv7Playlist/out .
|
||||
COPY --from=build /app/out .
|
||||
|
||||
ENV ASPNETCORE_URLS=http://+:80
|
||||
EXPOSE 80
|
||||
|
||||
@@ -18,6 +18,17 @@ There are more features than just changing the URL:
|
||||
|
||||
This is licensed under GPLv2. See License file.
|
||||
|
||||
## Possible breaking change of .net core 3.1.1 upgrade
|
||||
|
||||
Something changed within the entity framework driver for SqLite. A guid is now stored as a text and not blob anymore.
|
||||
With the wrong datatype, you will get an error if you try to update a record.
|
||||
The latest version of this application has a migration built in that should convert the blobs to the values as text.
|
||||
The migrations are applied automatically.
|
||||
|
||||
**Backup your database before starting the new version**
|
||||
|
||||
A workaround might be clearing your database and rebuilding it by syncing the latest playlist from init7.
|
||||
|
||||
## Docker
|
||||
|
||||
### Run the application
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
||||
<TargetFramework>netstandard2.1</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.2.6" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="3.1.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Tv7Playlist.Data;
|
||||
|
||||
namespace Tv7Playlist.Data.Migrations
|
||||
{
|
||||
[DbContext(typeof(PlaylistContext))]
|
||||
[Migration("20200206214445_DotnetCore3_1_upgrade")]
|
||||
partial class DotnetCore3_1_upgrade
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "3.1.1");
|
||||
|
||||
modelBuilder.Entity("Tv7Playlist.Data.PlaylistEntry", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("ChannelNumberExport")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("ChannelNumberImport")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<DateTime>("Created")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("EpgMatchName")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<bool>("IsAvailable")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<bool>("IsEnabled")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("LogoUrl")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<DateTime>("Modified")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("Position")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("UrlOriginal")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("UrlProxy")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ChannelNumberImport")
|
||||
.IsUnique();
|
||||
|
||||
b.HasIndex("Name");
|
||||
|
||||
b.ToTable("PlaylistEntries");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Tv7Playlist.Data.Migrations
|
||||
{
|
||||
public partial class DotnetCore3_1_upgrade : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
"PlaylistEntriesTemp",
|
||||
table => new
|
||||
{
|
||||
Id = table.Column<Guid>(),
|
||||
Position = table.Column<int>(),
|
||||
ChannelNumberImport = table.Column<int>(),
|
||||
ChannelNumberExport = table.Column<int>(),
|
||||
Name = table.Column<string>(nullable: true),
|
||||
EpgMatchName = table.Column<string>(nullable: true),
|
||||
UrlProxy = table.Column<string>(nullable: true),
|
||||
UrlOriginal = table.Column<string>(nullable: true),
|
||||
LogoUrl = table.Column<string>(nullable: true),
|
||||
IsAvailable = table.Column<bool>(),
|
||||
IsEnabled = table.Column<bool>(),
|
||||
Created = table.Column<DateTime>(),
|
||||
Modified = table.Column<DateTime>()
|
||||
});
|
||||
|
||||
migrationBuilder.Sql("INSERT INTO PlaylistEntriesTemp SELECT * From PlaylistEntries");
|
||||
|
||||
migrationBuilder.DropTable("PlaylistEntries");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
"PlaylistEntries",
|
||||
table => new
|
||||
{
|
||||
Id = table.Column<Guid>(),
|
||||
Position = table.Column<int>(),
|
||||
ChannelNumberImport = table.Column<int>(),
|
||||
ChannelNumberExport = table.Column<int>(),
|
||||
Name = table.Column<string>(nullable: true),
|
||||
EpgMatchName = table.Column<string>(nullable: true),
|
||||
UrlProxy = table.Column<string>(nullable: true),
|
||||
UrlOriginal = table.Column<string>(nullable: true),
|
||||
LogoUrl = table.Column<string>(nullable: true),
|
||||
IsAvailable = table.Column<bool>(),
|
||||
IsEnabled = table.Column<bool>(),
|
||||
Created = table.Column<DateTime>(),
|
||||
Modified = table.Column<DateTime>()
|
||||
},
|
||||
constraints: table => { table.PrimaryKey("PK_PlaylistEntries", x => x.Id); });
|
||||
|
||||
migrationBuilder.Sql("INSERT INTO PlaylistEntries SELECT * From PlaylistEntriesTemp");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
"IX_PlaylistEntries_ChannelNumberImport",
|
||||
"PlaylistEntries",
|
||||
"ChannelNumberImport",
|
||||
unique: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
"IX_PlaylistEntries_Name",
|
||||
"PlaylistEntries",
|
||||
"Name");
|
||||
|
||||
migrationBuilder.DropTable("PlaylistEntriesTemp");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,36 +14,49 @@ namespace Tv7Playlist.Data.Migrations
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "2.2.1-servicing-10028");
|
||||
.HasAnnotation("ProductVersion", "3.1.1");
|
||||
|
||||
modelBuilder.Entity("Tv7Playlist.Data.PlaylistEntry", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("ChannelNumberExport");
|
||||
b.Property<int>("ChannelNumberExport")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("ChannelNumberImport");
|
||||
b.Property<int>("ChannelNumberImport")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<DateTime>("Created");
|
||||
b.Property<DateTime>("Created")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("EpgMatchName");
|
||||
b.Property<string>("EpgMatchName")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<bool>("IsAvailable");
|
||||
b.Property<bool>("IsAvailable")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<bool>("IsEnabled");
|
||||
b.Property<bool>("IsEnabled")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("LogoUrl");
|
||||
b.Property<string>("LogoUrl")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<DateTime>("Modified");
|
||||
b.Property<DateTime>("Modified")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Name");
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("Position");
|
||||
b.Property<int>("Position")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("UrlOriginal");
|
||||
b.Property<string>("UrlOriginal")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("UrlProxy");
|
||||
b.Property<string>("UrlProxy")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<TargetFramework>netstandard2.1</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.2.6" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.2.6" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.2.6" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="2.0.3" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.1" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.1" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.1" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Tv7Playlist.Core;
|
||||
using Tv7Playlist.Core.Parsers;
|
||||
@@ -43,11 +43,11 @@ namespace Tv7Playlist
|
||||
ConfigureParser(services, appConfig);
|
||||
ConfigureDatabase(services, appConfig);
|
||||
|
||||
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
|
||||
services.AddRazorPages();
|
||||
}
|
||||
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
|
||||
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
||||
{
|
||||
if (env.IsDevelopment())
|
||||
{
|
||||
@@ -67,11 +67,12 @@ namespace Tv7Playlist
|
||||
app.UseStaticFiles();
|
||||
app.UseCookiePolicy();
|
||||
|
||||
app.UseMvc(routes =>
|
||||
app.UseRouting();
|
||||
app.UseEndpoints(endpoints =>
|
||||
{
|
||||
routes.MapRoute(
|
||||
"default",
|
||||
"{controller=Home}/{action=Index}/{id?}");
|
||||
endpoints.MapDefaultControllerRoute();
|
||||
endpoints.MapControllers();
|
||||
endpoints.MapRazorPages();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -1,17 +1,15 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.2.7" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.2.6" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.2.6" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.1" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.1" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
|
||||
<footer class="border-top footer text-muted">
|
||||
<div class="container">
|
||||
© 2018 - Philipp Häfelfinger - Tv7Playlist
|
||||
© 2018-2020 - Philipp Häfelfinger - Licensed under GPLv2 - Tv7Playlist
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user