Verson bump
This commit is contained in:
@ -237,9 +237,9 @@ const CoreMiddleware = (function () {
|
||||
break;
|
||||
|
||||
case 'PLAYLIST_TRACKS_ADDED':
|
||||
const asset = store.getState().core.playlists[action.key];
|
||||
store.dispatch(uiActions.createNotification({
|
||||
level: 'warning',
|
||||
content: <span>Added {action.tracks_uris.length} tracks to <URILink uri={action.key}>playlist</URILink></span>,
|
||||
content: <span>Added {action.tracks_uris.length} tracks to <URILink uri={action.key}>{asset ? asset.name : 'playlist'}</URILink></span>,
|
||||
}));
|
||||
switch (uriSource(action.key)) {
|
||||
case 'spotify':
|
||||
|
||||
@ -20,6 +20,7 @@ import {
|
||||
shuffle,
|
||||
removeDuplicates,
|
||||
applyFilter,
|
||||
sortItems,
|
||||
} from '../../util/arrays';
|
||||
|
||||
const mopidyActions = require('./actions.js');
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
|
||||
import React from 'react';
|
||||
import {
|
||||
arrayOf,
|
||||
shuffle,
|
||||
@ -15,6 +16,7 @@ import {
|
||||
formatUser,
|
||||
formatAlbum,
|
||||
} from '../../util/format';
|
||||
import URILink from '../../components/URILink';
|
||||
|
||||
const coreActions = require('../../services/core/actions');
|
||||
const uiActions = require('../../services/ui/actions');
|
||||
@ -731,6 +733,7 @@ export function following(uri, method = 'GET') {
|
||||
let endpoint;
|
||||
let data;
|
||||
let is_following = null;
|
||||
const asset = getState().core[`${asset_name}s`] && getState().core[`${asset_name}s`][uri];
|
||||
|
||||
if (method == 'PUT') {
|
||||
is_following = true;
|
||||
@ -794,6 +797,16 @@ export function following(uri, method = 'GET') {
|
||||
key: uri,
|
||||
in_library: is_following,
|
||||
});
|
||||
|
||||
if (method === 'DELETE') {
|
||||
dispatch(uiActions.createNotification({
|
||||
content: <span>Removed <URILink uri={uri}>{asset ? asset.name : asset_name}</URILink> from library</span>,
|
||||
}));
|
||||
} else if (method === 'PUT' || method === 'POST') {
|
||||
dispatch(uiActions.createNotification({
|
||||
content: <span>Added <URILink uri={uri}>{asset ? asset.name : asset_name}</URILink> to library</span>,
|
||||
}));
|
||||
}
|
||||
},
|
||||
(error) => {
|
||||
dispatch(coreActions.handleException(
|
||||
|
||||
Reference in New Issue
Block a user