|
|
@ -125,7 +125,7 @@ namespace NzbDrone.Core.MetadataSource.BookInfo
|
|
|
|
catch (BookInfoException e)
|
|
|
|
catch (BookInfoException e)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_logger.Warn(e, "Unexpected error getting book info");
|
|
|
|
_logger.Warn(e, "Unexpected error getting book info");
|
|
|
|
throw new AuthorNotFoundException(foreignBookId);
|
|
|
|
throw new BookNotFoundException(foreignBookId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -398,9 +398,9 @@ namespace NzbDrone.Core.MetadataSource.BookInfo
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var location = httpResponse.Headers.GetSingleValue("Location");
|
|
|
|
var location = httpResponse.Headers.GetSingleValue("Location");
|
|
|
|
var split = location.Split('/');
|
|
|
|
var split = location.Split('/').Reverse().ToList();
|
|
|
|
var type = split[0];
|
|
|
|
var newId = split[0];
|
|
|
|
var newId = split[1];
|
|
|
|
var type = split[1];
|
|
|
|
|
|
|
|
|
|
|
|
Book book;
|
|
|
|
Book book;
|
|
|
|
List<AuthorMetadata> authors;
|
|
|
|
List<AuthorMetadata> authors;
|
|
|
@ -437,6 +437,10 @@ namespace NzbDrone.Core.MetadataSource.BookInfo
|
|
|
|
trimmed.AuthorMetadata = book.AuthorMetadata.Value;
|
|
|
|
trimmed.AuthorMetadata = book.AuthorMetadata.Value;
|
|
|
|
trimmed.SeriesLinks = book.SeriesLinks;
|
|
|
|
trimmed.SeriesLinks = book.SeriesLinks;
|
|
|
|
var edition = book.Editions.Value.SingleOrDefault(e => e.ForeignEditionId == id.ToString());
|
|
|
|
var edition = book.Editions.Value.SingleOrDefault(e => e.ForeignEditionId == id.ToString());
|
|
|
|
|
|
|
|
if (edition != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
edition.Monitored = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
trimmed.Editions = new List<Edition> { edition };
|
|
|
|
trimmed.Editions = new List<Edition> { edition };
|
|
|
|
book = trimmed;
|
|
|
|
book = trimmed;
|
|
|
@ -632,9 +636,9 @@ namespace NzbDrone.Core.MetadataSource.BookInfo
|
|
|
|
if (httpResponse.HasHttpRedirect)
|
|
|
|
if (httpResponse.HasHttpRedirect)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var location = httpResponse.Headers.GetSingleValue("Location");
|
|
|
|
var location = httpResponse.Headers.GetSingleValue("Location");
|
|
|
|
var split = location.Split('/');
|
|
|
|
var split = location.Split('/').Reverse().ToList();
|
|
|
|
var type = split[0];
|
|
|
|
var newId = split[0];
|
|
|
|
var newId = split[1];
|
|
|
|
var type = split[1];
|
|
|
|
|
|
|
|
|
|
|
|
if (type == "author")
|
|
|
|
if (type == "author")
|
|
|
|
{
|
|
|
|
{
|
|
|
|