Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update PeerTube API for video-channels to include/exclude local Channels #11

Open
mblomdahl opened this issue Aug 29, 2024 · 0 comments
Labels
boost Boosting Lizo'nikah

Comments

@mblomdahl
Copy link

When listing videos, we can pass the query param ?isLocal=true to filter out federated videos. See API docs here: https://docs.joinpeertube.org/api-rest-reference.html#tag/Video/operation/getVideos

For implementing OwnTube-tv/web-client#131 & OwnTube-tv/web-client#137, it would be beneficial include only local video Channels on the PeerTube server-side, instead of filtering client-side. Can we please update the root-level GET /api/v1/video-channels API endpoint to support passing the same isLocal filter as for videos?


As a concrete example of the problem it causes, let's query PeerTube Nightly for channels:

# Local channels found within the first 100:
curl -s 'https://peertube2.cpy.re/api/v1/video-channels?count=100&start=0' | jq '.data.[] | select(.isLocal) | .name'  
"wicklow2"
"ngi_test"
"ngi_channel"
"ngi_accessibility_channel"

# Non-local channels found within the first 100:
curl -s 'https://peertube2.cpy.re/api/v1/video-channels?count=100&start=0' | jq '.data.[] | select(.isLocal == false) | .name' | wc -l
      96
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
boost Boosting Lizo'nikah
Projects
Development

No branches or pull requests

1 participant