Development #287

Merged
bones7242 merged 58 commits from development into master 2017-12-11 20:53:02 +01:00
2 changed files with 5 additions and 2 deletions
Showing only changes of commit a6ccc9b682 - Show all commits

View file

@ -6,7 +6,7 @@ function handleLbrynetResponse ({ data }, resolve, reject) {
if (data.result) {
// check for an error
if (data.result.error) {
logger.warn('Lbrynet api error:', data.result.error);
logger.debug('Lbrynet api error:', data.result.error);
reject(data.result.error);
return;
};

View file

@ -152,12 +152,15 @@ function determineResponseType (uri, headers) {
}
} else {
responseType = SHOW;
if (!headers['accept'] || !headers['accept'].split(',').includes('text/html')) {
responseType = SERVE;
}
}
return responseType;
}
function determineName (uri) {
/* patch because twitter player preview adds '>' before file extension. Note: put this inside determineName()? */
/* patch because twitter player preview adds '>' before file extension. */
if (uri.indexOf('>') !== -1) {
return uri.substring(0, uri.indexOf('>'));
}