Fixed a bunch of jellyfin issues

pull/3954/head
tidusjar 3 years ago
parent 14c6170455
commit 6a062d5c40

@ -287,6 +287,7 @@ namespace Ombi.Core.Engine.V2
mapped.Requested = viewMovie.Requested; mapped.Requested = viewMovie.Requested;
mapped.PlexUrl = viewMovie.PlexUrl; mapped.PlexUrl = viewMovie.PlexUrl;
mapped.EmbyUrl = viewMovie.EmbyUrl; mapped.EmbyUrl = viewMovie.EmbyUrl;
mapped.JellyfinUrl = viewMovie.JellyfinUrl;
mapped.Subscribed = viewMovie.Subscribed; mapped.Subscribed = viewMovie.Subscribed;
mapped.ShowSubscribe = viewMovie.ShowSubscribe; mapped.ShowSubscribe = viewMovie.ShowSubscribe;

@ -74,7 +74,8 @@ namespace Ombi.Core.Rule.Rules.Search
} }
else else
{ {
obj.JellyfinUrl = JellyfinHelper.GetJellyfinMediaUrl(item.JellyfinId, server?.ServerId, null); var firstServer = s.Servers?.FirstOrDefault();
obj.JellyfinUrl = JellyfinHelper.GetJellyfinMediaUrl(item.JellyfinId, firstServer.ServerId, firstServer.FullUri);
} }
} }

@ -11,5 +11,8 @@
public string StoragePath { get; set; } public string StoragePath { get; set; }
public string SecurityKey { get; set; } public string SecurityKey { get; set; }
#if DEBUG
= "test";
#endif
} }
} }

@ -224,7 +224,7 @@ namespace Ombi.Schedule.Jobs.Ombi
if (!hasImdb) if (!hasImdb)
{ {
var id = await GetImdbId(hasTheMovieDb, hasTvDbId, show.Title, show.TheMovieDbId, show.TvDbId); var id = await GetImdbId(hasTheMovieDb, hasTvDbId, show.Title, show.TheMovieDbId, show.TvDbId, RequestType.TvShow);
show.ImdbId = id; show.ImdbId = id;
_jellyfinRepo.UpdateWithoutSave(show); _jellyfinRepo.UpdateWithoutSave(show);
} }
@ -364,7 +364,7 @@ namespace Ombi.Schedule.Jobs.Ombi
if (!movie.HasImdb) if (!movie.HasImdb)
{ {
var imdbId = await GetImdbId(movie.HasTheMovieDb, false, movie.Title, movie.TheMovieDbId, string.Empty); var imdbId = await GetImdbId(movie.HasTheMovieDb, false, movie.Title, movie.TheMovieDbId, string.Empty, RequestType.Movie);
movie.ImdbId = imdbId; movie.ImdbId = imdbId;
_jellyfinRepo.UpdateWithoutSave(movie); _jellyfinRepo.UpdateWithoutSave(movie);
} }

