Spotify support added

This commit is contained in:
killer069
2021-09-05 18:50:57 +05:30
parent 2a84dceda6
commit 4179557fde
14 changed files with 609 additions and 203 deletions

View File

@@ -1 +1,22 @@
export { playlist_info, video_basic_info, video_info, search, stream, stream_from_info, validate, validate_playlist } from "./YouTube";
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
}
}