FreeTube icon indicating copy to clipboard operation
FreeTube copied to clipboard

Add local api support for viewing individual community posts + comments

Open ChunkyProgrammer opened this issue 11 months ago • 29 comments

Add local api support for viewing community posts

Pull Request Type

  • [x] Feature Implementation

Related issue

closes #3253

Description

This PR also adds support for viewing community posts + comments to the local API

Testing

  • set local api as primary api
  • disable invidious
  • go to mr beast channel
  • go to community tab
  • click on the link to view one of the posts
  • load comments
  • load comment replies
  • load more comments

See tests here: https://github.com/FreeTubeApp/FreeTube/pull/5589

Desktop

  • OS: Fedora Linux
  • OS Version: 41
  • FreeTube version: latest nightly

ChunkyProgrammer avatar Dec 31 '24 20:12 ChunkyProgrammer

Upstream just merged🎉

Error:

https://github.com/user-attachments/assets/e41deb9d-eae9-48e1-aa58-b990664dcdb5

Error: VirtualBoxVM_2gUbmdP7GZ.mp4

Hmm, weirdly I'm only getting that error on that specific post

ChunkyProgrammer avatar Jan 22 '25 13:01 ChunkyProgrammer

This pull request has conflicts, please resolve those before we can evaluate the pull request.

github-actions[bot] avatar Jan 27 '25 02:01 github-actions[bot]

Conflicts have been resolved. A maintainer will review the pull request shortly.

github-actions[bot] avatar Jan 27 '25 03:01 github-actions[bot]

This pull request has conflicts, please resolve those before we can evaluate the pull request.

github-actions[bot] avatar Feb 01 '25 02:02 github-actions[bot]

Conflicts have been resolved. A maintainer will review the pull request shortly.

github-actions[bot] avatar Feb 02 '25 03:02 github-actions[bot]

This pull request has conflicts, please resolve those before we can evaluate the pull request.

github-actions[bot] avatar Feb 02 '25 10:02 github-actions[bot]

Conflicts have been resolved. A maintainer will review the pull request shortly.

github-actions[bot] avatar Feb 10 '25 18:02 github-actions[bot]

Opening a post link without a channel ID fails, this isn't caused by this PR as it is broken on both backends and the resolve URL response for post URLs seems to have changed on YouTube's end e.g. https://www.youtube.com/post/UgkxtZU_keFi3mw46hCUe9YfhfBHoeR8YCoM

Here is the Innertube /navigation/resolve_url response for that URL, params is a weird protobuf that has two field with the channel ID and one field with the post ID.

{
    "responseContext": {},
    "endpoint": {
        "clickTrackingParams": "",
        "commandMetadata": {
            "webCommandMetadata": {
                "url": "/channel/UCBR8-60-B28hp2BmDPdntcQ/community?lb=UgkxtZU_keFi3mw46hCUe9YfhfBHoeR8YCoM",
                "webPageType": "WEB_PAGE_TYPE_BROWSE",
                "rootVe": 247244,
                "apiUrl": "/youtubei/v1/browse"
            }
        },
        "browseEndpoint": {
            "browseId": "FEpost_detail",
            "params": "wgNaEhhVQ0JSOC02MC1CMjhocDJCbURQZG50Y1EaJFVna3h0WlVfa2VGaTNtdzQ2aENVZTlZZmhmQkhvZVI4WUNvTVoYVUNCUjgtNjAtQjI4aHAyQm1EUGRudGNR"
        }
    }
}

protobuf-fields

absidue avatar Feb 26 '25 23:02 absidue

This pull request has conflicts, please resolve those before we can evaluate the pull request.

github-actions[bot] avatar Feb 27 '25 01:02 github-actions[bot]

Conflicts have been resolved. A maintainer will review the pull request shortly.

github-actions[bot] avatar Mar 02 '25 20:03 github-actions[bot]

This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days.

github-actions[bot] avatar Mar 17 '25 02:03 github-actions[bot]

Only thing that is left to be done is a rebase into dev branch to test out if the errors are really gone right?

Pretty sure nothing was done to address this comment yet: https://github.com/FreeTubeApp/FreeTube/pull/6491#issuecomment-2686444748

So rebasing would only get rid of the code conflicts but not resolve that comment.

absidue avatar Mar 17 '25 11:03 absidue

Images look strange but might not be related to PR

Comments can't be loaded image

PikachuEXE avatar Mar 19 '25 00:03 PikachuEXE

Images look strange but might not be related to PR

@PikachuEXE see #4852

Can confirm that the post link issue is fixed. As was already mentioned by pika, on some posts the comments don't load at all and for others they fail when sorting. For the sorting issue taking the same approach that we do for sorting the video comments should work (using the sort payloads provided by YouTube instead of making YouTube.js generate it).

absidue avatar Mar 30 '25 11:03 absidue

This pull request has conflicts, please resolve those before we can evaluate the pull request.

github-actions[bot] avatar Apr 13 '25 04:04 github-actions[bot]

Conflicts have been resolved. A maintainer will review the pull request shortly.

github-actions[bot] avatar Apr 24 '25 02:04 github-actions[bot]

PR opened on YouTube.js: https://github.com/LuanRT/YouTube.js/pull/955

ChunkyProgrammer avatar Apr 24 '25 03:04 ChunkyProgrammer

This pull request has conflicts, please resolve those before we can evaluate the pull request.

github-actions[bot] avatar May 04 '25 12:05 github-actions[bot]

This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days.

github-actions[bot] avatar May 19 '25 02:05 github-actions[bot]

Conflicts have been resolved. A maintainer will review the pull request shortly.

github-actions[bot] avatar Jun 03 '25 12:06 github-actions[bot]

Waiting for https://github.com/LuanRT/YouTube.js/pull/956 to be release

https://github.com/FreeTubeApp/FreeTube/pull/7542

This pull request has conflicts, please resolve those before we can evaluate the pull request.

github-actions[bot] avatar Jun 12 '25 16:06 github-actions[bot]

Conflicts have been resolved. A maintainer will review the pull request shortly.

github-actions[bot] avatar Jun 17 '25 11:06 github-actions[bot]

This pull request has conflicts, please resolve those before we can evaluate the pull request.

github-actions[bot] avatar Jun 18 '25 00:06 github-actions[bot]

Relies on: https://github.com/LuanRT/YouTube.js/pull/987 and https://github.com/LuanRT/YouTube.js/pull/986

ChunkyProgrammer avatar Jun 26 '25 04:06 ChunkyProgrammer