mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-10 07:13:47 -07:00
Add Advanced Option for Alternate Metadata Provider Source
This commit is contained in:
parent
f460f630c3
commit
0201aa812e
16 changed files with 334 additions and 29 deletions
|
@ -1,21 +1,60 @@
|
|||
import React from 'react';
|
||||
import React, { Component } from 'react';
|
||||
import PageContent from 'Components/Page/PageContent';
|
||||
import PageContentBodyConnector from 'Components/Page/PageContentBodyConnector';
|
||||
import SettingsToolbarConnector from 'Settings/SettingsToolbarConnector';
|
||||
import MetadatasConnector from './Metadata/MetadatasConnector';
|
||||
import MetadataProviderConnector from './MetadataProvider/MetadataProviderConnector';
|
||||
|
||||
function MetadataSettings() {
|
||||
return (
|
||||
<PageContent title="Metadata Settings">
|
||||
<SettingsToolbarConnector
|
||||
showSave={false}
|
||||
/>
|
||||
class MetadataSettings extends Component {
|
||||
|
||||
<PageContentBodyConnector>
|
||||
<MetadatasConnector />
|
||||
</PageContentBodyConnector>
|
||||
</PageContent>
|
||||
);
|
||||
//
|
||||
// Lifecycle
|
||||
|
||||
constructor(props, context) {
|
||||
super(props, context);
|
||||
|
||||
this.state = {
|
||||
hasPendingChanges: false
|
||||
};
|
||||
}
|
||||
|
||||
//
|
||||
// Listeners
|
||||
|
||||
setMetadataProviderRef = (ref) => {
|
||||
this._metadataProvider = ref;
|
||||
}
|
||||
|
||||
onHasPendingChange = (hasPendingChanges) => {
|
||||
this.setState({
|
||||
hasPendingChanges
|
||||
});
|
||||
}
|
||||
|
||||
onSavePress = () => {
|
||||
this._metadataProvider.getWrappedInstance().save();
|
||||
}
|
||||
|
||||
//
|
||||
// Render
|
||||
render() {
|
||||
return (
|
||||
<PageContent title="Metadata Settings">
|
||||
<SettingsToolbarConnector
|
||||
hasPendingChanges={this.state.hasPendingChanges}
|
||||
onSavePress={this.onSavePress}
|
||||
/>
|
||||
|
||||
<PageContentBodyConnector>
|
||||
<MetadatasConnector />
|
||||
<MetadataProviderConnector
|
||||
ref={this.setMetadataProviderRef}
|
||||
onHasPendingChange={this.onHasPendingChange}
|
||||
/>
|
||||
</PageContentBodyConnector>
|
||||
</PageContent>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default MetadataSettings;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue