Adding page titles
This commit is contained in:
@ -20,14 +20,13 @@ const sendRequest = (dispatch, getState, endpoint) => {
|
||||
var config = {
|
||||
method: 'GET',
|
||||
url: getState().genius.provider_url+endpoint,
|
||||
dataType: "json",
|
||||
timeout: 10000
|
||||
};
|
||||
|
||||
$.ajax(config).then(
|
||||
response => {
|
||||
dispatch(uiActions.stopLoading(loader_key));
|
||||
resolve(response.result);
|
||||
resolve(response);
|
||||
},
|
||||
(xhr, status, error) => {
|
||||
dispatch(uiActions.stopLoading(loader_key));
|
||||
@ -64,6 +63,7 @@ export function getTrackLyrics(uri, url){
|
||||
sendRequest(dispatch, getState, "?action=lyrics&url="+url)
|
||||
.then(
|
||||
response => {
|
||||
|
||||
var html = $(response);
|
||||
var lyrics = html.find('.lyrics');
|
||||
if (lyrics.length > 0){
|
||||
|
||||
@ -1,14 +1,6 @@
|
||||
|
||||
export default function reducer(genius = {}, action){
|
||||
switch (action.type){
|
||||
|
||||
case 'GENIUS_CONNECT':
|
||||
case 'GENIUS_CONNECTING':
|
||||
return Object.assign({}, genius, { connected: false, connecting: true });
|
||||
|
||||
case 'GENIUS_CONNECTED':
|
||||
return Object.assign({}, genius, { connected: true, connecting: false });
|
||||
|
||||
default:
|
||||
return genius
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user