Skip to content

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

@mblomdahl

Description

@mblomdahl

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    boostBoosting Lizo'nikah

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions