Closed jameslinimk closed 3 years ago
LOL I think it's good. But it's gonna be hard.
https://www.npmjs.com/package/get-xvideos
We've fixed a lot of errors and changed the module to the latest one. This is gonna be a lot easier, right?
There was one previously added in dev version: https://npmjs.com/package/xvdl
but we decided to remove xvideos
support from this lib. Maybe in the future.
for ref, you can see #286 and 36fa63f
Sorry this won't be added. But we could add a way to support "plugins", a simple file that you can require with discord-player
const { registerExtractorPlugin } = require('discord-player');
const extractorPlugin = class Plugin {
static getData (url) {
// do something and returns an object
}
static validateURL (url) {
// returns a boolean
}
static getStream () {
}
}
registerExtractorPlugin(extractorPlugin);
something like that could be interesting
its... Concerning... that you would want to add xvideos to a Discord music module...
This feature is done
in rewrite
player.use("extractorName", {
validate: (query) => someBooleanValue,
getInfo: (query) => {
// you don't need to validate query here, discord-player handles it for you :)
// you can return null if you dont have data
return {
engine: yourStream,
// other metadata
};
}
});
You can use player.unuse("extractorName")
to remove extractor.
Attachment
, Facebook
, Reverbnation
, Vimeo
after that it should automatically use your extractor when it validates the query passed to player.play
. Anything not valid here
is treated as youtube search query
This feature is done in rewrite
did you actually add xvideos support..
@Dragonizedpizza no :) but you can add it yourself easily with Discord Player's Extractor API
I don't want to I am happy that you didn't add it
https://www.npmjs.com/package/xvideos ( ͡° ͜ʖ ͡°)( ͡° ͜ʖ ͡°)( ͡° ͜ʖ ͡°)( ͡° ͜ʖ ͡°)( ͡° ͜ʖ ͡°)( ͡° ͜ʖ ͡°)( ͡° ͜ʖ ͡°)( ͡° ͜ʖ ͡°)( ͡° ͜ʖ ͡°)( ͡° ͜ʖ ͡°)( ͡° ͜ʖ ͡°)( ͡° ͜ʖ ͡°)( ͡° ͜ʖ ͡°)( ͡° ͜ʖ ͡°)( ͡° ͜ʖ ͡°)