added fix to serve to embeded show urls
This commit is contained in:
parent
6fea63dcb3
commit
a6ccc9b682
2 changed files with 5 additions and 2 deletions
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -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('>'));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue