retrouser955 / discord-player-youtubei

Super charging your bot. dpy is a tiny extractor module to test the validity of youtubei.js in discord-player version 7.
https://discord-player.js.org
Creative Commons Zero v1.0 Universal
25 stars 8 forks source link

Allow other extractors to bridge from this extractor #14

Closed twlite closed 3 months ago

twlite commented 3 months ago

this extractor needs to implement bridge method to accept bridge requests sent by another extractor. This method receives the track object that requires bridging and the extractor that requested the bridge, just as a precaution to limit whom to accept/deny.

Pseudocode:

public async bridge(track, ext) {
    const query = ext?.createBridgeQuery(track) ?? track.title;
    const alt = await this.handle(query)
    return this.stream(alt.tracks[0])
}
retrouser955 commented 3 months ago

Planned for 1.2.x

retrouser955 commented 3 months ago

Closed via this commit