Use resolve for OG metadata #6787

Merged
btzr-io merged 7 commits from fix-og-meta into master 2021-08-07 13:53:49 +02:00
btzr-io commented 2021-08-05 07:42:44 +02:00 (Migrated from github.com)

PR Checklist

Please check all that apply to this PR using "x":

  • I have checked that this PR is not a duplicate of an existing PR (open, closed or merged)
  • I added a line describing my change to CHANGELOG.md
  • I have checked that this PR does not introduce a breaking change
  • This PR introduces breaking changes and I have provided a detailed explanation below

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting)
  • Refactoring (no functional changes)
  • Documentation changes
  • Other - Please describe:

Fixes

Closes #6780
Closes #6464
Closes #6812

## PR Checklist <!-- For the checkbox formatting to work properly, make sure there are no spaces on either side of the "x" --> Please check all that apply to this PR using "x": - [x] I have checked that this PR is not a duplicate of an existing PR (open, closed or merged) - [x] I added a line describing my change to CHANGELOG.md - [ ] I have checked that this PR does not introduce a breaking change - [ ] This PR introduces breaking changes and I have provided a detailed explanation below ## PR Type What kind of change does this PR introduce? - [x] Bugfix - [ ] Feature - [ ] Code style update (formatting) - [x] Refactoring (no functional changes) - [ ] Documentation changes - [ ] Other - Please describe: ## Fixes Closes #6780 Closes #6464 Closes #6812
jessopb (Migrated from github.com) reviewed 2021-08-05 07:42:44 +02:00
btzr-io commented 2021-08-05 07:51:01 +02:00 (Migrated from github.com)

I'm still not sure how to test this...

I'm still not sure how to test this...
infinite-persistence commented 2021-08-05 08:08:14 +02:00 (Migrated from github.com)
  • yarn && yarn dev:web-server
  • localhost:1337 in the browser after build is done.
  • Open a content page, then F5 to reload (or enter URL directly). The OG is not populated on link navigation.
  • Verify the <head> for the OG and GoogleVideo info
- `yarn && yarn dev:web-server` - `localhost:1337` in the browser after build is done. - Open a content page, then F5 to reload (or enter URL directly). The OG is not populated on link navigation. - Verify the `<head>` for the OG and GoogleVideo info - <img src="https://user-images.githubusercontent.com/64950861/128299681-e2f50acd-2d37-483f-8ca1-979feb89f810.png" width="400">
btzr-io commented 2021-08-05 08:30:43 +02:00 (Migrated from github.com)
* `yarn && yarn dev:web-server`

* `localhost:1337` in the browser after build is done.

* Open a content page, then F5 to reload (or enter URL directly).  The OG is not populated on link navigation.

* Verify the `<head>` for the OG and GoogleVideo info
  
  * <img alt="" width="400" src="https://user-images.githubusercontent.com/64950861/128299681-e2f50acd-2d37-483f-8ca1-979feb89f810.png">

Nice thanks ✌️

> > > * `yarn && yarn dev:web-server` > > * `localhost:1337` in the browser after build is done. > > * Open a content page, then F5 to reload (or enter URL directly). The OG is not populated on link navigation. > > * Verify the `<head>` for the OG and GoogleVideo info > > * <img alt="" width="400" src="https://user-images.githubusercontent.com/64950861/128299681-e2f50acd-2d37-483f-8ca1-979feb89f810.png"> Nice thanks ✌️
btzr-io (Migrated from github.com) reviewed 2021-08-05 08:36:49 +02:00
btzr-io (Migrated from github.com) commented 2021-08-05 08:36:49 +02:00

: or # ?

`:` or `#` ?
btzr-io (Migrated from github.com) reviewed 2021-08-05 08:40:05 +02:00
btzr-io (Migrated from github.com) commented 2021-08-05 08:40:04 +02:00

Looks like ":" also works now.

Looks like ":" also works now.
infinite-persistence (Migrated from github.com) reviewed 2021-08-06 02:31:51 +02:00
infinite-persistence (Migrated from github.com) commented 2021-08-06 02:31:51 +02:00

Should do value.release_time --> creation time --> 0. We've been using release time, which works for newer claims.

Should do `value.release_time --> creation time --> 0`. We've been using release time, which works for newer claims.
infinite-persistence commented 2021-08-06 03:14:02 +02:00 (Migrated from github.com)
  • Nice, seems like "keyword"/tags now work too. I'm guessing CQ wasn't returning tags all this while.
    • image
  • Channel Page info is better now too. Previously, the link is totally wrong.
    • -->
- Nice, seems like "keyword"/tags now work too. I'm guessing CQ wasn't returning tags all this while. - ![image](https://user-images.githubusercontent.com/64950861/128441080-dedb7e9f-c217-4852-8d76-774cfc424ebe.png) - Channel Page info is better now too. Previously, the link is totally wrong. - <img src="https://user-images.githubusercontent.com/64950861/128441702-4a574f33-18b7-487f-a8e4-e0479a513058.png" width="300"> --> <img src="https://user-images.githubusercontent.com/64950861/128441767-e6b59234-111d-4fe4-82e2-8b116c5b3720.png" width="300">
infinite-persistence (Migrated from github.com) reviewed 2021-08-06 03:33:35 +02:00
@ -18,6 +18,7 @@ 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))
infinite-persistence (Migrated from github.com) commented 2021-08-06 03:33:35 +02:00

