mirror of
https://github.com/fergalmoran/Readarr.git
synced 2026-01-27 02:54:44 +00:00
New: Manual import improvements (#683)
* New: Manual import improvements - Detect and merge import with files already in library. - Allow selection of album release from Manual Import modal. - Loading indicator while fetching updated decisions * Disable release switching if user manually overrode release
This commit is contained in:
@@ -78,11 +78,21 @@ namespace Lidarr.Api.V1.TrackFiles
|
||||
|
||||
if (albumIdQuery.HasValue)
|
||||
{
|
||||
int albumId = Convert.ToInt32(albumIdQuery.Value);
|
||||
var album = _albumService.GetAlbum(albumId);
|
||||
var albumArtist = _artistService.GetArtist(album.ArtistId);
|
||||
string albumIdValue = albumIdQuery.Value.ToString();
|
||||
|
||||
return _mediaFileService.GetFilesByAlbum(album.Id).ConvertAll(f => f.ToResource(albumArtist, _upgradableSpecification));
|
||||
var albumIds = albumIdValue.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries)
|
||||
.Select(e => Convert.ToInt32(e))
|
||||
.ToList();
|
||||
|
||||
var result = new List<TrackFileResource>();
|
||||
foreach (var albumId in albumIds)
|
||||
{
|
||||
var album = _albumService.GetAlbum(albumId);
|
||||
var albumArtist = _artistService.GetArtist(album.ArtistId);
|
||||
result.AddRange(_mediaFileService.GetFilesByAlbum(album.Id).ConvertAll(f => f.ToResource(albumArtist, _upgradableSpecification)));
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user