fixed .autoplay
This commit is contained in:
parent
9eab7d949f
commit
fad0b908c8
@ -268,7 +268,7 @@ namespace NadekoBot.Services.Music
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
_log.Info("Loading related song");
|
_log.Info("Loading related song");
|
||||||
await _musicService.TryQueueRelatedSongAsync(data.Song.Query, OutputTextChannel, VoiceChannel);
|
await _musicService.TryQueueRelatedSongAsync(data.Song, OutputTextChannel, VoiceChannel);
|
||||||
Queue.Next();
|
Queue.Next();
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
|
@ -182,9 +182,9 @@ namespace NadekoBot.Services.Music
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task TryQueueRelatedSongAsync(string query, ITextChannel txtCh, IVoiceChannel vch)
|
public async Task TryQueueRelatedSongAsync(SongInfo song, ITextChannel txtCh, IVoiceChannel vch)
|
||||||
{
|
{
|
||||||
var related = (await _google.GetRelatedVideosAsync(query, 4)).ToArray();
|
var related = (await _google.GetRelatedVideosAsync(song.VideoId, 4)).ToArray();
|
||||||
if (!related.Any())
|
if (!related.Any())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user