diff --git a/frontend/src/Components/Form/PlaylistInput.css b/frontend/src/Components/Form/BookshelfInput.css
similarity index 86%
rename from frontend/src/Components/Form/PlaylistInput.css
rename to frontend/src/Components/Form/BookshelfInput.css
index 078d3beac..f47809621 100644
--- a/frontend/src/Components/Form/PlaylistInput.css
+++ b/frontend/src/Components/Form/BookshelfInput.css
@@ -1,4 +1,4 @@
-.playlistInputWrapper {
+.bookshelfInputWrapper {
display: flex;
flex-direction: column;
}
diff --git a/frontend/src/Components/Form/PlaylistInput.js b/frontend/src/Components/Form/BookshelfInput.js
similarity index 93%
rename from frontend/src/Components/Form/PlaylistInput.js
rename to frontend/src/Components/Form/BookshelfInput.js
index b8dc903d4..24056304f 100644
--- a/frontend/src/Components/Form/PlaylistInput.js
+++ b/frontend/src/Components/Form/BookshelfInput.js
@@ -11,7 +11,7 @@ import TableBody from 'Components/Table/TableBody';
import TableRow from 'Components/Table/TableRow';
import TableRowCell from 'Components/Table/Cells/TableRowCell';
import TableSelectCell from 'Components/Table/Cells/TableSelectCell';
-import styles from './PlaylistInput.css';
+import styles from './BookshelfInput.css';
const columns = [
{
@@ -22,7 +22,7 @@ const columns = [
}
];
-class PlaylistInput extends Component {
+class BookshelfInput extends Component {
//
// Lifecycle
@@ -82,6 +82,7 @@ class PlaylistInput extends Component {
render() {
const {
className,
+ helptext,
items,
user,
isFetching,
@@ -104,7 +105,7 @@ class PlaylistInput extends Component {
{
!isPopulated && !isFetching &&
- Authenticate with Goodreads to retrieve bookshelves to import.
+ Authenticate with Goodreads to retrieve bookshelves.
}
@@ -125,7 +126,7 @@ class PlaylistInput extends Component {
{
isPopulated && !isFetching && user && !!items.length &&
- Select bookshelves to import from Goodreads user {user}.
+ {helptext}
state.providerOptions,
- (state) => {
+ (state, props) => props.name,
+ (state, name) => {
const {
items,
...otherState
} = state;
return ({
+ helptext: items.helptext && items.helptext[name] ? items.helptext[name] : '',
user: items.user ? items.user : '',
- items: items.playlists ? items.playlists : [],
+ items: items.shelves ? items.shelves : [],
...otherState
});
}
@@ -28,7 +30,7 @@ const mapDispatchToProps = {
dispatchClearOptions: clearOptions
};
-class PlaylistInputConnector extends Component {
+class BookshelfInputConnector extends Component {
//
// Lifecycle
@@ -58,11 +60,13 @@ class PlaylistInputConnector extends Component {
const {
provider,
providerData,
- dispatchFetchOptions
+ dispatchFetchOptions,
+ name
} = this.props;
dispatchFetchOptions({
- action: 'getPlaylists',
+ action: 'getBookshelves',
+ queryParams: { name },
provider,
providerData
});
@@ -77,7 +81,7 @@ class PlaylistInputConnector extends Component {
render() {
return (
-
@@ -85,7 +89,7 @@ class PlaylistInputConnector extends Component {
}
}
-PlaylistInputConnector.propTypes = {
+BookshelfInputConnector.propTypes = {
provider: PropTypes.string.isRequired,
providerData: PropTypes.object.isRequired,
name: PropTypes.string.isRequired,
@@ -94,4 +98,4 @@ PlaylistInputConnector.propTypes = {
dispatchClearOptions: PropTypes.func.isRequired
};
-export default connect(createMapStateToProps, mapDispatchToProps)(PlaylistInputConnector);
+export default connect(createMapStateToProps, mapDispatchToProps)(BookshelfInputConnector);
diff --git a/frontend/src/Components/Form/FormInputGroup.js b/frontend/src/Components/Form/FormInputGroup.js
index c4711fc31..54521ddc4 100644
--- a/frontend/src/Components/Form/FormInputGroup.js
+++ b/frontend/src/Components/Form/FormInputGroup.js
@@ -6,7 +6,7 @@ import AutoCompleteInput from './AutoCompleteInput';
import CaptchaInputConnector from './CaptchaInputConnector';
import CheckInput from './CheckInput';
import DeviceInputConnector from './DeviceInputConnector';
-import PlaylistInputConnector from './PlaylistInputConnector';
+import BookshelfInputConnector from './BookshelfInputConnector';
import KeyValueListInput from './KeyValueListInput';
import MonitorBooksSelectInput from './MonitorBooksSelectInput';
import NumberInput from './NumberInput';
@@ -39,8 +39,8 @@ function getComponent(type) {
case inputTypes.DEVICE:
return DeviceInputConnector;
- case inputTypes.PLAYLIST:
- return PlaylistInputConnector;
+ case inputTypes.BOOKSHELF:
+ return BookshelfInputConnector;
case inputTypes.KEY_VALUE_LIST:
return KeyValueListInput;
diff --git a/frontend/src/Components/Form/ProviderFieldFormGroup.js b/frontend/src/Components/Form/ProviderFieldFormGroup.js
index dca32aa1e..e6f58be75 100644
--- a/frontend/src/Components/Form/ProviderFieldFormGroup.js
+++ b/frontend/src/Components/Form/ProviderFieldFormGroup.js
@@ -14,8 +14,8 @@ function getType(type) {
return inputTypes.CHECK;
case 'device':
return inputTypes.DEVICE;
- case 'playlist':
- return inputTypes.PLAYLIST;
+ case 'bookshelf':
+ return inputTypes.BOOKSHELF;
case 'password':
return inputTypes.PASSWORD;
case 'number':
diff --git a/frontend/src/Helpers/Props/inputTypes.js b/frontend/src/Helpers/Props/inputTypes.js
index f55bd3248..30c93f6d7 100644
--- a/frontend/src/Helpers/Props/inputTypes.js
+++ b/frontend/src/Helpers/Props/inputTypes.js
@@ -2,7 +2,7 @@ export const AUTO_COMPLETE = 'autoComplete';
export const CAPTCHA = 'captcha';
export const CHECK = 'check';
export const DEVICE = 'device';
-export const PLAYLIST = 'playlist';
+export const BOOKSHELF = 'bookshelf';
export const KEY_VALUE_LIST = 'keyValueList';
export const MONITOR_BOOKS_SELECT = 'monitorBooksSelect';
export const NUMBER = 'number';
@@ -24,7 +24,7 @@ export const all = [
CAPTCHA,
CHECK,
DEVICE,
- PLAYLIST,
+ BOOKSHELF,
KEY_VALUE_LIST,
MONITOR_BOOKS_SELECT,
NUMBER,
diff --git a/src/NzbDrone.Core/Annotations/FieldDefinitionAttribute.cs b/src/NzbDrone.Core/Annotations/FieldDefinitionAttribute.cs
index e02acd67d..453dc84c1 100644
--- a/src/NzbDrone.Core/Annotations/FieldDefinitionAttribute.cs
+++ b/src/NzbDrone.Core/Annotations/FieldDefinitionAttribute.cs
@@ -37,7 +37,7 @@ namespace NzbDrone.Core.Annotations
Captcha,
OAuth,
Device,
- Playlist
+ Bookshelf
}
public enum HiddenType
diff --git a/src/NzbDrone.Core/ImportLists/Goodreads/GoodreadsBookshelf.cs b/src/NzbDrone.Core/ImportLists/Goodreads/Bookshelf/GoodreadsBookshelf.cs
similarity index 90%
rename from src/NzbDrone.Core/ImportLists/Goodreads/GoodreadsBookshelf.cs
rename to src/NzbDrone.Core/ImportLists/Goodreads/Bookshelf/GoodreadsBookshelf.cs
index 68b0b3802..ffc5d1f2a 100644
--- a/src/NzbDrone.Core/ImportLists/Goodreads/GoodreadsBookshelf.cs
+++ b/src/NzbDrone.Core/ImportLists/Goodreads/Bookshelf/GoodreadsBookshelf.cs
@@ -12,7 +12,7 @@ using NzbDrone.Core.Validation;
namespace NzbDrone.Core.ImportLists.Goodreads
{
- public class GoodreadsBookshelf : GoodreadsImportListBase
+ public class GoodreadsBookshelf : GoodreadsImportListBase
{
public GoodreadsBookshelf(IImportListStatusService importListStatusService,
IConfigService configService,
@@ -27,7 +27,7 @@ namespace NzbDrone.Core.ImportLists.Goodreads
public override IList Fetch()
{
- return CleanupListItems(Settings.PlaylistIds.SelectMany(x => Fetch(x)).ToList());
+ return CleanupListItems(Settings.BookshelfIds.SelectMany(x => Fetch(x)).ToList());
}
public IList Fetch(string shelf)
@@ -57,13 +57,13 @@ namespace NzbDrone.Core.ImportLists.Goodreads
public override object RequestAction(string action, IDictionary query)
{
- if (action == "getPlaylists")
+ if (action == "getBookshelves")
{
if (Settings.AccessToken.IsNullOrWhiteSpace())
{
return new
{
- playlists = new List