mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-23 06:25:24 -07:00
Refactor Emby and Jellyfin provider ids
This commit is contained in:
parent
fbc0e08d8f
commit
7b13994359
6 changed files with 43 additions and 44 deletions
|
@ -1,27 +1,11 @@
|
||||||
namespace Ombi.Api.Emby.Models.Movie
|
using Ombi.Api.MediaServer.Models;
|
||||||
{
|
|
||||||
public class EmbyProviderids
|
|
||||||
{
|
|
||||||
public string Tmdb { get; set; }
|
|
||||||
public string Imdb { get; set; }
|
|
||||||
public string TmdbCollection { get; set; }
|
|
||||||
|
|
||||||
public string Tvdb { get; set; }
|
namespace Ombi.Api.Emby.Models.Movie
|
||||||
|
{
|
||||||
|
public class EmbyProviderids: BaseProviderids
|
||||||
|
{
|
||||||
|
public string TmdbCollection { get; set; }
|
||||||
public string Zap2It { get; set; }
|
public string Zap2It { get; set; }
|
||||||
public string TvRage { get; set; }
|
public string TvRage { get; set; }
|
||||||
|
|
||||||
public bool Any()
|
|
||||||
{
|
|
||||||
if (string.IsNullOrEmpty(Imdb)
|
|
||||||
&& string.IsNullOrEmpty(Tmdb)
|
|
||||||
&& string.IsNullOrEmpty(Tvdb))
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -12,6 +12,7 @@
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Ombi.Api\Ombi.Api.csproj" />
|
<ProjectReference Include="..\Ombi.Api\Ombi.Api.csproj" />
|
||||||
|
<ProjectReference Include="..\Ombi.Api.MediaServer\Ombi.Api.MediaServer.csproj" />
|
||||||
<ProjectReference Include="..\Ombi.Helpers\Ombi.Helpers.csproj" />
|
<ProjectReference Include="..\Ombi.Helpers\Ombi.Helpers.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
|
@ -1,27 +1,11 @@
|
||||||
namespace Ombi.Api.Jellyfin.Models.Movie
|
using Ombi.Api.MediaServer.Models;
|
||||||
{
|
|
||||||
public class JellyfinProviderids
|
|
||||||
{
|
|
||||||
public string Tmdb { get; set; }
|
|
||||||
public string Imdb { get; set; }
|
|
||||||
public string TmdbCollection { get; set; }
|
|
||||||
|
|
||||||
public string Tvdb { get; set; }
|
namespace Ombi.Api.Jellyfin.Models.Movie
|
||||||
|
{
|
||||||
|
public class JellyfinProviderids: BaseProviderids
|
||||||
|
{
|
||||||
|
public string TmdbCollection { get; set; }
|
||||||
public string Zap2It { get; set; }
|
public string Zap2It { get; set; }
|
||||||
public string TvRage { get; set; }
|
public string TvRage { get; set; }
|
||||||
|
|
||||||
public bool Any()
|
|
||||||
{
|
|
||||||
if (string.IsNullOrEmpty(Imdb)
|
|
||||||
&& string.IsNullOrEmpty(Tmdb)
|
|
||||||
&& string.IsNullOrEmpty(Tvdb))
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -13,6 +13,7 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Ombi.Api\Ombi.Api.csproj" />
|
<ProjectReference Include="..\Ombi.Api\Ombi.Api.csproj" />
|
||||||
<ProjectReference Include="..\Ombi.Helpers\Ombi.Helpers.csproj" />
|
<ProjectReference Include="..\Ombi.Helpers\Ombi.Helpers.csproj" />
|
||||||
|
<ProjectReference Include="..\Ombi.Api.MediaServer\Ombi.Api.MediaServer.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
11
src/Ombi.Api.MediaServer/Models/BaseProviderids.cs
Normal file
11
src/Ombi.Api.MediaServer/Models/BaseProviderids.cs
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
namespace Ombi.Api.MediaServer.Models
|
||||||
|
{
|
||||||
|
public class BaseProviderids
|
||||||
|
{
|
||||||
|
public string Tmdb { get; set; }
|
||||||
|
public string Imdb { get; set; }
|
||||||
|
public string Tvdb { get; set; }
|
||||||
|
public bool Any() =>
|
||||||
|
!string.IsNullOrEmpty(Imdb) || !string.IsNullOrEmpty(Tmdb) || !string.IsNullOrEmpty(Tvdb);
|
||||||
|
}
|
||||||
|
}
|
18
src/Ombi.Api.MediaServer/Ombi.Api.MediaServer.csproj
Normal file
18
src/Ombi.Api.MediaServer/Ombi.Api.MediaServer.csproj
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
|
<AssemblyVersion>3.0.0.0</AssemblyVersion>
|
||||||
|
<FileVersion>3.0.0.0</FileVersion>
|
||||||
|
<Version></Version>
|
||||||
|
<PackageVersion></PackageVersion>
|
||||||
|
<LangVersion>8.0</LangVersion>
|
||||||
|
<Configurations>Debug;Release;NonUiBuild</Configurations>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Ombi.Api\Ombi.Api.csproj" />
|
||||||
|
<ProjectReference Include="..\Ombi.Helpers\Ombi.Helpers.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
Loading…
Add table
Add a link
Reference in a new issue