mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 02:26:55 -07:00
parent
82c1fb79ed
commit
dfbe01b3bf
2 changed files with 24 additions and 1 deletions
|
@ -115,7 +115,7 @@ namespace Ombi.Services.Jobs
|
|||
foreach (var item in info.Items)
|
||||
{
|
||||
var movieInfo = EmbyApi.GetInformation(item.Id, EmbyMediaType.Movie, embySettings.ApiKey,
|
||||
embySettings.AdministratorId, embySettings.FullUri).MovieInformation;
|
||||
embySettings.AdministratorId, embySettings.FullUri).MovieInformation;
|
||||
ProcessMovies(movieInfo);
|
||||
}
|
||||
}
|
||||
|
@ -149,6 +149,12 @@ namespace Ombi.Services.Jobs
|
|||
connection.Dispose();
|
||||
return media;
|
||||
});
|
||||
if (item != null && item.EmbyId != t.Id)
|
||||
{
|
||||
// delete this item since the Id has changed
|
||||
EmbyContent.Delete(item);
|
||||
item = null;
|
||||
}
|
||||
|
||||
if (item == null)
|
||||
{
|
||||
|
@ -255,6 +261,13 @@ namespace Ombi.Services.Jobs
|
|||
return media;
|
||||
});
|
||||
|
||||
if (item != null && item.EmbyId != movieInfo.Id)
|
||||
{
|
||||
// delete this item since the Id has changed
|
||||
EmbyContent.Delete(item);
|
||||
item = null;
|
||||
}
|
||||
|
||||
if (item == null)
|
||||
{
|
||||
// Doesn't exist, insert it
|
||||
|
|
|
@ -81,6 +81,7 @@ namespace Ombi.Services.Jobs
|
|||
continue;
|
||||
}
|
||||
|
||||
|
||||
// Check it this episode exists
|
||||
var item = Repo.Custom(connection =>
|
||||
{
|
||||
|
@ -93,6 +94,15 @@ namespace Ombi.Services.Jobs
|
|||
return media;
|
||||
});
|
||||
|
||||
if (item != null)
|
||||
{
|
||||
if (item.EmbyId != ep.Id) // The id's dont match, delete it
|
||||
{
|
||||
Repo.Delete(item);
|
||||
item = null;
|
||||
}
|
||||
}
|
||||
|
||||
if (item == null)
|
||||
{
|
||||
// add it
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue