From 980a4a10d093c0cdedab72a64dc0f5310dd2ec49 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Tue, 3 Jan 2017 21:12:21 +0100 Subject: [PATCH] Better error in !imdb --- src/NadekoBot/Modules/Searches/Commands/OMDB/OmdbProvider.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/NadekoBot/Modules/Searches/Commands/OMDB/OmdbProvider.cs b/src/NadekoBot/Modules/Searches/Commands/OMDB/OmdbProvider.cs index 892f8fab..a3d56fcf 100644 --- a/src/NadekoBot/Modules/Searches/Commands/OMDB/OmdbProvider.cs +++ b/src/NadekoBot/Modules/Searches/Commands/OMDB/OmdbProvider.cs @@ -18,7 +18,8 @@ namespace NadekoBot.Modules.Searches.Commands.OMDB { var res = await http.GetStringAsync(String.Format(queryUrl,name.Trim().Replace(' ','+'))).ConfigureAwait(false); var movie = JsonConvert.DeserializeObject(res); - + if (movie?.Title == null) + return null; movie.Poster = await NadekoBot.Google.ShortenUrl(movie.Poster); return movie; }