!m pl increased to 50 songs

This commit is contained in:
Master Kwoth 2016-04-24 13:45:54 +02:00
parent 9e79f6822f
commit 9d10d78727
2 changed files with 3 additions and 3 deletions

View File

@ -179,7 +179,7 @@ namespace NadekoBot.Classes
return obj.items[0].id.playlistId.ToString(); return obj.items[0].id.playlistId.ToString();
} }
public static async Task<IEnumerable<string>> GetVideoIDs(string playlist, int number = 30) public static async Task<IEnumerable<string>> GetVideoIDs(string playlist, int number = 50)
{ {
if (string.IsNullOrWhiteSpace(NadekoBot.Creds.GoogleAPIKey)) if (string.IsNullOrWhiteSpace(NadekoBot.Creds.GoogleAPIKey))
{ {
@ -189,7 +189,7 @@ namespace NadekoBot.Classes
throw new ArgumentOutOfRangeException(); throw new ArgumentOutOfRangeException();
var link = var link =
$"https://www.googleapis.com/youtube/v3/playlistItems?part=contentDetails" + $"https://www.googleapis.com/youtube/v3/playlistItems?part=contentDetails" +
$"&maxResults={30}" + $"&maxResults={number}" +
$"&playlistId={playlist}" + $"&playlistId={playlist}" +
$"&key={NadekoBot.Creds.GoogleAPIKey}"; $"&key={NadekoBot.Creds.GoogleAPIKey}";

View File

@ -261,7 +261,7 @@ namespace NadekoBot.Modules.Music
await e.Channel.SendMessage("💢 You need to be in a voice channel on this server.\n If you are already in a voice channel, try rejoining it.").ConfigureAwait(false); await e.Channel.SendMessage("💢 You need to be in a voice channel on this server.\n If you are already in a voice channel, try rejoining it.").ConfigureAwait(false);
return; return;
} }
var ids = await SearchHelper.GetVideoIDs(await SearchHelper.GetPlaylistIdByKeyword(arg).ConfigureAwait(false)).ConfigureAwait(false); var ids = await SearchHelper.GetVideoIDs(await SearchHelper.GetPlaylistIdByKeyword(arg).ConfigureAwait(false), 50).ConfigureAwait(false);
//todo TEMPORARY SOLUTION, USE RESOLVE QUEUE IN THE FUTURE //todo TEMPORARY SOLUTION, USE RESOLVE QUEUE IN THE FUTURE
var idArray = ids as string[] ?? ids.ToArray(); var idArray = ids as string[] ?? ids.ToArray();
var count = idArray.Count(); var count = idArray.Count();