FreeTube icon indicating copy to clipboard operation
FreeTube copied to clipboard

Allow using piped api for comments, playlists, search suggestions and trending

Open ChunkyProgrammer opened this issue 2 years ago • 76 comments

Allow using piped api for comments, playlists and trending

NOTE: THIS PR SHOULD BE MERGED AFTER THE V0.21 RELEASE.

Pull Request Type

  • [x] Feature Implementation

Related issue

#1527 The commits for #3488 seems to have messed up on github's side (This PR was created with the same branch but has 20 less commits?)

Description

This PR will add support for using the piped api for comments, playlists and trending

Testing

Comments

  • set preferred api backend to piped
  • go to a video
  • load comments
  • load replies
  • load more comments

Playlists

  • set preferred api backend to piped
  • search a playlist
  • go to the playlist page
  • load more
  • click on a video
  • notice that all playlist videos are shown (unlike Invidious)

Trending

  • go to the trending page

  • it loads

  • click on music tab, trending page uses fallback api

  • make invidious the primary api with piped as fallback

  • set invidious api to an invalid url (ex: meow)

  • go to trending page, click on gaming & get an error (piped doesnt support trending tabs)

Desktop

  • OS: Windows
  • OS Version: 11
  • FreeTube version: 0.18.0

ChunkyProgrammer avatar May 16 '23 04:05 ChunkyProgrammer

Loading more comments throws error

https://github.com/FreeTubeApp/FreeTube/assets/73130443/90d3ca2a-9d57-4a28-9a1d-280471d8d98f

It says Piped instead of Invidious

https://github.com/FreeTubeApp/FreeTube/assets/73130443/26a5f2ac-e4b9-4a36-86bd-50bd26ea6eba

Skip to 32 sec and see error when trying to fetch replies

https://github.com/FreeTubeApp/FreeTube/assets/73130443/da7ca6fd-f832-4623-a08b-725636eb8836

Trying to load this playlist throws an error

https://github.com/FreeTubeApp/FreeTube/assets/73130443/8f5e019c-a404-4eab-bcad-e31631604fb9

Throws the same error when clicking on a video

https://github.com/FreeTubeApp/FreeTube/assets/73130443/d4a417df-1774-413d-acb4-b4bca2d5d8ca

This is just an observation and i think its not a bug but it shows u 101 videos when u load a playlist.

https://github.com/FreeTubeApp/FreeTube/assets/73130443/9948715b-019b-406a-bb86-ae631196813e

Oh btw is fetching comments only for videos or also for live and shorts?

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

github-actions[bot] avatar May 20 '23 13:05 github-actions[bot]

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

github-actions[bot] avatar May 20 '23 14:05 github-actions[bot]

Oh btw is fetching comments only for videos or also for live and shorts?

@efb4f5ff-1298-471a-8973-3d47447115dc

Comments should be available on lives and shorts (livechat is not available)

I'm also having trouble reproducing the errors you had. I think it may have been a temporary issue with the instance

Also, no longer setting it as a draft as it is technically waiting for review but we're holding back on merging until the next release

ChunkyProgrammer avatar May 22 '23 22:05 ChunkyProgrammer

All errors previously reported are gone but i got one when i was trying to view a video from a playlist

https://github.com/FreeTubeApp/FreeTube/assets/73130443/f3be60d1-28f1-42e2-a945-16646944e1e2

Also do we need to do something about this or not

This is just an observation and i think its not a bug but it shows u 101 videos when u load a playlist.

https://github.com/FreeTubeApp/FreeTube/assets/73130443/9948715b-019b-406a-bb86-ae631196813e

All errors previously reported are gone but i got one when i was trying to view a video from a playlist

Fixed

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

github-actions[bot] avatar Jun 26 '23 18:06 github-actions[bot]

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

github-actions[bot] avatar Jun 26 '23 18:06 github-actions[bot]

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

github-actions[bot] avatar Jun 30 '23 16:06 github-actions[bot]

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

github-actions[bot] avatar Jul 02 '23 14:07 github-actions[bot]

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

github-actions[bot] avatar Jul 03 '23 16:07 github-actions[bot]

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

github-actions[bot] avatar Jul 04 '23 18:07 github-actions[bot]

Check for previously approved ._.

PikachuEXE avatar Jul 04 '23 23:07 PikachuEXE

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

github-actions[bot] avatar Jul 21 '23 11:07 github-actions[bot]

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

github-actions[bot] avatar Jul 26 '23 19:07 github-actions[bot]

Looks like fallback logic for broken instances needs to be tweaked a bit so i'll take a look at that. Working instances can be found here: https://piped-instances.kavin.rocks

ChunkyProgrammer avatar Aug 21 '23 15:08 ChunkyProgrammer

Used a few instances but i still get this doctype error

https://github.com/FreeTubeApp/FreeTube/assets/73130443/186c2b93-8f11-4ddd-be12-2af274425b3e

Also why is this list so short?

Capture

Used a few instances but i still get this doctype error

I thought I fixed that issue, do you have the latest code? I'll look at it again in a few hours

Also why is this list so short?

Piped excludes instances that are rate limited/can't play videos at the moment (which seems to be most of them)

ChunkyProgrammer avatar Aug 21 '23 18:08 ChunkyProgrammer

Used a few instances but i still get this doctype error

I thought I fixed that issue, do you have the latest code? I'll look at it again in a few hours

Yup i pulled the latest changes

Also why is this list so short?

Piped excludes instances that are rate limited/can't play videos at the moment (which seems to be most of them)

Ah ok that makes sense, thanks for explaining :)

Seems fine for simple testing Let's see if I can merge it with my playlist branch... (if not will have to wait for playlist to be merged first)

PikachuEXE avatar Aug 22 '23 00:08 PikachuEXE

Note to self: on hold because of playlists

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

github-actions[bot] avatar Aug 31 '23 15:08 github-actions[bot]

Will rebase once local playlists is merged

ChunkyProgrammer avatar Sep 01 '23 13:09 ChunkyProgrammer

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

github-actions[bot] avatar Oct 24 '23 21:10 github-actions[bot]

Added support for using PipedApi for trending page

ChunkyProgrammer avatar Oct 24 '23 22:10 ChunkyProgrammer

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

github-actions[bot] avatar Oct 31 '23 02:10 github-actions[bot]

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

github-actions[bot] avatar Oct 31 '23 02:10 github-actions[bot]

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

github-actions[bot] avatar Nov 17 '23 02:11 github-actions[bot]

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

github-actions[bot] avatar Nov 26 '23 18:11 github-actions[bot]