|
|
|
@ -287,14 +287,14 @@ namespace Ombi.Schedule.Jobs.Plex
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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,
|
|
|
|
|
movie.ratingKey);
|
|
|
|
|
|
|
|
|
|
var meta = metaData.MediaContainer.Metadata.FirstOrDefault();
|
|
|
|
|
var guids = new List<string>
|
|
|
|
|
{
|
|
|
|
|
meta.guid
|
|
|
|
|
};
|
|
|
|
|
guids.Add(meta.guid);
|
|
|
|
|
if (meta.Guid != null)
|
|
|
|
|
{
|
|
|
|
|
foreach (var g in meta.Guid)
|
|
|
|
@ -302,6 +302,15 @@ namespace Ombi.Schedule.Jobs.Plex
|
|
|
|
|
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());
|
|
|
|
|
|
|
|
|
|