@ -9,23 +9,24 @@ using Ombi.Store.Context.MySql;
namespace Ombi.Store.Migrations.ExternalMySql namespace Ombi.Store.Migrations.ExternalMySql
{ {
[DbContext(typeof(ExternalMySqlContext))] [DbContext(typeof(ExternalMySqlContext))]
[Migration("20201212014227_Jellyfin")] [Migration("20210103205509_Jellyfin")]
partial class Jellyfin partial class Jellyfin
{ {
protected override void BuildTargetModel(ModelBuilder modelBuilder) protected override void BuildTargetModel(ModelBuilder modelBuilder)
{ {
#pragma warning disable 612, 618 #pragma warning disable 612, 618
modelBuilder modelBuilder
.HasAnnotation("Relational:MaxIdentifierLength", 64)
.HasAnnotation("ProductVersion", "5.0.1"); .HasAnnotation("ProductVersion", "5.0.1");
modelBuilder.Entity("Ombi.Store.Entities.CouchPotatoCache", b => modelBuilder.Entity("Ombi.Store.Entities.CouchPotatoCache", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("INTEGER"); .HasColumnType("int");
b.Property<int>("TheMovieDbId") b.Property<int>("TheMovieDbId")
.HasColumnType("INTEGER"); .HasColumnType("int");
b.HasKey("Id"); b.HasKey("Id");
@ -36,35 +37,35 @@ namespace Ombi.Store.Migrations.ExternalMySql
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("INTEGER"); .HasColumnType("int");
b.Property<DateTime>("AddedAt") b.Property<DateTime>("AddedAt")
.HasColumnType("TEXT"); .HasColumnType("datetime(6)");
b.Property<string>("EmbyId") b.Property<string>("EmbyId")
.IsRequired() .IsRequired()
.HasColumnType("TEXT"); .HasColumnType("varchar(255)");
b.Property<string>("ImdbId") b.Property<string>("ImdbId")
.HasColumnType("TEXT"); .HasColumnType("longtext");
b.Property<string>("ProviderId") b.Property<string>("ProviderId")
.HasColumnType("TEXT"); .HasColumnType("longtext");
b.Property<string>("TheMovieDbId") b.Property<string>("TheMovieDbId")
.HasColumnType("TEXT"); .HasColumnType("longtext");
b.Property<string>("Title") b.Property<string>("Title")
.HasColumnType("TEXT"); .HasColumnType("longtext");
b.Property<string>("TvDbId") b.Property<string>("TvDbId")
.HasColumnType("TEXT"); .HasColumnType("longtext");
b.Property<int>("Type") b.Property<int>("Type")
.HasColumnType("INTEGER"); .HasColumnType("int");
b.Property<string>("Url") b.Property<string>("Url")
.HasColumnType("TEXT"); .HasColumnType("longtext");
b.HasKey("Id"); b.HasKey("Id");
@ -75,37 +76,37 @@ namespace Ombi.Store.Migrations.ExternalMySql
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("INTEGER"); .HasColumnType("int");
b.Property<DateTime>("AddedAt") b.Property<DateTime>("AddedAt")
.HasColumnType("TEXT"); .HasColumnType("datetime(6)");
b.Property<string>("EmbyId") b.Property<string>("EmbyId")
.HasColumnType("TEXT"); .HasColumnType("longtext");
b.Property<int>("EpisodeNumber") b.Property<int>("EpisodeNumber")
.HasColumnType("INTEGER"); .HasColumnType("int");
b.Property<string>("ImdbId") b.Property<string>("ImdbId")
.HasColumnType("TEXT"); .HasColumnType("longtext");
b.Property<string>("ParentId") b.Property<string>("ParentId")
.HasColumnType("TEXT"); .HasColumnType("varchar(255)");
b.Property<string>("ProviderId") b.Property<string>("ProviderId")
.HasColumnType("TEXT"); .HasColumnType("longtext");
b.Property<int>("SeasonNumber") b.Property<int>("SeasonNumber")
.HasColumnType("INTEGER"); .HasColumnType("int");
b.Property<string>("TheMovieDbId") b.Property<string>("TheMovieDbId")
.HasColumnType("TEXT"); .HasColumnType("longtext");
b.Property<string>("Title") b.Property<string>("Title")
.HasColumnType("TEXT"); .HasColumnType("longtext");
b.Property<string>("TvDbId") b.Property<string>("TvDbId")
.HasColumnType("TEXT"); .HasColumnType("longtext");
b.HasKey("Id"); b.HasKey("Id");
@ -118,35 +119,35 @@ namespace Ombi.Store.Migrations.ExternalMySql
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("INTEGER"); .HasColumnType("int");
b.Property<DateTime>("AddedAt") b.Property<DateTime>("AddedAt")
.HasColumnType("TEXT"); .HasColumnType("datetime(6)");
b.Property<string>("ImdbId") b.Property<string>("ImdbId")
.HasColumnType("TEXT"); .HasColumnType("longtext");
b.Property<string>("JellyfinId") b.Property<string>("JellyfinId")
.IsRequired() .IsRequired()
.HasColumnType("TEXT"); .HasColumnType("varchar(255)");
b.Property<string>("ProviderId") b.Property<string>("ProviderId")
.HasColumnType("TEXT"); .HasColumnType("longtext");
b.Property<string>("TheMovieDbId") b.Property<string>("TheMovieDbId")
.HasColumnType("TEXT"); .HasColumnType("longtext");
b.Property<string>("Title") b.Property<string>("Title")
.HasColumnType("TEXT"); .HasColumnType("longtext");
b.Property<string>("TvDbId") b.Property<string>("TvDbId")
.HasColumnType("TEXT"); .HasColumnType("longtext");
b.Property<int>("Type") b.Property<int>("Type")
.HasColumnType("INTEGER"); .HasColumnType("int");
b.Property<string>("Url") b.Property<string>("Url")
.HasColumnType("TEXT"); .HasColumnType("longtext");
b.HasKey("Id"); b.HasKey("Id");
@ -157,37 +158,37 @@ namespace Ombi.Store.Migrations.ExternalMySql
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("INTEGER"); .HasColumnType("int");
b.Property<DateTime>("AddedAt") b.Property<DateTime>("AddedAt")
.HasColumnType("TEXT"); .HasColumnType("datetime(6)");
b.Property<int>("EpisodeNumber") b.Property<int>("EpisodeNumber")
.HasColumnType("INTEGER"); .HasColumnType("int");
b.Property<string>("ImdbId") b.Property<string>("ImdbId")
.HasColumnType("TEXT"); .HasColumnType("longtext");
b.Property<string>("JellyfinId") b.Property<string>("JellyfinId")
.HasColumnType("TEXT"); .HasColumnType("longtext");
b.Property<string>("ParentId") b.Property<string>("ParentId")
.HasColumnType("TEXT"); .HasColumnType("varchar(255)");
b.Property<string>("ProviderId") b.Property<string>("ProviderId")
.HasColumnType("TEXT"); .HasColumnType("longtext");
b.Property<int>("SeasonNumber") b.Property<int>("SeasonNumber")
.HasColumnType("INTEGER"); .HasColumnType("int");
b.Property<string>("TheMovieDbId") b.Property<string>("TheMovieDbId")
.HasColumnType("TEXT"); .HasColumnType("longtext");
b.Property<string>("Title") b.Property<string>("Title")
.HasColumnType("TEXT"); .HasColumnType("longtext");
b.Property<string>("TvDbId") b.Property<string>("TvDbId")
.HasColumnType("TEXT"); .HasColumnType("longtext");
b.HasKey("Id"); b.HasKey("Id");
@ -200,31 +201,31 @@ namespace Ombi.Store.Migrations.ExternalMySql
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("INTEGER"); .HasColumnType("int");
b.Property<DateTime>("AddedAt") b.Property<DateTime>("AddedAt")
.HasColumnType("TEXT"); .HasColumnType("datetime(6)");
b.Property<int>("ArtistId") b.Property<int>("ArtistId")
.HasColumnType("INTEGER"); .HasColumnType("int");
b.Property<string>("ForeignAlbumId") b.Property<string>("ForeignAlbumId")
.HasColumnType("TEXT"); .HasColumnType("longtext");
b.Property<bool>("Monitored") b.Property<bool>("Monitored")
.HasColumnType("INTEGER"); .HasColumnType("tinyint(1)");
b.Property<decimal>("PercentOfTracks") b.Property<decimal>("PercentOfTracks")
.HasColumnType("TEXT"); .HasColumnType("decimal(65,30)");
b.Property<DateTime>("ReleaseDate") b.Property<DateTime>("ReleaseDate")
.HasColumnType("TEXT"); .HasColumnType("datetime(6)");
b.Property<string>("Title") b.Property<string>("Title")
.HasColumnType("TEXT"); .HasColumnType("longtext");
b.Property<int>("TrackCount") b.Property<int>("TrackCount")
.HasColumnType("INTEGER"); .HasColumnType("int");
b.HasKey("Id"); b.HasKey("Id");
@ -235,19 +236,19 @@ namespace Ombi.Store.Migrations.ExternalMySql
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("INTEGER"); .HasColumnType("int");
b.Property<int>("ArtistId") b.Property<int>("ArtistId")
.HasColumnType("INTEGER"); .HasColumnType("int");
b.Property<string>("ArtistName") b.Property<string>("ArtistName")
.HasColumnType("TEXT"); .HasColumnType("longtext");
b.Property<string>("ForeignArtistId") b.Property<string>("ForeignArtistId")
.HasColumnType("TEXT"); .HasColumnType("longtext");
b.Property<bool>("Monitored") b.Property<bool>("Monitored")
.HasColumnType("INTEGER"); .HasColumnType("tinyint(1)");
b.HasKey("Id"); b.HasKey("Id");
@ -258,25 +259,25 @@ namespace Ombi.Store.Migrations.ExternalMySql
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("INTEGER"); .HasColumnType("int");
b.Property<int>("EpisodeNumber") b.Property<int>("EpisodeNumber")
.HasColumnType("INTEGER"); .HasColumnType("int");
b.Property<int>("GrandparentKey") b.Property<int>("GrandparentKey")
.HasColumnType("INTEGER"); .HasColumnType("int");
b.Property<int>("Key") b.Property<int>("Key")
.HasColumnType("INTEGER"); .HasColumnType("int");
b.Property<int>("ParentKey") b.Property<int>("ParentKey")
.HasColumnType("INTEGER"); .HasColumnType("int");
b.Property<int>("SeasonNumber") b.Property<int>("SeasonNumber")
.HasColumnType("INTEGER"); .HasColumnType("int");
b.Property<string>("Title") b.Property<string>("Title")
.HasColumnType("TEXT"); .HasColumnType("longtext");
b.HasKey("Id"); b.HasKey("Id");
@ -289,22 +290,22 @@ namespace Ombi.Store.Migrations.ExternalMySql
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("INTEGER"); .HasColumnType("int");
b.Property<int>("ParentKey") b.Property<int>("ParentKey")
.HasColumnType("INTEGER"); .HasColumnType("int");
b.Property<int>("PlexContentId") b.Property<int>("PlexContentId")
.HasColumnType("INTEGER"); .HasColumnType("int");
b.Property<int?>("PlexServerContentId") b.Property<int?>("PlexServerContentId")
.HasColumnType("INTEGER"); .HasColumnType("int");
b.Property<int>("SeasonKey") b.Property<int>("SeasonKey")
.HasColumnType("INTEGER"); .HasColumnType("int");
b.Property<int>("SeasonNumber") b.Property<int>("SeasonNumber")
.HasColumnType("INTEGER"); .HasColumnType("int");
b.HasKey("Id"); b.HasKey("Id");
@ -317,40 +318,40 @@ namespace Ombi.Store.Migrations.ExternalMySql
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("INTEGER"); .HasColumnType("int");
b.Property<DateTime>("AddedAt") b.Property<DateTime>("AddedAt")
.HasColumnType("TEXT"); .HasColumnType("datetime(6)");
b.Property<string>("ImdbId") b.Property<string>("ImdbId")
.HasColumnType("TEXT"); .HasColumnType("longtext");
b.Property<int>("Key") b.Property<int>("Key")
.HasColumnType("INTEGER"); .HasColumnType("int");
b.Property<string>("Quality") b.Property<string>("Quality")
.HasColumnType("TEXT"); .HasColumnType("longtext");
b.Property<string>("ReleaseYear") b.Property<string>("ReleaseYear")
.HasColumnType("TEXT"); .HasColumnType("longtext");
b.Property<int?>("RequestId") b.Property<int?>("RequestId")
.HasColumnType("INTEGER"); .HasColumnType("int");
b.Property<string>("TheMovieDbId") b.Property<string>("TheMovieDbId")
.HasColumnType("TEXT"); .HasColumnType("longtext");
b.Property<string>("Title") b.Property<string>("Title")
.HasColumnType("TEXT"); .HasColumnType("longtext");
b.Property<string>("TvDbId") b.Property<string>("TvDbId")
.HasColumnType("TEXT"); .HasColumnType("longtext");
b.Property<int>("Type") b.Property<int>("Type")
.HasColumnType("INTEGER"); .HasColumnType("int");
b.Property<string>("Url") b.Property<string>("Url")
.HasColumnType("TEXT"); .HasColumnType("longtext");
b.HasKey("Id"); b.HasKey("Id");
@ -361,13 +362,13 @@ namespace Ombi.Store.Migrations.ExternalMySql
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("INTEGER"); .HasColumnType("int");
b.Property<bool>("HasFile") b.Property<bool>("HasFile")
.HasColumnType("INTEGER"); .HasColumnType("tinyint(1)");
b.Property<int>("TheMovieDbId") b.Property<int>("TheMovieDbId")
.HasColumnType("INTEGER"); .HasColumnType("int");
b.HasKey("Id"); b.HasKey("Id");
@ -378,10 +379,10 @@ namespace Ombi.Store.Migrations.ExternalMySql
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("INTEGER"); .HasColumnType("int");
b.Property<int>("TvDbId") b.Property<int>("TvDbId")
.HasColumnType("INTEGER"); .HasColumnType("int");
b.HasKey("Id"); b.HasKey("Id");
@ -392,16 +393,16 @@ namespace Ombi.Store.Migrations.ExternalMySql
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("INTEGER"); .HasColumnType("int");
b.Property<int>("EpisodeNumber") b.Property<int>("EpisodeNumber")
.HasColumnType("INTEGER"); .HasColumnType("int");
b.Property<int>("SeasonNumber") b.Property<int>("SeasonNumber")
.HasColumnType("INTEGER"); .HasColumnType("int");
b.Property<int>("TvDbId") b.Property<int>("TvDbId")
.HasColumnType("INTEGER"); .HasColumnType("int");
b.HasKey("Id"); b.HasKey("Id");
@ -412,10 +413,10 @@ namespace Ombi.Store.Migrations.ExternalMySql
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("INTEGER"); .HasColumnType("int");
b.Property<int>("TvDbId") b.Property<int>("TvDbId")
.HasColumnType("INTEGER"); .HasColumnType("int");
b.HasKey("Id"); b.HasKey("Id");
@ -426,19 +427,19 @@ namespace Ombi.Store.Migrations.ExternalMySql
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("INTEGER"); .HasColumnType("int");
b.Property<int>("EpisodeNumber") b.Property<int>("EpisodeNumber")
.HasColumnType("INTEGER"); .HasColumnType("int");
b.Property<bool>("HasFile") b.Property<bool>("HasFile")
.HasColumnType("INTEGER"); .HasColumnType("tinyint(1)");
b.Property<int>("SeasonNumber") b.Property<int>("SeasonNumber")
.HasColumnType("INTEGER"); .HasColumnType("int");
b.Property<int>("TvDbId") b.Property<int>("TvDbId")
.HasColumnType("INTEGER"); .HasColumnType("int");
b.HasKey("Id"); b.HasKey("Id");

@ -12,17 +12,17 @@ namespace Ombi.Store.Migrations.ExternalMySql
name: "JellyfinContent", name: "JellyfinContent",
columns: table => new columns: table => new
{ {
Id = table.Column<int>(nullable: false) Id = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Title = table.Column<string>(nullable: true), Title = table.Column<string>(type: "longtext", nullable: true),
ProviderId = table.Column<string>(nullable: true), ProviderId = table.Column<string>(type: "longtext", nullable: true),
JellyfinId = table.Column<string>(nullable: false), JellyfinId = table.Column<string>(type: "varchar(255)", nullable: false),
Type = table.Column<int>(nullable: false), Type = table.Column<int>(type: "int", nullable: false),
AddedAt = table.Column<DateTime>(nullable: false), AddedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
ImdbId = table.Column<string>(nullable: true), ImdbId = table.Column<string>(type: "longtext", nullable: true),
TheMovieDbId = table.Column<string>(nullable: true), TheMovieDbId = table.Column<string>(type: "longtext", nullable: true),
TvDbId = table.Column<string>(nullable: true), TvDbId = table.Column<string>(type: "longtext", nullable: true),
Url = table.Column<string>(nullable: true) Url = table.Column<string>(type: "longtext", nullable: true)
}, },
constraints: table => constraints: table =>
{ {
@ -34,18 +34,18 @@ namespace Ombi.Store.Migrations.ExternalMySql
name: "JellyfinEpisode", name: "JellyfinEpisode",
columns: table => new columns: table => new
{ {
Id = table.Column<int>(nullable: false) Id = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Title = table.Column<string>(nullable: true), Title = table.Column<string>(type: "longtext", nullable: true),
JellyfinId = table.Column<string>(nullable: true), JellyfinId = table.Column<string>(type: "longtext", nullable: true),
EpisodeNumber = table.Column<int>(nullable: false), EpisodeNumber = table.Column<int>(type: "int", nullable: false),
SeasonNumber = table.Column<int>(nullable: false), SeasonNumber = table.Column<int>(type: "int", nullable: false),
ParentId = table.Column<string>(nullable: true), ParentId = table.Column<string>(type: "varchar(255)", nullable: true),
ProviderId = table.Column<string>(nullable: true), ProviderId = table.Column<string>(type: "longtext", nullable: true),
AddedAt = table.Column<DateTime>(nullable: false), AddedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
TvDbId = table.Column<string>(nullable: true), TvDbId = table.Column<string>(type: "longtext", nullable: true),
ImdbId = table.Column<string>(nullable: true), ImdbId = table.Column<string>(type: "longtext", nullable: true),
TheMovieDbId = table.Column<string>(nullable: true) TheMovieDbId = table.Column<string>(type: "longtext", nullable: true)
}, },
constraints: table => constraints: table =>
{ {
@ -67,10 +67,10 @@ namespace Ombi.Store.Migrations.ExternalMySql
protected override void Down(MigrationBuilder migrationBuilder) protected override void Down(MigrationBuilder migrationBuilder)
{ {
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "JellyfinContent"); name: "JellyfinEpisode");
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "JellyfinEpisode"); name: "JellyfinContent");
} }
} }
} }

@ -14,8 +14,8 @@ namespace Ombi.Store.Migrations.ExternalMySql
{ {
#pragma warning disable 612, 618 #pragma warning disable 612, 618
modelBuilder modelBuilder
.HasAnnotation("ProductVersion", "3.1.1") .HasAnnotation("Relational:MaxIdentifierLength", 64)
.HasAnnotation("Relational:MaxIdentifierLength", 64); .HasAnnotation("ProductVersion", "5.0.1");
modelBuilder.Entity("Ombi.Store.Entities.CouchPotatoCache", b => modelBuilder.Entity("Ombi.Store.Entities.CouchPotatoCache", b =>
{ {
@ -42,28 +42,28 @@ namespace Ombi.Store.Migrations.ExternalMySql
b.Property<string>("EmbyId") b.Property<string>("EmbyId")
.IsRequired() .IsRequired()
.HasColumnType("varchar(255) CHARACTER SET utf8mb4"); .HasColumnType("varchar(255)");
b.Property<string>("ImdbId") b.Property<string>("ImdbId")
.HasColumnType("longtext CHARACTER SET utf8mb4"); .HasColumnType("longtext");
b.Property<string>("ProviderId") b.Property<string>("ProviderId")
.HasColumnType("longtext CHARACTER SET utf8mb4"); .HasColumnType("longtext");
b.Property<string>("TheMovieDbId") b.Property<string>("TheMovieDbId")
.HasColumnType("longtext CHARACTER SET utf8mb4"); .HasColumnType("longtext");
b.Property<string>("Title") b.Property<string>("Title")
.HasColumnType("longtext CHARACTER SET utf8mb4"); .HasColumnType("longtext");
b.Property<string>("TvDbId") b.Property<string>("TvDbId")
.HasColumnType("longtext CHARACTER SET utf8mb4"); .HasColumnType("longtext");
b.Property<int>("Type") b.Property<int>("Type")
.HasColumnType("int"); .HasColumnType("int");
b.Property<string>("Url") b.Property<string>("Url")
.HasColumnType("longtext CHARACTER SET utf8mb4"); .HasColumnType("longtext");
b.HasKey("Id"); b.HasKey("Id");
@ -80,31 +80,31 @@ namespace Ombi.Store.Migrations.ExternalMySql
.HasColumnType("datetime(6)"); .HasColumnType("datetime(6)");
b.Property<string>("EmbyId") b.Property<string>("EmbyId")
.HasColumnType("longtext CHARACTER SET utf8mb4"); .HasColumnType("longtext");
b.Property<int>("EpisodeNumber") b.Property<int>("EpisodeNumber")
.HasColumnType("int"); .HasColumnType("int");
b.Property<string>("ImdbId") b.Property<string>("ImdbId")
.HasColumnType("longtext CHARACTER SET utf8mb4"); .HasColumnType("longtext");
b.Property<string>("ParentId") b.Property<string>("ParentId")
.HasColumnType("varchar(255) CHARACTER SET utf8mb4"); .HasColumnType("varchar(255)");
b.Property<string>("ProviderId") b.Property<string>("ProviderId")
.HasColumnType("longtext CHARACTER SET utf8mb4"); .HasColumnType("longtext");
b.Property<int>("SeasonNumber") b.Property<int>("SeasonNumber")
.HasColumnType("int"); .HasColumnType("int");
b.Property<string>("TheMovieDbId") b.Property<string>("TheMovieDbId")
.HasColumnType("longtext CHARACTER SET utf8mb4"); .HasColumnType("longtext");
b.Property<string>("Title") b.Property<string>("Title")
.HasColumnType("longtext CHARACTER SET utf8mb4"); .HasColumnType("longtext");
b.Property<string>("TvDbId") b.Property<string>("TvDbId")
.HasColumnType("longtext CHARACTER SET utf8mb4"); .HasColumnType("longtext");
b.HasKey("Id"); b.HasKey("Id");
@ -123,29 +123,29 @@ namespace Ombi.Store.Migrations.ExternalMySql
.HasColumnType("datetime(6)"); .HasColumnType("datetime(6)");
b.Property<string>("ImdbId") b.Property<string>("ImdbId")
.HasColumnType("longtext CHARACTER SET utf8mb4"); .HasColumnType("longtext");
b.Property<string>("JellyfinId") b.Property<string>("JellyfinId")
.IsRequired() .IsRequired()
.HasColumnType("varchar(255) CHARACTER SET utf8mb4"); .HasColumnType("varchar(255)");
b.Property<string>("ProviderId") b.Property<string>("ProviderId")
.HasColumnType("longtext CHARACTER SET utf8mb4"); .HasColumnType("longtext");
b.Property<string>("TheMovieDbId") b.Property<string>("TheMovieDbId")
.HasColumnType("longtext CHARACTER SET utf8mb4"); .HasColumnType("longtext");
b.Property<string>("Title") b.Property<string>("Title")
.HasColumnType("longtext CHARACTER SET utf8mb4"); .HasColumnType("longtext");
b.Property<string>("TvDbId") b.Property<string>("TvDbId")
.HasColumnType("longtext CHARACTER SET utf8mb4"); .HasColumnType("longtext");
b.Property<int>("Type") b.Property<int>("Type")
.HasColumnType("int"); .HasColumnType("int");
b.Property<string>("Url") b.Property<string>("Url")
.HasColumnType("longtext CHARACTER SET utf8mb4"); .HasColumnType("longtext");
b.HasKey("Id"); b.HasKey("Id");
@ -159,34 +159,34 @@ namespace Ombi.Store.Migrations.ExternalMySql
.HasColumnType("int"); .HasColumnType("int");
b.Property<DateTime>("AddedAt") b.Property<DateTime>("AddedAt")
.HasColumnType("dateime(6)"); .HasColumnType("datetime(6)");
b.Property<int>("EpisodeNumber") b.Property<int>("EpisodeNumber")
.HasColumnType("int"); .HasColumnType("int");
b.Property<string>("ImdbId") b.Property<string>("ImdbId")
.HasColumnType("longtext CHARACTER SET utf8mb4"); .HasColumnType("longtext");
b.Property<string>("JellyfinId") b.Property<string>("JellyfinId")
.HasColumnType("longtext CHARACTER SET utf8mb4"); .HasColumnType("longtext");
b.Property<string>("ParentId") b.Property<string>("ParentId")
.HasColumnType("varchar(255) CHARACTER SET utf8mb4"); .HasColumnType("varchar(255)");
b.Property<string>("ProviderId") b.Property<string>("ProviderId")
.HasColumnType("longtext CHARACTER SET utf8mb4"); .HasColumnType("longtext");
b.Property<int>("SeasonNumber") b.Property<int>("SeasonNumber")
.HasColumnType("int"); .HasColumnType("int");
b.Property<string>("TheMovieDbId") b.Property<string>("TheMovieDbId")
.HasColumnType("longtext CHARACTER SET utf8mb4"); .HasColumnType("longtext");
b.Property<string>("Title") b.Property<string>("Title")
.HasColumnType("longtext CHARACTER SET utf8mb4"); .HasColumnType("longtext");
b.Property<string>("TvDbId") b.Property<string>("TvDbId")
.HasColumnType("longtext CHARACTER SET utf8mb4"); .HasColumnType("longtext");
b.HasKey("Id"); b.HasKey("Id");
@ -208,7 +208,7 @@ namespace Ombi.Store.Migrations.ExternalMySql
.HasColumnType("int"); .HasColumnType("int");
b.Property<string>("ForeignAlbumId") b.Property<string>("ForeignAlbumId")
.HasColumnType("longtext CHARACTER SET utf8mb4"); .HasColumnType("longtext");
b.Property<bool>("Monitored") b.Property<bool>("Monitored")
.HasColumnType("tinyint(1)"); .HasColumnType("tinyint(1)");
@ -220,7 +220,7 @@ namespace Ombi.Store.Migrations.ExternalMySql
.HasColumnType("datetime(6)"); .HasColumnType("datetime(6)");
b.Property<string>("Title") b.Property<string>("Title")
.HasColumnType("longtext CHARACTER SET utf8mb4"); .HasColumnType("longtext");
b.Property<int>("TrackCount") b.Property<int>("TrackCount")
.HasColumnType("int"); .HasColumnType("int");
@ -240,10 +240,10 @@ namespace Ombi.Store.Migrations.ExternalMySql
.HasColumnType("int"); .HasColumnType("int");
b.Property<string>("ArtistName") b.Property<string>("ArtistName")
.HasColumnType("longtext CHARACTER SET utf8mb4"); .HasColumnType("longtext");
b.Property<string>("ForeignArtistId") b.Property<string>("ForeignArtistId")
.HasColumnType("longtext CHARACTER SET utf8mb4"); .HasColumnType("longtext");
b.Property<bool>("Monitored") b.Property<bool>("Monitored")
.HasColumnType("tinyint(1)"); .HasColumnType("tinyint(1)");
@ -275,7 +275,7 @@ namespace Ombi.Store.Migrations.ExternalMySql
.HasColumnType("int"); .HasColumnType("int");
b.Property<string>("Title") b.Property<string>("Title")
.HasColumnType("longtext CHARACTER SET utf8mb4"); .HasColumnType("longtext");
b.HasKey("Id"); b.HasKey("Id");
@ -322,34 +322,34 @@ namespace Ombi.Store.Migrations.ExternalMySql
.HasColumnType("datetime(6)"); .HasColumnType("datetime(6)");
b.Property<string>("ImdbId") b.Property<string>("ImdbId")
.HasColumnType("longtext CHARACTER SET utf8mb4"); .HasColumnType("longtext");
b.Property<int>("Key") b.Property<int>("Key")
.HasColumnType("int"); .HasColumnType("int");
b.Property<string>("Quality") b.Property<string>("Quality")
.HasColumnType("longtext CHARACTER SET utf8mb4"); .HasColumnType("longtext");
b.Property<string>("ReleaseYear") b.Property<string>("ReleaseYear")
.HasColumnType("longtext CHARACTER SET utf8mb4"); .HasColumnType("longtext");
b.Property<int?>("RequestId") b.Property<int?>("RequestId")
.HasColumnType("int"); .HasColumnType("int");
b.Property<string>("TheMovieDbId") b.Property<string>("TheMovieDbId")
.HasColumnType("longtext CHARACTER SET utf8mb4"); .HasColumnType("longtext");
b.Property<string>("Title") b.Property<string>("Title")
.HasColumnType("longtext CHARACTER SET utf8mb4"); .HasColumnType("longtext");
b.Property<string>("TvDbId") b.Property<string>("TvDbId")
.HasColumnType("longtext CHARACTER SET utf8mb4"); .HasColumnType("longtext");
b.Property<int>("Type") b.Property<int>("Type")
.HasColumnType("int"); .HasColumnType("int");
b.Property<string>("Url") b.Property<string>("Url")
.HasColumnType("longtext CHARACTER SET utf8mb4"); .HasColumnType("longtext");
b.HasKey("Id"); b.HasKey("Id");

@ -39,7 +39,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ombi.Schedule", "Ombi.Sched
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ombi.Api.Emby", "Ombi.Api.Emby\Ombi.Api.Emby.csproj", "{08FF107D-31E1-470D-AF86-E09B015CEE06}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ombi.Api.Emby", "Ombi.Api.Emby\Ombi.Api.Emby.csproj", "{08FF107D-31E1-470D-AF86-E09B015CEE06}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ombi.Api.Jellyfin", "Ombi.Api.Jellyfin\Ombi.Api.Jellyfin.csproj", "{08FF107D-31E1-470D-AF86-E09B015CEE06}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ombi.Api.Jellyfin", "Ombi.Api.Jellyfin\Ombi.Api.Jellyfin.csproj", "{F03757C7-5145-45C9-AFFF-B4E946755779}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ombi.Api.Sonarr", "Ombi.Api.Sonarr\Ombi.Api.Sonarr.csproj", "{CFB5E008-D0D0-43C0-AA06-89E49D17F384}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ombi.Api.Sonarr", "Ombi.Api.Sonarr\Ombi.Api.Sonarr.csproj", "{CFB5E008-D0D0-43C0-AA06-89E49D17F384}"
EndProject EndProject
@ -171,6 +171,10 @@ Global
{08FF107D-31E1-470D-AF86-E09B015CEE06}.Debug|Any CPU.Build.0 = Debug|Any CPU {08FF107D-31E1-470D-AF86-E09B015CEE06}.Debug|Any CPU.Build.0 = Debug|Any CPU
{08FF107D-31E1-470D-AF86-E09B015CEE06}.Release|Any CPU.ActiveCfg = Release|Any CPU {08FF107D-31E1-470D-AF86-E09B015CEE06}.Release|Any CPU.ActiveCfg = Release|Any CPU
{08FF107D-31E1-470D-AF86-E09B015CEE06}.Release|Any CPU.Build.0 = Release|Any CPU {08FF107D-31E1-470D-AF86-E09B015CEE06}.Release|Any CPU.Build.0 = Release|Any CPU
{F03757C7-5145-45C9-AFFF-B4E946755779}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F03757C7-5145-45C9-AFFF-B4E946755779}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F03757C7-5145-45C9-AFFF-B4E946755779}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F03757C7-5145-45C9-AFFF-B4E946755779}.Release|Any CPU.Build.0 = Release|Any CPU
{CFB5E008-D0D0-43C0-AA06-89E49D17F384}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {CFB5E008-D0D0-43C0-AA06-89E49D17F384}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CFB5E008-D0D0-43C0-AA06-89E49D17F384}.Debug|Any CPU.Build.0 = Debug|Any CPU {CFB5E008-D0D0-43C0-AA06-89E49D17F384}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CFB5E008-D0D0-43C0-AA06-89E49D17F384}.Release|Any CPU.ActiveCfg = Release|Any CPU {CFB5E008-D0D0-43C0-AA06-89E49D17F384}.Release|Any CPU.ActiveCfg = Release|Any CPU

@ -24,9 +24,9 @@
Season {{season.seasonNumber}}</mat-checkbox> Season {{season.seasonNumber}}</mat-checkbox>
<span *ngIf="season.seasonAvailable">Season {{season.seasonNumber}}</span> <span *ngIf="season.seasonAvailable">Season {{season.seasonNumber}}</span>
</mat-panel-title> </mat-panel-title>
<mat-panel-description> <!-- <mat-panel-description>
Description Description
</mat-panel-description> </mat-panel-description> -->
</mat-expansion-panel-header> </mat-expansion-panel-header>
<div class="row" *ngFor="let ep of season.episodes"> <div class="row" *ngFor="let ep of season.episodes">

@ -6,6 +6,7 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Ombi.Api.CouchPotato; using Ombi.Api.CouchPotato;
using Ombi.Api.Emby; using Ombi.Api.Emby;
using Ombi.Api.Jellyfin;
using Ombi.Api.Lidarr; using Ombi.Api.Lidarr;
using Ombi.Api.Plex; using Ombi.Api.Plex;
using Ombi.Api.Radarr; using Ombi.Api.Radarr;
@ -37,6 +38,7 @@ namespace Ombi.Controllers.V1.External
[Produces("application/json")] [Produces("application/json")]
public class TesterController : Controller public class TesterController : Controller
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="TesterController" /> class. /// Initializes a new instance of the <see cref="TesterController" /> class.
/// </summary> /// </summary>
@ -44,7 +46,8 @@ namespace Ombi.Controllers.V1.External
IPushbulletNotification pushbullet, ISlackNotification slack, IPushoverNotification po, IMattermostNotification mm, IPushbulletNotification pushbullet, ISlackNotification slack, IPushoverNotification po, IMattermostNotification mm,
IPlexApi plex, IEmbyApiFactory emby, IRadarrApi radarr, ISonarrApi sonarr, ILogger<TesterController> log, IEmailProvider provider, IPlexApi plex, IEmbyApiFactory emby, IRadarrApi radarr, ISonarrApi sonarr, ILogger<TesterController> log, IEmailProvider provider,
ICouchPotatoApi cpApi, ITelegramNotification telegram, ISickRageApi srApi, INewsletterJob newsletter, ILegacyMobileNotification mobileNotification, ICouchPotatoApi cpApi, ITelegramNotification telegram, ISickRageApi srApi, INewsletterJob newsletter, ILegacyMobileNotification mobileNotification,
ILidarrApi lidarrApi, IGotifyNotification gotifyNotification, IWhatsAppApi whatsAppApi, OmbiUserManager um, IWebhookNotification webhookNotification) ILidarrApi lidarrApi, IGotifyNotification gotifyNotification, IWhatsAppApi whatsAppApi, OmbiUserManager um, IWebhookNotification webhookNotification,
IJellyfinApi jellyfinApi)
{ {
Service = service; Service = service;
DiscordNotification = notification; DiscordNotification = notification;
@ -69,6 +72,7 @@ namespace Ombi.Controllers.V1.External
WhatsAppApi = whatsAppApi; WhatsAppApi = whatsAppApi;
UserManager = um; UserManager = um;
WebhookNotification = webhookNotification; WebhookNotification = webhookNotification;
_jellyfinApi = jellyfinApi;
} }
private INotificationService Service { get; } private INotificationService Service { get; }
@ -93,7 +97,8 @@ namespace Ombi.Controllers.V1.External
private ILegacyMobileNotification MobileNotification { get; } private ILegacyMobileNotification MobileNotification { get; }
private ILidarrApi LidarrApi { get; } private ILidarrApi LidarrApi { get; }
private IWhatsAppApi WhatsAppApi { get; } private IWhatsAppApi WhatsAppApi { get; }
private OmbiUserManager UserManager {get;} private OmbiUserManager UserManager {get; }
private readonly IJellyfinApi _jellyfinApi;
/// <summary> /// <summary>
/// Sends a test message to discord using the provided settings /// Sends a test message to discord using the provided settings
@ -333,6 +338,26 @@ namespace Ombi.Controllers.V1.External
} }
} }
/// <summary>
/// Checks if we can connect to Jellyfin with the provided settings
/// </summary>
/// <param name="settings"></param>
/// <returns></returns>
[HttpPost("jellyfin")]
public async Task<bool> Jellyfin([FromBody] JellyfinServers settings)
{
try
{
var result = await _jellyfinApi.GetUsers(settings.FullUri, settings.ApiKey);
return result.Any();
}
catch (Exception e)
{
Log.LogError(LoggingEvents.Api, e, "Could not test Jellyfin");
return false;
}
}
/// <summary> /// <summary>
/// Checks if we can connect to Radarr with the provided settings /// Checks if we can connect to Radarr with the provided settings
/// </summary> /// </summary>

@ -53,6 +53,10 @@
<PackageReference Include="AutoMapper" Version="10.0.0" /> <PackageReference Include="AutoMapper" Version="10.0.0" />
<PackageReference Include="CommandLineParser" Version="2.6.0" /> <PackageReference Include="CommandLineParser" Version="2.6.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.0" /> <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="5.0.0" /> <PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="5.0.0" /> <PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="5.0.0" />

@ -92,6 +92,7 @@
"TheatricalRelease": "Theatrical Release: {{date}}", "TheatricalRelease": "Theatrical Release: {{date}}",
"ViewOnPlex": "View On Plex", "ViewOnPlex": "View On Plex",
"ViewOnEmby": "View On Emby", "ViewOnEmby": "View On Emby",
"ViewOnJellyfin": "View On Jellyfin",
"RequestAdded": "Request for {{title}} has been added successfully", "RequestAdded": "Request for {{title}} has been added successfully",
"Similar": "Similar", "Similar": "Similar",
"Refine": "Refine", "Refine": "Refine",

Loading…
Cancel
Save