mirror of
https://github.com/Sonarr/Sonarr
synced 2026-04-13 00:31:40 +02:00
Maintain relative path when reprocessing items in manual import
This commit is contained in:
parent
526ef5428d
commit
fa69c485e9
3 changed files with 8 additions and 0 deletions
|
|
@ -116,6 +116,7 @@ export const useUpdateInteractiveImportItems = () => {
|
|||
|
||||
interface ReprocessInteractiveImportItem extends ModelBase {
|
||||
path: string;
|
||||
relativePath: string;
|
||||
seriesId: number | undefined;
|
||||
seasonNumber: number | undefined;
|
||||
episodeIds: number[] | undefined;
|
||||
|
|
@ -179,6 +180,7 @@ export const useReprocessInteractiveImportItems = () => {
|
|||
acc.push({
|
||||
id,
|
||||
path: item.path,
|
||||
relativePath: item.relativePath,
|
||||
seriesId: item.series ? item.series.id : undefined,
|
||||
seasonNumber: item.seasonNumber,
|
||||
episodeIds: (item.episodes || []).map((e) => e.id),
|
||||
|
|
|
|||
|
|
@ -87,6 +87,11 @@ public List<ManualImportResource> ReprocessItems([FromBody] List<ManualImportRep
|
|||
processedItem.SeasonNumber = item.SeasonNumber;
|
||||
}
|
||||
|
||||
if (item.RelativePath.IsNotNullOrWhiteSpace())
|
||||
{
|
||||
processedItem.RelativePath = item.RelativePath;
|
||||
}
|
||||
|
||||
updatedItems.Add(processedItem);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ namespace Sonarr.Api.V5.ManualImport;
|
|||
public class ManualImportReprocessResource : RestResource
|
||||
{
|
||||
public string? Path { get; set; }
|
||||
public string? RelativePath { get; set; }
|
||||
public int SeriesId { get; set; }
|
||||
public int? SeasonNumber { get; set; }
|
||||
public List<EpisodeResource> Episodes { get; set; } = [];
|
||||
|
|
|
|||
Loading…
Reference in a new issue