diff --git a/NadekoBot/Classes/IMDB/ImdbMovie.cs b/NadekoBot/Classes/IMDB/ImdbMovie.cs index a1930554..18bb3478 100644 --- a/NadekoBot/Classes/IMDB/ImdbMovie.cs +++ b/NadekoBot/Classes/IMDB/ImdbMovie.cs @@ -43,11 +43,35 @@ namespace NadekoBot.Classes.IMDB public Dictionary Aka { get; set; } - public string ToString + public override string ToString() + { + return "`Title:` **" + EnglishTitle + " (" + OriginalTitle + ")" + + "**\n`Year:` " + Year + + "**\n`Rating:` " + Rating + + "**\n`Genre:` " + GenresAsString + + "\n`Link:` " + ImdbURL + + "\n`Plot:` " + Plot.Substring(0, Plot.Length > 500 ? 500 : Plot.Length) + "..." + //"\n`img:` " + Poster //imdb url do it for us I think its a discord auto thing + ; + } + + public string EnglishTitle { get { - return ImdbURL + "\n" + OriginalTitle + " (" + Year + ") - " + Rating; + return Aka.ContainsKey("USA") ? Aka["USA"] : + (Aka.ContainsKey("UK") ? Aka["UK"] : + (Aka.ContainsKey("(original title)") ? Aka["(original title)"] : + (Aka.ContainsKey("(original)") ? Aka["(original)"] : OriginalTitle))); + } + } + public string GenresAsString + { + get + { + string ret = ""; + Genres.ForEach(g => ret = ret + " " + g); + return ret; } } } diff --git a/NadekoBot/Modules/Searches.cs b/NadekoBot/Modules/Searches.cs index 7f85297a..fc4c8115 100644 --- a/NadekoBot/Modules/Searches.cs +++ b/NadekoBot/Modules/Searches.cs @@ -96,8 +96,8 @@ $@"🌍 **Weather for** 【{obj["target"]}】 string result; try { - var movie = ImdbScraper.ImdbScrape(e.GetArg("query"), false); - if (movie.status) result = movie.ToString; + var movie = ImdbScraper.ImdbScrape(e.GetArg("query"), true); + if (movie.status) result = movie.ToString(); else result = "Failed to find that movie."; } catch