Files
play-dl-test/play-dl/index.ts

22 lines
640 B
TypeScript
Raw Normal View History

2021-09-06 10:33:37 +05:30
export { playlist_info, video_basic_info, video_info, search, stream, stream_from_info, yt_validate, extractID } from "./YouTube";
2021-09-05 18:50:57 +05:30
2021-09-09 09:25:21 +05:30
export { spotify, sp_validate, Authorization, RefreshToken, is_expired } from './Spotify'
2021-09-05 18:50:57 +05:30
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
}
}