use new sdk for resolve/claim_search
This commit is contained in:
parent
04e3ca8250
commit
4da1edb0af
3 changed files with 15 additions and 7 deletions
12
dist/bundle.es.js
vendored
12
dist/bundle.es.js
vendored
|
@ -1407,9 +1407,6 @@ function parseURI(URL, requireProto = false) {
|
||||||
}
|
}
|
||||||
|
|
||||||
rest.forEach(urlPiece => {
|
rest.forEach(urlPiece => {
|
||||||
if (urlPiece && urlPiece.includes(' ')) {
|
|
||||||
console.error('URL can not include a space');
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const includesChannel = streamNameOrChannelName.startsWith('@');
|
const includesChannel = streamNameOrChannelName.startsWith('@');
|
||||||
|
@ -3143,7 +3140,10 @@ function doResolveUris(uris, returnCachedClaims = false) {
|
||||||
|
|
||||||
const resolveInfo = {};
|
const resolveInfo = {};
|
||||||
|
|
||||||
return lbryProxy.resolve(_extends$5({ urls: urisToResolve }, options)).then(result => {
|
return lbryProxy.resolve(_extends$5({
|
||||||
|
urls: urisToResolve,
|
||||||
|
new_sdk_server: 'http://sdk.lbry.tech:5279/api'
|
||||||
|
}, options)).then(result => {
|
||||||
Object.entries(result).forEach(([uri, uriResolveInfo]) => {
|
Object.entries(result).forEach(([uri, uriResolveInfo]) => {
|
||||||
const fallbackResolveInfo = {
|
const fallbackResolveInfo = {
|
||||||
stream: null,
|
stream: null,
|
||||||
|
@ -3379,7 +3379,8 @@ function doFetchClaimsByChannel(uri, page = 1) {
|
||||||
page: page || 1,
|
page: page || 1,
|
||||||
order_by: ['release_time'],
|
order_by: ['release_time'],
|
||||||
include_is_my_output: true,
|
include_is_my_output: true,
|
||||||
include_purchase_receipt: true
|
include_purchase_receipt: true,
|
||||||
|
new_sdk_server: 'http://sdk.lbry.tech:5279/api'
|
||||||
}).then(result => {
|
}).then(result => {
|
||||||
const { items: claims, total_items: claimsInChannel, page: returnedPage } = result;
|
const { items: claims, total_items: claimsInChannel, page: returnedPage } = result;
|
||||||
|
|
||||||
|
@ -3610,6 +3611,7 @@ function doClaimSearch(options = {
|
||||||
};
|
};
|
||||||
|
|
||||||
lbryProxy.claim_search(_extends$5({}, options, {
|
lbryProxy.claim_search(_extends$5({}, options, {
|
||||||
|
new_sdk_server: 'http://sdk.lbry.tech:5279/api',
|
||||||
include_purchase_receipt: true
|
include_purchase_receipt: true
|
||||||
})).then(success, failure);
|
})).then(success, failure);
|
||||||
};
|
};
|
||||||
|
|
|
@ -74,7 +74,7 @@ export function parseURI(URL: string, requireProto: boolean = false): LbryUrlObj
|
||||||
}
|
}
|
||||||
|
|
||||||
rest.forEach(urlPiece => {
|
rest.forEach(urlPiece => {
|
||||||
if (urlPiece && urlPiece.includes(' ')) {
|
if (!isProduction && urlPiece && urlPiece.includes(' ')) {
|
||||||
console.error('URL can not include a space');
|
console.error('URL can not include a space');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -57,7 +57,11 @@ export function doResolveUris(uris: Array<string>, returnCachedClaims: boolean =
|
||||||
},
|
},
|
||||||
} = {};
|
} = {};
|
||||||
|
|
||||||
return Lbry.resolve({ urls: urisToResolve, ...options }).then((result: ResolveResponse) => {
|
return Lbry.resolve({
|
||||||
|
urls: urisToResolve,
|
||||||
|
new_sdk_server: 'http://sdk.lbry.tech:5279/api',
|
||||||
|
...options,
|
||||||
|
}).then((result: ResolveResponse) => {
|
||||||
Object.entries(result).forEach(([uri, uriResolveInfo]) => {
|
Object.entries(result).forEach(([uri, uriResolveInfo]) => {
|
||||||
const fallbackResolveInfo = {
|
const fallbackResolveInfo = {
|
||||||
stream: null,
|
stream: null,
|
||||||
|
@ -323,6 +327,7 @@ export function doFetchClaimsByChannel(uri: string, page: number = 1) {
|
||||||
order_by: ['release_time'],
|
order_by: ['release_time'],
|
||||||
include_is_my_output: true,
|
include_is_my_output: true,
|
||||||
include_purchase_receipt: true,
|
include_purchase_receipt: true,
|
||||||
|
new_sdk_server: 'http://sdk.lbry.tech:5279/api',
|
||||||
}).then((result: ClaimSearchResponse) => {
|
}).then((result: ClaimSearchResponse) => {
|
||||||
const { items: claims, total_items: claimsInChannel, page: returnedPage } = result;
|
const { items: claims, total_items: claimsInChannel, page: returnedPage } = result;
|
||||||
|
|
||||||
|
@ -589,6 +594,7 @@ export function doClaimSearch(
|
||||||
|
|
||||||
Lbry.claim_search({
|
Lbry.claim_search({
|
||||||
...options,
|
...options,
|
||||||
|
new_sdk_server: 'http://sdk.lbry.tech:5279/api',
|
||||||
include_purchase_receipt: true,
|
include_purchase_receipt: true,
|
||||||
}).then(success, failure);
|
}).then(success, failure);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue