Removing remaining artistLoaded, albumLoaded, etc in favor of itemLoaded for consistent pipeline; Looking at search

This commit is contained in:
James Barnsley
2020-09-13 20:59:46 +12:00
parent f254170b2f
commit 449b32a384
30 changed files with 579 additions and 465 deletions

View File

@ -17,6 +17,8 @@ import * as spotifyActions from '../../services/spotify/actions';
import { applyFilter, removeDuplicates, sortItems } from '../../util/arrays';
import { I18n, i18n } from '../../locale';
import { collate } from '../../util/format';
import { isLoading } from '../../util/helpers';
import Loader from '../../components/Loader';
class LibraryPlaylists extends React.Component {
constructor(props) {
@ -138,12 +140,17 @@ class LibraryPlaylists extends React.Component {
sort_reverse,
view,
source,
load_queue,
} = this.props;
const {
filter,
limit,
} = this.state;
if (isLoading(load_queue, ['(.*):library:playlists'])) {
return <Loader body loading />;
}
let playlists = [
...(source === 'all' || source === 'spotify' ? collate(spotify_library, { items }).items : []),
...(source === 'all' || source === 'local' ? collate(mopidy_library, { items }).items : []),