Fixed: Only pick up supported formats from calibre

This commit is contained in:
ta264
2021-04-06 21:45:58 +01:00
parent fea34add4b
commit 8a7765c855

View File

@@ -338,7 +338,11 @@ namespace NzbDrone.Core.Books.Calibre
var response = _httpClient.Get<Dictionary<int, CalibreBook>>(request);
foreach (var book in response.Resource.Values)
{
var remotePath = book?.Formats.Values.OrderBy(f => f.LastModified).FirstOrDefault()?.Path;
var remotePath = book?.Formats
.Where(x => MediaFileExtensions.TextExtensions.Contains("." + x.Key))
.OrderBy(f => f.Value.LastModified)
.FirstOrDefault().Value?.Path;
if (remotePath == null)
{
continue;