mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Fixed: Trying to add a movie when root folders hadn't populated
Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com>
This commit is contained in:
@@ -95,6 +95,27 @@ class RootFolderSelectInputConnector extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps) {
|
||||
const {
|
||||
name,
|
||||
value,
|
||||
values,
|
||||
onChange
|
||||
} = this.props;
|
||||
|
||||
if (prevProps.values === values) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!value && values.length && values.some((v) => !!v.key && v.key !== ADD_NEW_KEY)) {
|
||||
const defaultValue = values[0];
|
||||
|
||||
if (defaultValue.key !== ADD_NEW_KEY) {
|
||||
onChange({ name, value: defaultValue.key });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Listeners
|
||||
|
||||
|
@@ -31,6 +31,12 @@ namespace Radarr.Api.V3.Movies
|
||||
}
|
||||
|
||||
var rootFolderPath = context.PropertyValue.ToString();
|
||||
|
||||
if (rootFolderPath.IsNullOrWhiteSpace())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
var rootFolder = new DirectoryInfo(rootFolderPath).Name;
|
||||
var movie = movieResource.ToModel();
|
||||
var movieFolder = _fileNameBuilder.GetMovieFolder(movie);
|
||||
|
Reference in New Issue
Block a user