mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 02:26:55 -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
|
||||
{
|
||||
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)
|
||||
{
|
||||
if (m.Type.Equals("boxset", StringComparison.CurrentCultureIgnoreCase))
|
||||
|
@ -129,7 +135,13 @@ namespace Ombi.Services.Jobs
|
|||
}
|
||||
|
||||
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)
|
||||
{
|
||||
var tvInfo = EmbyApi.GetInformation(t.Id, EmbyMediaType.Series, embySettings.ApiKey,
|
||||
|
|
|
@ -239,13 +239,13 @@ namespace Ombi.Services.Jobs
|
|||
|
||||
var movies = GetPlexMovies(results);
|
||||
|
||||
//// Time to destroy the plex movies from the DB
|
||||
//PlexContent.Custom(connection =>
|
||||
//{
|
||||
// connection.Open();
|
||||
// connection.Query("delete from PlexContent where type = @type", new { type = 0 });
|
||||
// return new List<PlexContent>();
|
||||
//});
|
||||
// Time to destroy the plex movies from the DB
|
||||
PlexContent.Custom(connection =>
|
||||
{
|
||||
connection.Open();
|
||||
connection.Query("delete from PlexContent where type = @type", new { type = 0 });
|
||||
return new List<PlexContent>();
|
||||
});
|
||||
|
||||
foreach (var m in movies)
|
||||
{
|
||||
|
@ -280,13 +280,13 @@ namespace Ombi.Services.Jobs
|
|||
}
|
||||
|
||||
var tv = GetPlexTvShows(results);
|
||||
//// Time to destroy the plex tv from the DB
|
||||
//PlexContent.Custom(connection =>
|
||||
//{
|
||||
// connection.Open();
|
||||
// connection.Query("delete from PlexContent where type = @type", new { type = 1 });
|
||||
// return new List<PlexContent>();
|
||||
//});
|
||||
// Time to destroy the plex tv from the DB
|
||||
PlexContent.Custom(connection =>
|
||||
{
|
||||
connection.Open();
|
||||
connection.Query("delete from PlexContent where type = @type", new { type = 1 });
|
||||
return new List<PlexContent>();
|
||||
});
|
||||
foreach (var t in tv)
|
||||
{
|
||||
if (string.IsNullOrEmpty(t.ProviderId))
|
||||
|
@ -321,13 +321,13 @@ namespace Ombi.Services.Jobs
|
|||
}
|
||||
|
||||
var albums = GetPlexAlbums(results);
|
||||
//// Time to destroy the plex movies from the DB
|
||||
//PlexContent.Custom(connection =>
|
||||
//{
|
||||
// connection.Open();
|
||||
// connection.Query("delete from PlexContent where type = @type", new { type = 2 });
|
||||
// return new List<PlexContent>();
|
||||
//});
|
||||
// Time to destroy the plex movies from the DB
|
||||
PlexContent.Custom(connection =>
|
||||
{
|
||||
connection.Open();
|
||||
connection.Query("delete from PlexContent where type = @type", new { type = 2 });
|
||||
return new List<PlexContent>();
|
||||
});
|
||||
|
||||
foreach (var a in albums)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue