|
|
@ -287,14 +287,14 @@ namespace Ombi.Schedule.Jobs.Plex
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Logger.LogDebug("Adding movie {0}", movie.title);
|
|
|
|
Logger.LogDebug("Adding movie {0}", movie.title);
|
|
|
|
|
|
|
|
var guids = new List<string>();
|
|
|
|
|
|
|
|
if (!movie.Guid.Any())
|
|
|
|
|
|
|
|
{
|
|
|
|
var metaData = await PlexApi.GetMetadata(servers.PlexAuthToken, servers.FullUri,
|
|
|
|
var metaData = await PlexApi.GetMetadata(servers.PlexAuthToken, servers.FullUri,
|
|
|
|
movie.ratingKey);
|
|
|
|
movie.ratingKey);
|
|
|
|
|
|
|
|
|
|
|
|
var meta = metaData.MediaContainer.Metadata.FirstOrDefault();
|
|
|
|
var meta = metaData.MediaContainer.Metadata.FirstOrDefault();
|
|
|
|
var guids = new List<string>
|
|
|
|
guids.Add(meta.guid);
|
|
|
|
{
|
|
|
|
|
|
|
|
meta.guid
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
if (meta.Guid != null)
|
|
|
|
if (meta.Guid != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
foreach (var g in meta.Guid)
|
|
|
|
foreach (var g in meta.Guid)
|
|
|
@ -302,6 +302,15 @@ namespace Ombi.Schedule.Jobs.Plex
|
|
|
|
guids.Add(g.Id);
|
|
|
|
guids.Add(g.Id);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
// Currently a Plex Pass feature only
|
|
|
|
|
|
|
|
foreach (var g in movie.Guid)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
guids.Add(g.Id);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var providerIds = PlexHelper.GetProviderIdsFromMetadata(guids.ToArray());
|
|
|
|
var providerIds = PlexHelper.GetProviderIdsFromMetadata(guids.ToArray());
|
|
|
|
|
|
|
|
|
|
|
|