Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8486e750ae |
No files matched your search
@@ -41,7 +41,6 @@ SITE_HELP_EMAIL=help@lbry.com
|
||||
LOGO_TITLE=lbry.tv
|
||||
## Social media
|
||||
TWITTER_ACCOUNT=LBRYcom
|
||||
BRANDED_SITE=odysee
|
||||
|
||||
## IMAGE ASSETS
|
||||
YRBL_HAPPY_IMG_URL=https://cdn.lbryplayer.xyz/api/v3/streams/free/yrbl-happy/7aa50a7e5adaf48691935d55e45d697547392929/839d9a
|
||||
|
||||
+1
-4
@@ -18,7 +18,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
- Improve twitter share _community pr!_ ([#6690](https://github.com/lbryio/lbry-desktop/pull/6690))
|
||||
- Update lighthouse search api _community pr!_ ([#6731](https://github.com/lbryio/lbry-desktop/pull/6731))
|
||||
- Update sockety api _community pr!_ ([#6747](https://github.com/lbryio/lbry-desktop/pull/6747))
|
||||
- Use resolve for OG metadata instead of chainquery _community pr!_ ([#6787](https://github.com/lbryio/lbry-desktop/pull/6787))
|
||||
|
||||
### Fixed
|
||||
- App now supports '#' and ':' for claimId separator ([#6496](https://github.com/lbryio/lbry-desktop/pull/6496))
|
||||
@@ -30,10 +29,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
- Fix yarn copyenv on windows _community pr!_ ([#6702](https://github.com/lbryio/lbry-desktop/pull/6702))
|
||||
- Fix unnecessary livestream api calls in channel page _community pr!_ ([#6652](https://github.com/lbryio/lbry-desktop/pull/6652))
|
||||
- Fix desktop app fails to resolve deep links _community pr!_ ([#6779](https://github.com/lbryio/lbry-desktop/pull/6779))
|
||||
- Fix wrong release date on GoogleVideo metadata _community pr!_ ([#6787](https://github.com/lbryio/lbry-desktop/pull/6787))
|
||||
- Fix markdown line breaking mid word _community pr!_ ([#6805](https://github.com/lbryio/lbry-desktop/pull/6805))
|
||||
- Added \ and = to reserved symbol warning _community pr!_ ([#6733](https://github.com/lbryio/lbry-desktop/pull/6733))
|
||||
- Don't break words in chat + fix text overflow past 3 dot menu _community pr!_ ([#6602](https://github.com/lbryio/lbry-desktop/pull/6602))
|
||||
|
||||
|
||||
## [0.51.1] - [2021-06-26]
|
||||
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lbry",
|
||||
"version": "0.51.2-rc.1",
|
||||
"version": "0.51.1",
|
||||
"description": "A browser for the LBRY network, a digital marketplace controlled by its users.",
|
||||
"keywords": [
|
||||
"lbry"
|
||||
@@ -152,7 +152,7 @@
|
||||
"imagesloaded": "^4.1.4",
|
||||
"json-loader": "^0.5.4",
|
||||
"lbry-format": "https://github.com/lbryio/lbry-format.git",
|
||||
"lbry-redux": "lbryio/lbry-redux#e4d0662100a5f4b28bb1bf3cbc1e51b2eebab5b6",
|
||||
"lbry-redux": "lbryio/lbry-redux#7cc9923ed9ff1940b508842af6be44c8da906a60",
|
||||
"lbryinc": "lbryio/lbryinc#8f9a58bfc8312a65614fd7327661cdcc502c4e59",
|
||||
"lint-staged": "^7.0.2",
|
||||
"localforage": "^1.7.1",
|
||||
|
||||
@@ -48,11 +48,9 @@ const NagDegradedPerformance = lazyImport(() =>
|
||||
import('web/component/nag-degraded-performance' /* webpackChunkName: "secondary" */)
|
||||
);
|
||||
const NagNoUser = lazyImport(() => import('web/component/nag-no-user' /* webpackChunkName: "nag-no-user" */));
|
||||
const NagSunset = lazyImport(() => import('web/component/nag-sunset' /* webpackChunkName: "nag-no-user" */));
|
||||
const YoutubeWelcome = lazyImport(() =>
|
||||
import('web/component/youtubeReferralWelcome' /* webpackChunkName: "secondary" */)
|
||||
);
|
||||
|
||||
// @endif
|
||||
|
||||
const SyncFatalError = lazyImport(() => import('component/syncFatalError' /* webpackChunkName: "syncFatalError" */));
|
||||
@@ -164,14 +162,12 @@ function App(props: Props) {
|
||||
const [upgradeNagClosed, setUpgradeNagClosed] = useState(false);
|
||||
const [resolvedSubscriptions, setResolvedSubscriptions] = useState(false);
|
||||
const [sidebarOpen] = usePersistedState('sidebar', true);
|
||||
const [seenSunsestMessage, setSeenSunsetMessage] = usePersistedState('lbrytv-sunset', false);
|
||||
const showUpgradeButton =
|
||||
(autoUpdateDownloaded || (process.platform === 'linux' && isUpgradeAvailable)) && !upgradeNagClosed;
|
||||
// referral claiming
|
||||
const referredRewardAvailable = rewards && rewards.some((reward) => reward.reward_type === REWARDS.TYPE_REFEREE);
|
||||
const urlParams = new URLSearchParams(search);
|
||||
const rawReferrerParam = urlParams.get('r');
|
||||
const fromLbrytvParam = urlParams.get('sunset');
|
||||
const sanitizedReferrerParam = rawReferrerParam && rawReferrerParam.replace(':', '#');
|
||||
const shouldHideNag = pathname.startsWith(`/$/${PAGES.EMBED}`) || pathname.startsWith(`/$/${PAGES.AUTH_VERIFY}`);
|
||||
const userId = user && user.id;
|
||||
@@ -464,9 +460,6 @@ function App(props: Props) {
|
||||
<YoutubeWelcome />
|
||||
{!SIMPLE_SITE && !shouldHideNag && <OpenInAppLink uri={uri} />}
|
||||
{!shouldHideNag && <NagContinueFirstRun />}
|
||||
{fromLbrytvParam && !seenSunsestMessage && !shouldHideNag && (
|
||||
<NagSunset email={hasVerifiedEmail} onClose={() => setSeenSunsetMessage(true)} />
|
||||
)}
|
||||
{(lbryTvApiStatus === STATUS_DEGRADED || lbryTvApiStatus === STATUS_FAILING) && !shouldHideNag && (
|
||||
<NagDegradedPerformance onClose={() => setLbryTvApiStatus(STATUS_OK)} />
|
||||
)}
|
||||
|
||||
@@ -50,7 +50,7 @@ const select = (state, props) => {
|
||||
hasClaimInCustom: makeSelectCollectionForIdHasClaimUrl(COLLECTIONS_CONSTS.FAVORITES_ID, contentPermanentUri)(state),
|
||||
channelIsMuted: makeSelectChannelIsMuted(contentChannelUri)(state),
|
||||
channelIsBlocked: makeSelectChannelIsBlocked(contentChannelUri)(state),
|
||||
fileInfo: makeSelectFileInfoForUri(contentPermanentUri)(state),
|
||||
fileInfo: makeSelectFileInfoForUri(props.uri)(state),
|
||||
isSubscribed: makeSelectIsSubscribed(contentChannelUri, true)(state),
|
||||
channelIsAdminBlocked: makeSelectChannelIsAdminBlocked(props.uri)(state),
|
||||
isAdmin: selectHasAdminChannel(state),
|
||||
|
||||
@@ -7,10 +7,10 @@ import React from 'react';
|
||||
import classnames from 'classnames';
|
||||
import { Menu, MenuButton, MenuList, MenuItem } from '@reach/menu-button';
|
||||
import Icon from 'component/common/icon';
|
||||
import { useIsMobile } from 'effects/use-screensize';
|
||||
import { generateShareUrl, generateRssUrl, generateLbryContentUrl } from 'util/url';
|
||||
import { useHistory } from 'react-router';
|
||||
import { buildURI, parseURI, COLLECTIONS_CONSTS } from 'lbry-redux';
|
||||
|
||||
const SHARE_DOMAIN = SHARE_DOMAIN_URL || URL;
|
||||
const PAGE_VIEW_QUERY = `view`;
|
||||
const EDIT_PAGE = 'edit';
|
||||
@@ -94,8 +94,6 @@ function ClaimMenuList(props: Props) {
|
||||
editedCollection,
|
||||
isAuthenticated,
|
||||
} = props;
|
||||
|
||||
const isMobile = useIsMobile();
|
||||
const incognitoClaim = contentChannelUri && !contentChannelUri.includes('@');
|
||||
const isChannel = !incognitoClaim && !contentSigningChannel;
|
||||
const { channelName } = parseURI(contentChannelUri);
|
||||
@@ -231,11 +229,6 @@ function ClaimMenuList(props: Props) {
|
||||
push(`/$/${PAGES.REPORT_CONTENT}?claimId=${contentClaim && contentClaim.claim_id}`);
|
||||
}
|
||||
|
||||
function handleOpenInDesktop() {
|
||||
// $FlowFixMe
|
||||
window.open(`/$/${PAGES.OPEN_IN_DESKTOP}/${contentClaim.name}/${contentClaim.claim_id}`, '_blank');
|
||||
}
|
||||
|
||||
return (
|
||||
<Menu>
|
||||
<MenuButton
|
||||
@@ -385,17 +378,16 @@ function ClaimMenuList(props: Props) {
|
||||
</div>
|
||||
</MenuItem>
|
||||
)}
|
||||
{showDelete && (
|
||||
<MenuItem className="comment__menu-option" onSelect={handleDelete}>
|
||||
<div className="menu__link">
|
||||
<Icon aria-hidden icon={ICONS.DELETE} />
|
||||
{__('Delete')}
|
||||
</div>
|
||||
</MenuItem>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
|
||||
{showDelete && (
|
||||
<MenuItem className="comment__menu-option" onSelect={handleDelete}>
|
||||
<div className="menu__link">
|
||||
<Icon aria-hidden icon={ICONS.DELETE} />
|
||||
{__('Delete')}
|
||||
</div>
|
||||
</MenuItem>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
@@ -418,15 +410,6 @@ function ClaimMenuList(props: Props) {
|
||||
</MenuItem>
|
||||
)}
|
||||
|
||||
{IS_WEB && !isMobile && (
|
||||
<MenuItem className="comment__menu-option" onSelect={handleOpenInDesktop}>
|
||||
<div className="menu__link">
|
||||
<Icon aria-hidden icon={ICONS.DESKTOP} />
|
||||
{__('Open in Desktop')}
|
||||
</div>
|
||||
</MenuItem>
|
||||
)}
|
||||
|
||||
{!claimIsMine && !isMyCollection && (
|
||||
<MenuItem className="comment__menu-option" onSelect={handleReportContent}>
|
||||
<div className="menu__link">
|
||||
|
||||
@@ -362,23 +362,23 @@ const ClaimPreview = forwardRef<any, {}>((props: Props, ref: any) => {
|
||||
{!pending ? (
|
||||
<NavLink aria-hidden tabIndex={-1} {...navLinkProps}>
|
||||
<FileThumbnail thumbnail={thumbnailUrl}>
|
||||
<div className="claim-preview__hover-actions">
|
||||
{isPlayable && (
|
||||
<FileWatchLaterLink focusable={false} uri={uri} />
|
||||
)}
|
||||
</div>
|
||||
<div className="claim-preview__hover-actions">
|
||||
{/* @if TARGET='app' */}
|
||||
{claim && !isCollection && (
|
||||
{/* @if TARGET='app' */}
|
||||
{claim && !isCollection && (
|
||||
<div className="claim-preview__hover-actions">
|
||||
<FileDownloadLink focusable={false} uri={canonicalUrl} hideOpenButton hideDownloadStatus />
|
||||
)}
|
||||
{/* @endif */}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
{/* @endif */}
|
||||
{!isLivestream && (
|
||||
<div className="claim-preview__file-property-overlay">
|
||||
<PreviewOverlayProperties uri={uri} small={type === 'small'} properties={liveProperty} />
|
||||
</div>
|
||||
)}
|
||||
{isPlayable && (
|
||||
<div className="claim-preview__hover-actions">
|
||||
<FileWatchLaterLink focusable={false} uri={uri} />
|
||||
</div>
|
||||
)}
|
||||
</FileThumbnail>
|
||||
</NavLink>
|
||||
) : (
|
||||
|
||||
@@ -208,18 +208,19 @@ function ClaimPreviewTile(props: Props) {
|
||||
<FileThumbnail thumbnail={thumbnailUrl} allowGifs>
|
||||
{!isChannel && (
|
||||
<React.Fragment>
|
||||
<div className="claim-preview__hover-actions">
|
||||
{isPlayable && (
|
||||
<FileWatchLaterLink focusable={false} uri={uri} />
|
||||
)}
|
||||
</div>
|
||||
<div className="claim-preview__hover-actions">
|
||||
{/* @if TARGET='app' */}
|
||||
{isStream && (
|
||||
{/* @if TARGET='app' */}
|
||||
{isStream && (
|
||||
<div className="claim-preview__hover-actions">
|
||||
<FileDownloadLink focusable={false} uri={canonicalUrl} hideOpenButton />
|
||||
)}
|
||||
{/* @endif */}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
{/* @endif */}
|
||||
|
||||
{isPlayable && (
|
||||
<div className="claim-preview__hover-actions">
|
||||
<FileWatchLaterLink focusable={false} uri={uri} />
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className="claim-preview__file-property-overlay">
|
||||
<PreviewOverlayProperties uri={uri} properties={liveProperty || properties} />
|
||||
|
||||
@@ -2331,11 +2331,4 @@ export const icons = {
|
||||
<path d="M4.954 14.753l3.535 3.535-1.768 1.768-3.535-3.535z" />
|
||||
</g>
|
||||
),
|
||||
[ICONS.DESKTOP]: buildIcon(
|
||||
<g>
|
||||
<rect x="2" y="3" width="20" height="14" rx="2" ry="2" />
|
||||
<line x1="8" y1="21" x2="16" y2="21" />
|
||||
<line x1="12" y1="17" x2="12" y2="21" />
|
||||
</g>
|
||||
),
|
||||
};
|
||||
@@ -3,25 +3,23 @@ import {
|
||||
makeSelectPublishFormValue,
|
||||
selectMyClaimForUri,
|
||||
selectIsResolvingPublishUris,
|
||||
selectTakeOverAmount,
|
||||
doUpdatePublishForm,
|
||||
doPrepareEdit,
|
||||
selectBalance,
|
||||
} from 'lbry-redux';
|
||||
import PublishPage from './view';
|
||||
|
||||
const select = (state) => ({
|
||||
const select = state => ({
|
||||
name: makeSelectPublishFormValue('name')(state),
|
||||
bid: makeSelectPublishFormValue('bid')(state),
|
||||
uri: makeSelectPublishFormValue('uri')(state),
|
||||
isResolvingUri: selectIsResolvingPublishUris(state),
|
||||
balance: selectBalance(state),
|
||||
myClaimForUri: selectMyClaimForUri(state),
|
||||
amountNeededForTakeover: selectTakeOverAmount(state),
|
||||
});
|
||||
|
||||
const perform = (dispatch) => ({
|
||||
updatePublishForm: (value) => dispatch(doUpdatePublishForm(value)),
|
||||
const perform = dispatch => ({
|
||||
updatePublishForm: value => dispatch(doUpdatePublishForm(value)),
|
||||
prepareEdit: (claim, uri) => dispatch(doPrepareEdit(claim, uri)),
|
||||
});
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ import {
|
||||
makeSelectPublishFormValue,
|
||||
selectIsStillEditing,
|
||||
selectMyClaimForUri,
|
||||
selectTakeOverAmount,
|
||||
doUpdatePublishForm,
|
||||
doPrepareEdit,
|
||||
} from 'lbry-redux';
|
||||
@@ -18,7 +17,6 @@ const select = (state) => ({
|
||||
myClaimForUri: selectMyClaimForUri(state),
|
||||
activeChannelClaim: selectActiveChannelClaim(state),
|
||||
incognito: selectIncognito(state),
|
||||
amountNeededForTakeover: selectTakeOverAmount(state),
|
||||
});
|
||||
|
||||
const perform = (dispatch) => ({
|
||||
|
||||
@@ -18,7 +18,6 @@ const BackupPage = lazyImport(() => import('page/backup' /* webpackChunkName: "b
|
||||
|
||||
// @if TARGET='web'
|
||||
const Code2257Page = lazyImport(() => import('web/page/code2257' /* webpackChunkName: "code2257" */));
|
||||
const OpenInDesktopPage = lazyImport(() => import('web/page/openInDesktop' /* webpackChunkName: "openInDesktop" */));
|
||||
// @endif
|
||||
|
||||
// Chunk: "secondary"
|
||||
@@ -70,9 +69,7 @@ const RewardsVerifyPage = lazyImport(() => import('page/rewardsVerify' /* webpac
|
||||
const SearchPage = lazyImport(() => import('page/search' /* webpackChunkName: "secondary" */));
|
||||
const SettingsAdvancedPage = lazyImport(() => import('page/settingsAdvanced' /* webpackChunkName: "secondary" */));
|
||||
const SettingsStripeCard = lazyImport(() => import('page/settingsStripeCard' /* webpackChunkName: "secondary" */));
|
||||
const SettingsStripeAccount = lazyImport(() =>
|
||||
import('page/settingsStripeAccount' /* webpackChunkName: "secondary" */)
|
||||
);
|
||||
const SettingsStripeAccount = lazyImport(() => import('page/settingsStripeAccount' /* webpackChunkName: "secondary" */));
|
||||
const SettingsCreatorPage = lazyImport(() => import('page/settingsCreator' /* webpackChunkName: "secondary" */));
|
||||
const SettingsNotificationsPage = lazyImport(() =>
|
||||
import('page/settingsNotifications' /* webpackChunkName: "secondary" */)
|
||||
@@ -274,7 +271,6 @@ function AppRouter(props: Props) {
|
||||
<Route path={`/$/${PAGES.BACKUP}`} exact component={BackupPage} />
|
||||
{/* @endif */}
|
||||
{/* @if TARGET='web' */}
|
||||
<Route path={`/$/${PAGES.OPEN_IN_DESKTOP}/:claimName/:claimId`} exact component={OpenInDesktopPage} />
|
||||
<Route path={`/$/${PAGES.CODE_2257}`} exact component={Code2257Page} />
|
||||
{/* @endif */}
|
||||
<Route path={`/$/${PAGES.AUTH_VERIFY}`} exact component={SignInVerifyPage} />
|
||||
|
||||
@@ -165,4 +165,3 @@ export const GLOBE = 'globe';
|
||||
export const RSS = 'rss';
|
||||
export const STAR = 'star';
|
||||
export const MUSIC = 'MusicCategory';
|
||||
export const DESKTOP = 'desktop';
|
||||
@@ -74,4 +74,3 @@ exports.LIVESTREAM = 'livestream';
|
||||
exports.LIVESTREAM_CURRENT = 'live';
|
||||
exports.GENERAL = 'general';
|
||||
exports.LIST = 'list';
|
||||
exports.OPEN_IN_DESKTOP = 'open';
|
||||
@@ -12,13 +12,10 @@ import Card from 'component/common/card';
|
||||
import { formatLbryUrlForWeb } from 'util/url';
|
||||
import { parseURI, COLLECTIONS_CONSTS } from 'lbry-redux';
|
||||
|
||||
const AbandonedChannelPreview = lazyImport(() =>
|
||||
import('component/abandonedChannelPreview' /* webpackChunkName: "abandonedChannelPreview" */)
|
||||
);
|
||||
const AbandonedChannelPreview = lazyImport(() => import('component/abandonedChannelPreview' /* webpackChunkName: "abandonedChannelPreview" */));
|
||||
const FilePage = lazyImport(() => import('page/file' /* webpackChunkName: "filePage" */));
|
||||
const LivestreamPage = lazyImport(() => import('page/livestream' /* webpackChunkName: "livestream" */));
|
||||
const Yrbl = lazyImport(() => import('component/yrbl' /* webpackChunkName: "yrbl" */));
|
||||
const isDev = process.env.NODE_ENV !== 'production';
|
||||
|
||||
type Props = {
|
||||
isResolvingUri: boolean,
|
||||
@@ -88,8 +85,7 @@ function ShowPage(props: Props) {
|
||||
const canonicalUrlPath = '/' + canonicalUrl.replace(/^lbry:\/\//, '').replace(/#/g, ':');
|
||||
// Only redirect if we are in lbry.tv land
|
||||
// replaceState will fail if on a different domain (like webcache.googleusercontent.com)
|
||||
const hostname = isDev ? 'localhost' : DOMAIN;
|
||||
if (canonicalUrlPath !== window.location.pathname && hostname === window.location.hostname) {
|
||||
if (canonicalUrlPath !== window.location.pathname && DOMAIN === window.location.hostname) {
|
||||
const urlParams = new URLSearchParams(search);
|
||||
if (urlParams.get(COLLECTIONS_CONSTS.COLLECTION_ID)) {
|
||||
const listId = urlParams.get(COLLECTIONS_CONSTS.COLLECTION_ID) || '';
|
||||
|
||||
@@ -54,10 +54,11 @@ export const makeSelectLikeCountForUri = (uri) =>
|
||||
|
||||
export const makeSelectDislikeCountForUri = (uri) =>
|
||||
createSelector(makeSelectClaimForUri(uri), makeSelectReactionsForUri(uri), (claim, reactions) => {
|
||||
if (!claim || !reactions || reactions.my_reactions === null || reactions.others_reactions === null) {
|
||||
const claimId = claim.claim_id;
|
||||
|
||||
if (!reactions || reactions.my_reactions === null || reactions.others_reactions === null) {
|
||||
return 0;
|
||||
}
|
||||
const claimId = claim.claim_id;
|
||||
|
||||
let count = 0;
|
||||
if (reactions.others_reactions) {
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
.button--link {
|
||||
color: var(--color-link);
|
||||
transition: color 0.2s;
|
||||
word-break: break-word;
|
||||
word-break: break-all;
|
||||
font-weight: var(--font-weight-bold);
|
||||
|
||||
&:hover {
|
||||
|
||||
@@ -669,13 +669,12 @@
|
||||
|
||||
.claim-preview__hover-actions {
|
||||
display: none;
|
||||
position: relative;
|
||||
float: right;
|
||||
position: absolute;
|
||||
top: var(--spacing-xxs);
|
||||
margin-right: var(--spacing-xxs);
|
||||
right: var(--spacing-xxs);
|
||||
|
||||
& > * {
|
||||
color: var(--color-text);
|
||||
color: var(--color-black);
|
||||
background-color: var(--color-black);
|
||||
border-radius: var(--border-radius);
|
||||
padding: var(--spacing-xxs);
|
||||
@@ -686,7 +685,6 @@
|
||||
}
|
||||
|
||||
.button--file-action {
|
||||
display: block;
|
||||
margin: 0 0;
|
||||
padding: var(--spacing-xxs) var(--spacing-xxs);
|
||||
height: unset;
|
||||
|
||||
@@ -314,7 +314,7 @@ $discussion-header__height: 3rem;
|
||||
}
|
||||
|
||||
.livestream-comment__text {
|
||||
padding-right: var(--spacing-xl);
|
||||
padding-right: var(--spacing-xxs);
|
||||
padding-bottom: var(--spacing-xxs);
|
||||
.markdown-preview {
|
||||
p {
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
// @flow
|
||||
import React from 'react';
|
||||
import Nag from 'component/common/nag';
|
||||
import I18nMessage from 'component/i18nMessage';
|
||||
import * as PAGES from 'constants/pages';
|
||||
import { useHistory } from 'react-router';
|
||||
import Button from '../../ui/component/button';
|
||||
|
||||
type Props = {
|
||||
email?: User,
|
||||
onClose: () => void,
|
||||
};
|
||||
export default function NagSunset(props: Props) {
|
||||
const { email, onClose } = props;
|
||||
const { push } = useHistory();
|
||||
|
||||
const handleOnClick = () => {
|
||||
onClose();
|
||||
push(`/$/${PAGES.AUTH_SIGNIN}`);
|
||||
};
|
||||
return (
|
||||
<Nag
|
||||
type="helpful"
|
||||
message={
|
||||
<I18nMessage
|
||||
tokens={{
|
||||
more: <Button button={'link'} label={__('more')} href="https://odysee.com/@lbry:3f/retirement" />,
|
||||
}}
|
||||
>
|
||||
lbry.tv has been retired (%more%). You have been magically transported to Odysee.com
|
||||
</I18nMessage>
|
||||
}
|
||||
actionText={__('Sign In')}
|
||||
onClick={!email ? handleOnClick : undefined}
|
||||
onClose={onClose}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
import { connect } from 'react-redux';
|
||||
import OpenInDesktopPage from './view';
|
||||
|
||||
const select = (state) => ({});
|
||||
|
||||
export default connect(select, null)(OpenInDesktopPage);
|
||||
@@ -1,67 +0,0 @@
|
||||
// @flow
|
||||
import React from 'react';
|
||||
import Page from 'component/page';
|
||||
import Yrbl from 'component/yrbl';
|
||||
import Button from 'component/button';
|
||||
const { buildURI } = require('lbry-redux');
|
||||
|
||||
const DELAY_TIME = 1500;
|
||||
|
||||
// Landing page for opening lbry urls on external applications.
|
||||
type Props = {
|
||||
match: {
|
||||
params: {
|
||||
claimId: ?string,
|
||||
claimName: ?string,
|
||||
},
|
||||
},
|
||||
};
|
||||
const OpenInDesktop = (props: Props) => {
|
||||
const { match } = props;
|
||||
const { params } = match;
|
||||
const [title, setTitle] = React.useState('Loading...');
|
||||
const [claimUrl, setClaimUrl] = React.useState(null);
|
||||
|
||||
// Get claim url
|
||||
React.useEffect(() => {
|
||||
if (params) {
|
||||
try {
|
||||
const url = buildURI(params);
|
||||
if (url && claimUrl !== url) {
|
||||
setClaimUrl(url);
|
||||
}
|
||||
} catch {}
|
||||
}
|
||||
}, [params, claimUrl, setClaimUrl]);
|
||||
|
||||
// Open url on external application
|
||||
React.useEffect(() => {
|
||||
if (claimUrl) {
|
||||
setTimeout(() => {
|
||||
setTitle('Ready!');
|
||||
window.open(claimUrl, '_top');
|
||||
}, DELAY_TIME);
|
||||
}
|
||||
}, [claimUrl]);
|
||||
|
||||
return (
|
||||
<Page>
|
||||
<div className="main main--empty">
|
||||
<Yrbl
|
||||
type="happy"
|
||||
title={__(title)}
|
||||
subtitle={
|
||||
<p>
|
||||
{__('You will need an external application.')}
|
||||
<br />
|
||||
{__('Get lbry desktop ')}
|
||||
<Button button="link" label={__('here!')} href="https://lbry.com/get" />
|
||||
</p>
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
</Page>
|
||||
);
|
||||
};
|
||||
|
||||
export default OpenInDesktop;
|
||||
+66
-86
@@ -9,23 +9,18 @@ const {
|
||||
SITE_DESCRIPTION,
|
||||
SITE_NAME,
|
||||
FAVICON,
|
||||
LBRY_WEB_API,
|
||||
} = require('../../config.js');
|
||||
|
||||
const { Lbry } = require('lbry-redux');
|
||||
const { generateEmbedUrl, generateStreamUrl, generateDirectUrl } = require('../../ui/util/web');
|
||||
const PAGES = require('../../ui/constants/pages');
|
||||
const { CATEGORY_METADATA } = require('./category-metadata');
|
||||
const { parseURI, normalizeURI } = require('lbry-redux');
|
||||
const { getClaim } = require('./chainquery');
|
||||
const { parseURI } = require('lbry-redux');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const moment = require('moment');
|
||||
const removeMd = require('remove-markdown');
|
||||
const { getJsBundleId } = require('../bundle-id.js');
|
||||
const jsBundleId = getJsBundleId();
|
||||
const SDK_API_PATH = `${LBRY_WEB_API}/api/v1`;
|
||||
const PROXY_URL = `${SDK_API_PATH}/proxy`;
|
||||
Lbry.setDaemonConnectionString(PROXY_URL);
|
||||
|
||||
function insertToHead(fullHtml, htmlToInsert) {
|
||||
const beginStr = '<!-- VARIABLE_HEAD_BEGIN -->';
|
||||
@@ -45,10 +40,6 @@ function truncateDescription(description) {
|
||||
return description.length > 200 ? description.substr(0, 200) + '...' : description;
|
||||
}
|
||||
|
||||
function normalizeClaimUrl(url) {
|
||||
return normalizeURI(url.replace(/:/g, '#'));
|
||||
}
|
||||
|
||||
function escapeHtmlProperty(property) {
|
||||
return property
|
||||
? String(property)
|
||||
@@ -131,33 +122,20 @@ function buildBasicOgMetadata() {
|
||||
function buildClaimOgMetadata(uri, claim, overrideOptions = {}) {
|
||||
// Initial setup for claim based og metadata
|
||||
const { claimName } = parseURI(uri);
|
||||
const { meta, value, signing_channel } = claim;
|
||||
const fee = value && value.fee && (Number(value.fee.amount) || 0);
|
||||
const tags = value && value.tags;
|
||||
const media = value && (value.video || value.audio || value.image);
|
||||
const source = value && value.source;
|
||||
const channel = signing_channel && signing_channel.name;
|
||||
const thumbnail = value && value.thumbnail && value.thumbnail.url;
|
||||
const mediaType = source && source.media_type;
|
||||
const mediaDuration = media && media.duration;
|
||||
const claimTitle = escapeHtmlProperty((value && value.title) || claimName);
|
||||
const releaseTime = (value && value.release_time) || (meta && meta.creation_timestamp) || 0;
|
||||
|
||||
const claimTitle = escapeHtmlProperty(claim.title ? claim.title : claimName);
|
||||
const claimDescription =
|
||||
value && value.description && value.description.length > 0
|
||||
? escapeHtmlProperty(truncateDescription(value.description))
|
||||
claim.description && claim.description.length > 0
|
||||
? escapeHtmlProperty(truncateDescription(claim.description))
|
||||
: `View ${claimTitle} on ${SITE_NAME}`;
|
||||
|
||||
const claimLanguage =
|
||||
value && value.languages && value.languages.length > 0 ? escapeHtmlProperty(value.languages[0]) : 'en_US';
|
||||
const claimLanguage = escapeHtmlProperty(claim.language) || 'en_US';
|
||||
|
||||
let imageThumbnail;
|
||||
|
||||
if (fee <= 0 && mediaType && mediaType.startsWith('image/')) {
|
||||
if (Number(claim.fee) <= 0 && claim.source_media_type && claim.source_media_type.startsWith('image/')) {
|
||||
imageThumbnail = generateStreamUrl(claim.name, claim.claim_id);
|
||||
}
|
||||
|
||||
const claimThumbnail = escapeHtmlProperty(thumbnail) || imageThumbnail || OG_IMAGE_URL || `${URL}/public/v2-og.png`;
|
||||
const claimThumbnail =
|
||||
escapeHtmlProperty(claim.thumbnail_url) || imageThumbnail || OG_IMAGE_URL || `${URL}/public/v2-og.png`;
|
||||
|
||||
// Allow for ovverriding default claim based og metadata
|
||||
const title = overrideOptions.title || claimTitle;
|
||||
@@ -170,9 +148,8 @@ function buildClaimOgMetadata(uri, claim, overrideOptions = {}) {
|
||||
head += '<meta charset="utf8"/>';
|
||||
head += `<title>${title}</title>`;
|
||||
head += `<meta name="description" content="${cleanDescription}"/>`;
|
||||
|
||||
if (tags && tags.length > 0) {
|
||||
head += `<meta name="keywords" content="${tags.toString()}"/>`;
|
||||
if (claim.tags) {
|
||||
head += `<meta name="keywords" content="${claim.tags.toString()}"/>`;
|
||||
}
|
||||
|
||||
head += `<meta name="twitter:image" content="${claimThumbnail}"/>`;
|
||||
@@ -188,28 +165,33 @@ function buildClaimOgMetadata(uri, claim, overrideOptions = {}) {
|
||||
head += `<meta name="twitter:url" content="${URL}/${claim.name}:${claim.claim_id}"/>`;
|
||||
head += `<link rel="canonical" content="${SITE_CANONICAL_URL || URL}/${claim.name}:${claim.claim_id}"/>`;
|
||||
|
||||
if (mediaType && (mediaType.startsWith('video/') || mediaType.startsWith('audio/'))) {
|
||||
if (
|
||||
claim.source_media_type &&
|
||||
(claim.source_media_type.startsWith('video/') || claim.source_media_type.startsWith('audio/'))
|
||||
) {
|
||||
const videoUrl = generateEmbedUrl(claim.name, claim.claim_id);
|
||||
head += `<meta property="og:video" content="${videoUrl}" />`;
|
||||
head += `<meta property="og:video:secure_url" content="${videoUrl}" />`;
|
||||
head += `<meta property="og:video:type" content="${mediaType}" />`;
|
||||
if (channel) {
|
||||
head += `<meta name="og:video:series" content="${channel}"/>`;
|
||||
head += `<meta property="og:video:type" content="${claim.source_media_type}" />`;
|
||||
if (claim.channel) {
|
||||
head += `<meta name="og:video:series" content="${claim.channel}"/>`;
|
||||
}
|
||||
head += `<meta name="twitter:card" content="player"/>`;
|
||||
head += `<meta name="twitter:player" content="${videoUrl}" />`;
|
||||
if (releaseTime) {
|
||||
var release = new Date(releaseTime * 1000).toISOString();
|
||||
if (claim.release_time) {
|
||||
var release = new Date(claim.release_time * 1000).toISOString();
|
||||
head += `<meta property="og:video:release_date" content="${release}"/>`;
|
||||
}
|
||||
if (mediaDuration) {
|
||||
head += `<meta property="og:video:duration" content="${mediaDuration}"/>`;
|
||||
if (claim.duration) {
|
||||
head += `<meta property="og:video:duration" content="${claim.duration}"/>`;
|
||||
} else if (claim.audio_duration) {
|
||||
head += `<meta property="og:video:duration" content="${claim.audio_duration}"/>`;
|
||||
}
|
||||
if (media && media.width && media.height) {
|
||||
head += `<meta property="og:video:width" content="${media.width}"/>`;
|
||||
head += `<meta property="og:video:height" content="${media.height}"/>`;
|
||||
head += `<meta name="twitter:player:width" content="${media.width}">`;
|
||||
head += `<meta name="twitter:player:height" content="${media.height}">`;
|
||||
if (claim.frame_width && claim.frame_height) {
|
||||
head += `<meta property="og:video:width" content="${claim.frame_width}"/>`;
|
||||
head += `<meta property="og:video:height" content="${claim.frame_height}"/>`;
|
||||
head += `<meta name="twitter:player:width" content="${claim.frame_width}">`;
|
||||
head += `<meta name="twitter:player:height" content="${claim.frame_height}">`;
|
||||
}
|
||||
} else {
|
||||
head += `<meta name="twitter:card" content="summary_large_image"/>`;
|
||||
@@ -218,27 +200,19 @@ function buildClaimOgMetadata(uri, claim, overrideOptions = {}) {
|
||||
return head;
|
||||
}
|
||||
|
||||
function buildGoogleVideoMetadata(uri, claim) {
|
||||
const { claimName } = parseURI(uri);
|
||||
const { meta, value } = claim;
|
||||
const media = value && value.video;
|
||||
const source = value && value.source;
|
||||
const thumbnail = value && value.thumbnail && value.thumbnail.url;
|
||||
const mediaType = source && source.media_type;
|
||||
const mediaDuration = media && media.duration;
|
||||
const claimTitle = escapeHtmlProperty((value && value.title) || claimName);
|
||||
const releaseTime = (value && value.release_time) || (meta && meta.creation_timestamp) || 0;
|
||||
|
||||
const claimDescription =
|
||||
value && value.description && value.description.length > 0
|
||||
? escapeHtmlProperty(truncateDescription(value.description))
|
||||
: `View ${claimTitle} on ${SITE_NAME}`;
|
||||
|
||||
if (!mediaType || !mediaType.startsWith('video/')) {
|
||||
function buildGoogleVideoMetadata(claimUri, claim) {
|
||||
if (!claim.source_media_type || !claim.source_media_type.startsWith('video/')) {
|
||||
return '';
|
||||
}
|
||||
|
||||
const claimThumbnail = escapeHtmlProperty(thumbnail) || OG_IMAGE_URL || `${URL}/public/v2-og.png`;
|
||||
const { claimName } = parseURI(claimUri);
|
||||
const claimTitle = escapeHtmlProperty(claim.title ? claim.title : claimName);
|
||||
const claimDescription =
|
||||
claim.description && claim.description.length > 0
|
||||
? escapeHtmlProperty(truncateDescription(claim.description))
|
||||
: `View ${claimTitle} on ${SITE_NAME}`;
|
||||
const claimThumbnail = escapeHtmlProperty(claim.thumbnail_url) || OG_IMAGE_URL || `${URL}/public/v2-og.png`;
|
||||
const releaseTime = claim.release_time || 0;
|
||||
|
||||
// https://developers.google.com/search/docs/data-types/video
|
||||
const googleVideoMetadata = {
|
||||
@@ -250,7 +224,7 @@ function buildGoogleVideoMetadata(uri, claim) {
|
||||
thumbnailUrl: `${claimThumbnail}`,
|
||||
uploadDate: `${new Date(releaseTime * 1000).toISOString()}`,
|
||||
// --- Recommended ---
|
||||
duration: mediaDuration ? moment.duration(mediaDuration * 1000).toISOString() : undefined,
|
||||
duration: claim.duration ? moment.duration(claim.duration * 1000).toISOString() : undefined,
|
||||
contentUrl: generateDirectUrl(claim.name, claim.claim_id),
|
||||
embedUrl: generateEmbedUrl(claim.name, claim.claim_id),
|
||||
};
|
||||
@@ -268,20 +242,24 @@ function buildGoogleVideoMetadata(uri, claim) {
|
||||
);
|
||||
}
|
||||
|
||||
async function resolveClaimOrRedirect(ctx, url, ignoreRedirect = false) {
|
||||
let claim;
|
||||
try {
|
||||
const response = await Lbry.resolve({ urls: [url] });
|
||||
if (response && response[url] && !response[url].error) {
|
||||
claim = response && response[url];
|
||||
const isRepost = claim.reposted_claim && claim.reposted_claim.name && claim.reposted_claim.claim_id;
|
||||
if (isRepost && !ignoreRedirect) {
|
||||
ctx.redirect(`/${claim.reposted_claim.name}:${claim.reposted_claim.claim_id}`);
|
||||
return;
|
||||
}
|
||||
async function getClaimFromChainqueryOrRedirect(ctx, url, ignoreRedirect = false) {
|
||||
const { isChannel, streamName, channelName, channelClaimId, streamClaimId } = parseURI(url);
|
||||
const claimName = isChannel ? '@' + channelName : streamName;
|
||||
const claimId = isChannel ? channelClaimId : streamClaimId;
|
||||
|
||||
const rows = await getClaim(claimName, claimId, channelName, channelClaimId);
|
||||
if (rows && rows.length) {
|
||||
const claim = rows[0];
|
||||
|
||||
if (claim.reposted_name && claim.reposted_claim_id && !ignoreRedirect) {
|
||||
ctx.redirect(`/${claim.reposted_name}:${claim.reposted_claim_id}`);
|
||||
return;
|
||||
}
|
||||
} catch {}
|
||||
return claim;
|
||||
|
||||
return claim;
|
||||
}
|
||||
|
||||
return undefined;
|
||||
}
|
||||
|
||||
let html;
|
||||
@@ -300,10 +278,12 @@ async function getHtml(ctx) {
|
||||
const embedPath = `/$/${PAGES.EMBED}/`;
|
||||
|
||||
if (requestPath.includes(invitePath)) {
|
||||
const inviteChannel = requestPath.slice(invitePath.length).replace(/:/g, '#');
|
||||
const inviteChannelUrl = `lbry://${inviteChannel}`;
|
||||
|
||||
try {
|
||||
const inviteChannel = requestPath.slice(invitePath.length);
|
||||
const inviteChannelUrl = normalizeClaimUrl(inviteChannel);
|
||||
const claim = await resolveClaimOrRedirect(ctx, inviteChannelUrl);
|
||||
parseURI(inviteChannelUrl);
|
||||
const claim = await getClaimFromChainqueryOrRedirect(ctx, inviteChannelUrl);
|
||||
const invitePageMetadata = buildClaimOgMetadata(inviteChannelUrl, claim, {
|
||||
title: `Join ${claim.name} on ${SITE_NAME}`,
|
||||
description: `Join ${claim.name} on ${SITE_NAME}, a content wonderland owned by everyone (and no one).`,
|
||||
@@ -322,8 +302,8 @@ async function getHtml(ctx) {
|
||||
}
|
||||
|
||||
if (requestPath.includes(embedPath)) {
|
||||
const claimUri = normalizeClaimUrl(requestPath.replace(embedPath, ''));
|
||||
const claim = await resolveClaimOrRedirect(ctx, claimUri, true);
|
||||
const claimUri = requestPath.replace(embedPath, '').replace(/:/g, '#');
|
||||
const claim = await getClaimFromChainqueryOrRedirect(ctx, claimUri, true);
|
||||
|
||||
if (claim) {
|
||||
const ogMetadata = buildClaimOgMetadata(claimUri, claim);
|
||||
@@ -345,8 +325,8 @@ async function getHtml(ctx) {
|
||||
}
|
||||
|
||||
if (!requestPath.includes('$')) {
|
||||
const claimUri = normalizeClaimUrl(requestPath.slice(1));
|
||||
const claim = await resolveClaimOrRedirect(ctx, claimUri);
|
||||
const claimUri = requestPath.slice(1).replace(/:/g, '#');
|
||||
const claim = await getClaimFromChainqueryOrRedirect(ctx, claimUri);
|
||||
|
||||
if (claim) {
|
||||
const ogMetadata = buildClaimOgMetadata(claimUri, claim);
|
||||
|
||||
+15
-42
@@ -2,7 +2,6 @@ const { generateStreamUrl } = require('../../ui/util/web');
|
||||
const { URL, SITE_NAME, LBRY_WEB_API } = require('../../config.js');
|
||||
const { Lbry } = require('lbry-redux');
|
||||
const Rss = require('rss');
|
||||
const Mime = require('mime-types');
|
||||
|
||||
const SDK_API_PATH = `${LBRY_WEB_API}/api/v1`;
|
||||
const proxyURL = `${SDK_API_PATH}/proxy`;
|
||||
@@ -58,43 +57,21 @@ async function getClaimsFromChannel(claimId, count) {
|
||||
// Helpers
|
||||
// ****************************************************************************
|
||||
|
||||
function encodeWithSpecialCharEncode(string) {
|
||||
// encodeURIComponent doesn't encode `'` and others
|
||||
// which other services may not like
|
||||
return encodeURIComponent(string).replace(/'/g, '%27').replace(/\(/g, '%28').replace(/\)/g, '%29');
|
||||
}
|
||||
|
||||
const generateEnclosureForClaimContent = (claim) => {
|
||||
const value = claim.value;
|
||||
if (!value || !value.stream_type) {
|
||||
return undefined;
|
||||
}
|
||||
const fileExt = value.source && value.source.media_type && '.' + Mime.extension(value.source.media_type);
|
||||
|
||||
switch (value.stream_type) {
|
||||
case 'video':
|
||||
return {
|
||||
url: generateStreamUrl(claim.name, claim.claim_id) + (fileExt || '.mp4'),
|
||||
type: (value.source && value.source.media_type) || 'video/mp4',
|
||||
size: (value.source && value.source.size) || 0, // Per spec, 0 is a valid fallback.
|
||||
};
|
||||
|
||||
case 'audio':
|
||||
return {
|
||||
url: generateStreamUrl(claim.name, claim.claim_id) + (fileExt || '.mp3'),
|
||||
type: (value.source && value.source.media_type) || 'audio/mpeg',
|
||||
size: (value.source && value.source.size) || 0, // Per spec, 0 is a valid fallback.
|
||||
};
|
||||
case 'image':
|
||||
return {
|
||||
url: generateStreamUrl(claim.name, claim.claim_id) + (fileExt || '.jpeg'),
|
||||
type: (value.source && value.source.media_type) || 'image/jpeg',
|
||||
size: (value.source && value.source.size) || 0, // Per spec, 0 is a valid fallback.
|
||||
};
|
||||
case 'document':
|
||||
case 'software':
|
||||
return {
|
||||
url: generateStreamUrl(claim.name, claim.claim_id),
|
||||
url:
|
||||
generateStreamUrl(claim.name, claim.claim_id) + (value.source && value.source.media_type.split('/')[0]) || '',
|
||||
type: (value.source && value.source.media_type) || undefined,
|
||||
size: (value.source && value.source.size) || 0, // Per spec, 0 is a valid fallback.
|
||||
};
|
||||
@@ -126,10 +103,11 @@ const isEmailRoughlyValid = (email) => /^\S+@\S+$/.test(email);
|
||||
* @returns any
|
||||
*/
|
||||
const generateItunesOwnerElement = (claim) => {
|
||||
let name = '---';
|
||||
let email = 'no-reply@odysee.com';
|
||||
let name = claim && (claim.value && claim.value.title ? claim.value.title : claim.name);
|
||||
|
||||
if (claim && claim.value) {
|
||||
name = claim.name;
|
||||
if (isEmailRoughlyValid(claim.value.email)) {
|
||||
email = claim.value.email;
|
||||
}
|
||||
@@ -141,7 +119,7 @@ const generateItunesOwnerElement = (claim) => {
|
||||
};
|
||||
|
||||
const generateItunesExplicitElement = (claim) => {
|
||||
const tags = (claim && claim.value && claim.value.tags) || [];
|
||||
const tags = (claim && claim.value && claim.tags) || [];
|
||||
return { 'itunes:explicit': tags.includes('mature') ? 'yes' : 'no' };
|
||||
};
|
||||
|
||||
@@ -168,16 +146,15 @@ const getItunesCategory = (claim) => {
|
||||
'TV & Film',
|
||||
];
|
||||
|
||||
const tags = (claim && claim.value && claim.value.tags) || [];
|
||||
|
||||
for (let i = 0; i < itunesCategories.length; ++i) {
|
||||
const itunesCategory = itunesCategories[i];
|
||||
if (tags.includes(itunesCategory.toLowerCase())) {
|
||||
const tags = (claim && claim.value && claim.tags) || [];
|
||||
for (let i = 0; i < tags.length; ++i) {
|
||||
const tag = tags[i];
|
||||
if (itunesCategories.includes(tag)) {
|
||||
// "Note: Although you can specify more than one category and subcategory
|
||||
// in your RSS feed, Apple Podcasts only recognizes the first category and
|
||||
// subcategory."
|
||||
// --> The only parse the first found tag.
|
||||
return itunesCategory.replace('&', '&');
|
||||
return tag.replace('&', '&');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -221,9 +198,8 @@ const getFormattedDescription = (claim) => {
|
||||
|
||||
function generateFeed(feedLink, channelClaim, claimsInChannel) {
|
||||
// --- Channel ---
|
||||
let channelTitle = (channelClaim.value && channelClaim.value.title) || channelClaim.name;
|
||||
const feed = new Rss({
|
||||
title: channelTitle + ' on ' + SITE_NAME,
|
||||
title: ((channelClaim.value && channelClaim.value.title) || channelClaim.name) + ' on ' + SITE_NAME,
|
||||
description: getFormattedDescription(channelClaim),
|
||||
feed_url: feedLink,
|
||||
site_url: URL,
|
||||
@@ -231,7 +207,7 @@ function generateFeed(feedLink, channelClaim, claimsInChannel) {
|
||||
language: getLanguageValue(channelClaim),
|
||||
custom_namespaces: { itunes: 'http://www.itunes.com/dtds/podcast-1.0.dtd' },
|
||||
custom_elements: [
|
||||
{ 'itunes:author': channelTitle },
|
||||
{ 'itunes:author': channelClaim.name },
|
||||
{
|
||||
'itunes:category': [
|
||||
{
|
||||
@@ -256,20 +232,17 @@ function generateFeed(feedLink, channelClaim, claimsInChannel) {
|
||||
: '';
|
||||
const description = thumbnailHtml + getFormattedDescription(c);
|
||||
|
||||
const url = `${URL}/${encodeWithSpecialCharEncode(c.name)}:${c.claim_id}`;
|
||||
const date = c.release_time ? c.release_time * 1000 : c.meta && c.meta.creation_timestamp * 1000;
|
||||
|
||||
feed.item({
|
||||
title: title,
|
||||
description: description,
|
||||
url: url,
|
||||
url: `${URL}/${c.name}:${c.claim_id}`,
|
||||
guid: undefined, // defaults to 'url'
|
||||
author: undefined, // defaults feed author property
|
||||
date: new Date(date),
|
||||
date: new Date(c.meta ? c.meta.creation_timestamp * 1000 : null),
|
||||
enclosure: generateEnclosureForClaimContent(c),
|
||||
custom_elements: [
|
||||
{ 'itunes:title': title },
|
||||
{ 'itunes:author': channelTitle },
|
||||
{ 'itunes:author': channelClaim.name },
|
||||
generateItunesImageElement(c),
|
||||
generateItunesDurationElement(c),
|
||||
generateItunesExplicitElement(c),
|
||||
|
||||
@@ -10129,9 +10129,9 @@ lazy-val@^1.0.4:
|
||||
yargs "^13.2.2"
|
||||
zstd-codec "^0.1.1"
|
||||
|
||||
lbry-redux@lbryio/lbry-redux#e4d0662100a5f4b28bb1bf3cbc1e51b2eebab5b6:
|
||||
lbry-redux@lbryio/lbry-redux#7cc9923ed9ff1940b508842af6be44c8da906a60:
|
||||
version "0.0.1"
|
||||
resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/e4d0662100a5f4b28bb1bf3cbc1e51b2eebab5b6"
|
||||
resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/7cc9923ed9ff1940b508842af6be44c8da906a60"
|
||||
dependencies:
|
||||
proxy-polyfill "0.1.6"
|
||||
reselect "^3.0.0"
|
||||
|
||||
Reference in new issue
Block a user