Not sure where the error is, but Embed OG's aren't showing up (it's showing the fallback).
Example embed: 1fe325659b

Not sure where the error is, but Embed OG's aren't showing up (it's showing the fallback). Example embed: https://odysee.com/$/embed/eevblog-1412-argon-ion-laser-teardown!/1fe325659bf8d791f72e02bb614a942fa4b571bf?r=5yqd2A3cQ59DhkNRYTJq3BApzdcr7KSn
btzr-io (Migrated from github.com) reviewed 2021-08-06 04:15:52 +02:00
@ -18,6 +18,7 @@ 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))
btzr-io (Migrated from github.com) commented 2021-08-06 04:15:52 +02:00

The embed url doesn't use : or # to separate the id.

The embed url doesn't use `:` or `#` to separate the id.
btzr-io (Migrated from github.com) reviewed 2021-08-06 04:17:24 +02:00
@ -18,6 +18,7 @@ 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))
btzr-io (Migrated from github.com) commented 2021-08-06 04:17:24 +02:00

Adding this .replace('\/', '#'); fixes the issue. Not sure if this will work on all cases.

Adding this `.replace('\/', '#');` fixes the issue. Not sure if this will work on all cases.
btzr-io (Migrated from github.com) reviewed 2021-08-06 04:18:18 +02:00
@ -18,6 +18,7 @@ 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))
btzr-io (Migrated from github.com) commented 2021-08-06 04:18:18 +02:00

As long as embed url is always $/embed/name/id ^^

As long as embed url is always `$/embed/name/id` ^^
btzr-io commented 2021-08-06 08:29:50 +02:00 (Migrated from github.com)

Is there any other urls that uses / instead of : or # before the claim id ?

Is there any other urls that uses `/` instead of `:` or `#` before the claim id ?
infinite-persistence commented 2021-08-07 05:24:18 +02:00 (Migrated from github.com)

Is there any other urls that uses / instead of : or # before the claim id ?

Tom mentioned that anywhere we use generateStreamURL, generateDownloadUrl and generateDirectUrl. But those doesn't impact the header, I think.

However, I noticed that http://odysee.com/eevblog-1412-argon-ion-laser-teardown!/1fe325659bf8d791f72e02bb614a942fa4b571bf redirects and shows the right header, but the PR version does not.

> _Is there any other urls that uses / instead of : or # before the claim id ?_ Tom mentioned that anywhere we use `generateStreamURL`, `generateDownloadUrl` and `generateDirectUrl`. But those doesn't impact the header, I think. However, I noticed that `http://odysee.com/eevblog-1412-argon-ion-laser-teardown!/1fe325659bf8d791f72e02bb614a942fa4b571bf` redirects and shows the right header, but the PR version does not.
btzr-io commented 2021-08-07 05:43:09 +02:00 (Migrated from github.com)

However, I noticed that http://odysee.com/eevblog-1412-argon-ion-laser-teardown!/1fe325659bf8d791f72e02bb614a942fa4b571bf redirects and shows the right header, but the PR version does not.

Same issue with embed urls. parseURI fails to detect the claim id, because there is no '#'

be4c75c047/web/src/html.js (L246)

> However, I noticed that `http://odysee.com/eevblog-1412-argon-ion-laser-teardown!/1fe325659bf8d791f72e02bb614a942fa4b571bf` redirects and shows the right header, but the PR version does not. Same issue with embed urls. parseURI fails to detect the claim id, because there is no '#' https://github.com/lbryio/lbry-desktop/blob/be4c75c047ac05df7efc790f5edbf96f9e3d369d/web/src/html.js#L246
btzr-io commented 2021-08-07 06:16:30 +02:00 (Migrated from github.com)

http://odysee.com/eevblog-1412-argon-ion-laser-teardown!/1fe325659bf8d791f72e02bb614a942fa4b571bf

This is actually the equivalent of:

lbry://eevblog-1412-argon-ion-laser-teardown!

Instead of:

lbry://eevblog-1412-argon-ion-laser-teardown!#1fe325659bf8d791f72e02bb614a942fa4b571bf

See: https://github.com/lbryio/lbry-desktop/issues/6812

> http://odysee.com/eevblog-1412-argon-ion-laser-teardown!/1fe325659bf8d791f72e02bb614a942fa4b571bf This is actually the equivalent of: > lbry://eevblog-1412-argon-ion-laser-teardown! Instead of: > lbry://eevblog-1412-argon-ion-laser-teardown!#1fe325659bf8d791f72e02bb614a942fa4b571bf See: https://github.com/lbryio/lbry-desktop/issues/6812
btzr-io commented 2021-08-07 09:17:10 +02:00 (Migrated from github.com)

However, I noticed that http://odysee.com/eevblog-1412-argon-ion-laser-teardown!/1fe325659bf8d791f72e02bb614a942fa4b571bf redirects and shows the right header, but the PR version does not.

I don't think the redirection issue has nothing todo with the changes on this pull request.

> However, I noticed that http://odysee.com/eevblog-1412-argon-ion-laser-teardown!/1fe325659bf8d791f72e02bb614a942fa4b571bf redirects and shows the right header, but the PR version does not. I don't think the redirection issue has nothing todo with the changes on this pull request.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry-desktop#6787
No description provided.