Replace generateStreamUrl for Lbry get call
+ remove unused config
This commit is contained in:
parent
ac0ec4794a
commit
4d44d81f59
3 changed files with 5 additions and 7 deletions
|
@ -9,7 +9,6 @@ WEB_SERVER_PORT=1337
|
|||
|
||||
# -- APIs ---
|
||||
LBRY_WEB_API=https://api.na-backend.odysee.com
|
||||
LBRY_WEB_STREAMING_API=https://player.odycdn.com
|
||||
LBRY_WEB_BUFFER_API=https://collector-service.api.lbry.tv/api/v1/events/video
|
||||
COMMENT_SERVER_API=https://comments.odysee.tv/api/v2
|
||||
SEARCH_SERVER_API_ALT=https://recsys.odysee.tv/search
|
||||
|
|
|
@ -10,7 +10,6 @@ const config = {
|
|||
LBRY_WEB_PUBLISH_API: process.env.LBRY_WEB_PUBLISH_API,
|
||||
LBRY_WEB_PUBLISH_API_V2: process.env.LBRY_WEB_PUBLISH_API_V2,
|
||||
LBRY_API_URL: process.env.LBRY_API_URL, // api.odysee.com',
|
||||
LBRY_WEB_STREAMING_API: process.env.LBRY_WEB_STREAMING_API, // player.odycdn.com
|
||||
LBRY_WEB_BUFFER_API: process.env.LBRY_WEB_BUFFER_API,
|
||||
SEARCH_SERVER_API: process.env.SEARCH_SERVER_API,
|
||||
SEARCH_SERVER_API_ALT: process.env.SEARCH_SERVER_API_ALT,
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
const { URL, LBRY_WEB_STREAMING_API, THUMBNAIL_CARDS_CDN_URL } = require('../../config');
|
||||
const { URL, THUMBNAIL_CARDS_CDN_URL } = require('../../config');
|
||||
const { buildURI } = require('../../web/src/lbryURI');
|
||||
const { lbryProxy: Lbry } = require('../../web/lbry');
|
||||
|
||||
const CONTINENT_COOKIE = 'continent';
|
||||
|
||||
function generateStreamUrl(claimName, claimId) {
|
||||
return `${LBRY_WEB_STREAMING_API}/content/claims/${encodeURIComponent(claimName)
|
||||
.replace(/'/g, '%27')
|
||||
.replace(/\(/g, '%28')
|
||||
.replace(/\)/g, '%29')}/${claimId}/${encodeURIComponent(claimName)}`;
|
||||
const uri = buildURI({ claimName, claimId });
|
||||
return Lbry.get({ uri }).then(({ streaming_url }) => streaming_url);
|
||||
}
|
||||
|
||||
function generateEmbedUrl(claimName, claimId, startTime, referralLink) {
|
||||
|
|
Loading…
Reference in a new issue