mirror of
https://github.com/YuzuZensai/play-dl-test.git
synced 2026-01-31 14:58:05 +00:00
Spotify support added
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user