From 9d10d78727f8f66cf3c461f58498d9ebdee958b4 Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Sun, 24 Apr 2016 13:45:54 +0200 Subject: [PATCH] !m pl increased to 50 songs --- NadekoBot/Classes/SearchHelper.cs | 4 ++-- NadekoBot/Modules/Music/MusicModule.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/NadekoBot/Classes/SearchHelper.cs b/NadekoBot/Classes/SearchHelper.cs index adf094a1..b8b7a8b5 100644 --- a/NadekoBot/Classes/SearchHelper.cs +++ b/NadekoBot/Classes/SearchHelper.cs @@ -179,7 +179,7 @@ namespace NadekoBot.Classes return obj.items[0].id.playlistId.ToString(); } - public static async Task> GetVideoIDs(string playlist, int number = 30) + public static async Task> GetVideoIDs(string playlist, int number = 50) { if (string.IsNullOrWhiteSpace(NadekoBot.Creds.GoogleAPIKey)) { @@ -189,7 +189,7 @@ namespace NadekoBot.Classes throw new ArgumentOutOfRangeException(); var link = $"https://www.googleapis.com/youtube/v3/playlistItems?part=contentDetails" + - $"&maxResults={30}" + + $"&maxResults={number}" + $"&playlistId={playlist}" + $"&key={NadekoBot.Creds.GoogleAPIKey}"; diff --git a/NadekoBot/Modules/Music/MusicModule.cs b/NadekoBot/Modules/Music/MusicModule.cs index afba2f3c..304f76f8 100644 --- a/NadekoBot/Modules/Music/MusicModule.cs +++ b/NadekoBot/Modules/Music/MusicModule.cs @@ -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); 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 var idArray = ids as string[] ?? ids.ToArray(); var count = idArray.Count();