diff --git a/frontend/src/Components/Form/FormInputButton.tsx b/frontend/src/Components/Form/FormInputButton.tsx index f61779122..e5149ab14 100644 --- a/frontend/src/Components/Form/FormInputButton.tsx +++ b/frontend/src/Components/Form/FormInputButton.tsx @@ -14,13 +14,14 @@ function FormInputButton({ className = styles.button, canSpin = false, isLastButton = true, + kind = kinds.PRIMARY, ...otherProps }: FormInputButtonProps) { if (canSpin) { return ( ); @@ -29,7 +30,7 @@ function FormInputButton({ return ( + + + + + ); +} + +export default RootFolderModalContent; diff --git a/src/NzbDrone.Core/Localization/Core/en.json b/src/NzbDrone.Core/Localization/Core/en.json index d70350e67..53321e959 100644 --- a/src/NzbDrone.Core/Localization/Core/en.json +++ b/src/NzbDrone.Core/Localization/Core/en.json @@ -2085,6 +2085,8 @@ "UpdateStartupTranslocationHealthCheckMessage": "Cannot install update because startup folder '{startupFolder}' is in an App Translocation folder.", "UpdateUiNotWritableHealthCheckMessage": "Cannot install update because UI folder '{uiFolder}' is not writable by the user '{userName}'.", "UpdaterLogFiles": "Updater Log Files", + "UpdatePath": "Update Path", + "UpdateSeriesPath": "Update Series Path", "Updates": "Updates", "UpgradeUntil": "Upgrade Until", "UpgradeUntilCustomFormatScore": "Upgrade Until Custom Format Score", diff --git a/src/NzbDrone.Core/RootFolders/RootFolderService.cs b/src/NzbDrone.Core/RootFolders/RootFolderService.cs index 09bbf7134..277290cae 100644 --- a/src/NzbDrone.Core/RootFolders/RootFolderService.cs +++ b/src/NzbDrone.Core/RootFolders/RootFolderService.cs @@ -219,10 +219,10 @@ namespace NzbDrone.Core.RootFolders { var osPath = new OsPath(path); - return osPath.Directory.ToString().TrimEnd(osPath.IsUnixPath ? '/' : '\\'); + return osPath.Directory.ToString().GetCleanPath(); } - return possibleRootFolder.Path; + return possibleRootFolder.Path.GetCleanPath(); } } } diff --git a/src/Sonarr.Api.V3/Series/SeriesFolderController.cs b/src/Sonarr.Api.V3/Series/SeriesFolderController.cs new file mode 100644 index 000000000..06b8b141f --- /dev/null +++ b/src/Sonarr.Api.V3/Series/SeriesFolderController.cs @@ -0,0 +1,31 @@ +using Microsoft.AspNetCore.Mvc; +using NzbDrone.Core.Organizer; +using NzbDrone.Core.Tv; +using Sonarr.Http; + +namespace Sonarr.Api.V3.Series; + +[V3ApiController("series")] +public class SeriesFolderController : Controller +{ + private readonly ISeriesService _seriesService; + private readonly IBuildFileNames _fileNameBuilder; + + public SeriesFolderController(ISeriesService seriesService, IBuildFileNames fileNameBuilder) + { + _seriesService = seriesService; + _fileNameBuilder = fileNameBuilder; + } + + [HttpGet("{id}/folder")] + public object GetFolder([FromRoute] int id) + { + var series = _seriesService.GetSeries(id); + var folder = _fileNameBuilder.GetSeriesFolder(series); + + return new + { + folder + }; + } +}