Full debug from Spotify API issues

This commit is contained in:
James Barnsley
2017-12-04 08:05:33 +13:00
16 changed files with 241 additions and 182 deletions

View File

@ -67,15 +67,6 @@
} else {
js.src = '/iris/app.min.js?v='+build;
css.href = '/iris/app.min.css?v='+build;
// Initiate error tracking. This helps catch errors early so
// patches can accurately and quickly fix issues.
Raven.config(
'https://023e3bf7721b48f29948545fc36a4621@sentry.io/219026',
{
release: version
}
).install();
}
// And finally inject our CSS/JS tags

View File

@ -67,7 +67,10 @@ class App extends React.Component{
// Check for url-parsed configuration values
var url_vars = this.props.location.query;
if (url_vars !== undefined && url_vars.host !== undefined && url_vars.port !== undefined){
this.props.mopidyActions.setConfig(url_vars);
this.props.mopidyActions.setConfig({
host: url_vars.host,
port: url_vars.port
});
hashHistory.push(global.baseURL);
}
}

View File

@ -319,6 +319,7 @@ export function getFeaturedPlaylists(){
dispatch({ type: 'SPOTIFY_FEATURED_PLAYLISTS_LOADED', data: false });
var date = new Date();
date.setHours(date.getHours());
var year = date.getFullYear();
var month = date.getMonth();
if (month < 10 ) month = '0'+month;
@ -331,7 +332,7 @@ export function getFeaturedPlaylists(){
var sec = date.getSeconds();
if (sec < 10 ) sec = '0'+sec;
var timestamp = year+'-'+month+'-'+day+'T'+hour+':00:00';
var timestamp = year+'-'+month+'-'+day+'T'+hour+':'+min+':'+sec;
sendRequest(dispatch, getState, 'browse/featured-playlists?limit=50&country='+getState().core.country+'&locale='+getState().core.locale+'timestamp='+timestamp)
.then(
@ -950,16 +951,20 @@ export function getRecommendations(uris = [], limit = 20){
}
}
}
if (albums.length > 0){
dispatch({
type: 'ALBUMS_LOADED',
albums: albums
});
}
dispatch({
type: 'ALBUMS_LOADED',
albums: albums
});
dispatch({
type: 'TRACKS_LOADED',
tracks: tracks
});
if (tracks.length > 0){
dispatch({
type: 'TRACKS_LOADED',
tracks: tracks
});
}
dispatch({
type: 'SPOTIFY_RECOMMENDATIONS_LOADED',

View File

@ -44,6 +44,7 @@
padding: 10px 14px 4px;
margin: 0;
font-size: 12px;
text-transform: uppercase;
}
.result {

View File

@ -15,6 +15,11 @@
z-index: 1;
}
h1 {
font-size: 3rem;
line-height: 3rem;
}
.liner {
z-index: 2;
position: relative;
@ -97,6 +102,17 @@
padding-bottom: 20px;
}
}
@include responsive($bp_medium){
.intro {
padding: 40px 20px;
}
.seeds {
padding-top: 20px;
}
}
}
.discover-featured-view,