mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-24 22:35:39 -04:00
Fixed: author manual import (#32)
* Fix: apply fix from Lidarr to the Readarr manual import modal * Rename Album to Book in the identification override * Rename "audio" to "book" in the interactive import modal empty message
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Nancy;
|
||||
@@ -41,10 +42,23 @@ namespace Readarr.Api.V1.ManualImport
|
||||
{
|
||||
var folder = (string)Request.Query.folder;
|
||||
var downloadId = (string)Request.Query.downloadId;
|
||||
NzbDrone.Core.Books.Author author = null;
|
||||
|
||||
var authorIdQuery = Request.Query.authorId;
|
||||
if (authorIdQuery.HasValue)
|
||||
{
|
||||
var authorId = Convert.ToInt32(authorIdQuery.Value);
|
||||
|
||||
if (authorId > 0)
|
||||
{
|
||||
author = _authorService.GetAuthor(authorId);
|
||||
}
|
||||
}
|
||||
|
||||
var filter = Request.GetBooleanQueryParameter("filterExistingFiles", true) ? FilterFilesType.Matched : FilterFilesType.None;
|
||||
var replaceExistingFiles = Request.GetBooleanQueryParameter("replaceExistingFiles", true);
|
||||
|
||||
return _manualImportService.GetMediaFiles(folder, downloadId, filter, replaceExistingFiles).ToResource().Select(AddQualityWeight).ToList();
|
||||
return _manualImportService.GetMediaFiles(folder, downloadId, author, filter, replaceExistingFiles).ToResource().Select(AddQualityWeight).ToList();
|
||||
}
|
||||
|
||||
private ManualImportResource AddQualityWeight(ManualImportResource item)
|
||||
|
||||
Reference in New Issue
Block a user