mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-19 12:59:39 -07:00
This commit is contained in:
parent
635366261c
commit
706fc94eb3
2 changed files with 35 additions and 23 deletions
|
@ -105,7 +105,13 @@ namespace Ombi.Services.Jobs
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var movies = GetMovies();
|
var movies = GetMovies();
|
||||||
|
// Delete everything
|
||||||
|
EmbyContent.Custom(connection =>
|
||||||
|
{
|
||||||
|
connection.Open();
|
||||||
|
connection.Query("delete from EmbyContent where type = @type", new { type = 0 });
|
||||||
|
return new List<EmbyContent>();
|
||||||
|
});
|
||||||
foreach (var m in movies)
|
foreach (var m in movies)
|
||||||
{
|
{
|
||||||
if (m.Type.Equals("boxset", StringComparison.CurrentCultureIgnoreCase))
|
if (m.Type.Equals("boxset", StringComparison.CurrentCultureIgnoreCase))
|
||||||
|
@ -129,7 +135,13 @@ namespace Ombi.Services.Jobs
|
||||||
}
|
}
|
||||||
|
|
||||||
var tv = GetTvShows();
|
var tv = GetTvShows();
|
||||||
|
// Delete everything
|
||||||
|
EmbyContent.Custom(connection =>
|
||||||
|
{
|
||||||
|
connection.Open();
|
||||||
|
connection.Query("delete from EmbyContent where type = @type", new { type = 1 });
|
||||||
|
return new List<EmbyContent>();
|
||||||
|
});
|
||||||
foreach (var t in tv)
|
foreach (var t in tv)
|
||||||
{
|
{
|
||||||
var tvInfo = EmbyApi.GetInformation(t.Id, EmbyMediaType.Series, embySettings.ApiKey,
|
var tvInfo = EmbyApi.GetInformation(t.Id, EmbyMediaType.Series, embySettings.ApiKey,
|
||||||
|
|
|
@ -239,13 +239,13 @@ namespace Ombi.Services.Jobs
|
||||||
|
|
||||||
var movies = GetPlexMovies(results);
|
var movies = GetPlexMovies(results);
|
||||||
|
|
||||||
//// Time to destroy the plex movies from the DB
|
// Time to destroy the plex movies from the DB
|
||||||
//PlexContent.Custom(connection =>
|
PlexContent.Custom(connection =>
|
||||||
//{
|
{
|
||||||
// connection.Open();
|
connection.Open();
|
||||||
// connection.Query("delete from PlexContent where type = @type", new { type = 0 });
|
connection.Query("delete from PlexContent where type = @type", new { type = 0 });
|
||||||
// return new List<PlexContent>();
|
return new List<PlexContent>();
|
||||||
//});
|
});
|
||||||
|
|
||||||
foreach (var m in movies)
|
foreach (var m in movies)
|
||||||
{
|
{
|
||||||
|
@ -280,13 +280,13 @@ namespace Ombi.Services.Jobs
|
||||||
}
|
}
|
||||||
|
|
||||||
var tv = GetPlexTvShows(results);
|
var tv = GetPlexTvShows(results);
|
||||||
//// Time to destroy the plex tv from the DB
|
// Time to destroy the plex tv from the DB
|
||||||
//PlexContent.Custom(connection =>
|
PlexContent.Custom(connection =>
|
||||||
//{
|
{
|
||||||
// connection.Open();
|
connection.Open();
|
||||||
// connection.Query("delete from PlexContent where type = @type", new { type = 1 });
|
connection.Query("delete from PlexContent where type = @type", new { type = 1 });
|
||||||
// return new List<PlexContent>();
|
return new List<PlexContent>();
|
||||||
//});
|
});
|
||||||
foreach (var t in tv)
|
foreach (var t in tv)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(t.ProviderId))
|
if (string.IsNullOrEmpty(t.ProviderId))
|
||||||
|
@ -321,13 +321,13 @@ namespace Ombi.Services.Jobs
|
||||||
}
|
}
|
||||||
|
|
||||||
var albums = GetPlexAlbums(results);
|
var albums = GetPlexAlbums(results);
|
||||||
//// Time to destroy the plex movies from the DB
|
// Time to destroy the plex movies from the DB
|
||||||
//PlexContent.Custom(connection =>
|
PlexContent.Custom(connection =>
|
||||||
//{
|
{
|
||||||
// connection.Open();
|
connection.Open();
|
||||||
// connection.Query("delete from PlexContent where type = @type", new { type = 2 });
|
connection.Query("delete from PlexContent where type = @type", new { type = 2 });
|
||||||
// return new List<PlexContent>();
|
return new List<PlexContent>();
|
||||||
//});
|
});
|
||||||
|
|
||||||
foreach (var a in albums)
|
foreach (var a in albums)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue