mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Fixed issue with channels having spaces
This commit is contained in:
@@ -9,6 +9,7 @@ try {
|
||||
}
|
||||
|
||||
function get_correct_info(song_generated, channel, broadcast, callback) {
|
||||
channel = channel.replace(/ /g,'');
|
||||
request({
|
||||
type: "GET",
|
||||
url: "https://www.googleapis.com/youtube/v3/videos?part=contentDetails,snippet,id&key="+key+"&id=" + song_generated.id,
|
||||
@@ -84,7 +85,7 @@ function check_error_video(msg, channel) {
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
channel = channel.replace(/ /g,'');
|
||||
request({
|
||||
type: "GET",
|
||||
url: "https://www.googleapis.com/youtube/v3/videos?part=id&key="+key+"&id=" + msg.id,
|
||||
@@ -102,6 +103,7 @@ function check_error_video(msg, channel) {
|
||||
}
|
||||
|
||||
function findSimilar(msg, channel, broadcast, callback) {
|
||||
channel = channel.replace(/ /g,'');
|
||||
var yt_url = "https://www.googleapis.com/youtube/v3/search?key="+key+"&videoEmbeddable=true&part=id&type=video&order=viewCount&safeSearch=none&maxResults=5&q=" + encodeURIComponent(msg.title);
|
||||
request({
|
||||
method: "GET",
|
||||
|
||||
Reference in New Issue
Block a user