play-dl-fix/play-dl/index.ts
2021-09-05 18:50:57 +05:30

22 lines
588 B
TypeScript

export { playlist_info, video_basic_info, video_info, search, stream, stream_from_info, yt_validate } from "./YouTube";
export { spotify, sp_validate } from './Spotify'
import { sp_validate, yt_validate } from ".";
export function validate(url : string): string | boolean{
if(url.indexOf('spotify') !== -1){
let check = sp_validate(url)
if(check){
return "sp_" + check
}
else return check
}
else{
let check = yt_validate(url)
if(check){
return "yt_" + check
}
else return check
}
}