pull/1228/head
Jamie.Rees 8 years ago
parent 635366261c
commit 706fc94eb3

@ -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…
Cancel
Save