.novel fixed, close #1819
This commit is contained in:
parent
497e25b199
commit
ee929c6dfc
@ -26,7 +26,7 @@ namespace NadekoBot.Modules.Searches
|
|||||||
|
|
||||||
if (novelData == null)
|
if (novelData == null)
|
||||||
{
|
{
|
||||||
await ReplyErrorLocalized("error_finding_novel").ConfigureAwait(false);
|
await ReplyErrorLocalized("failed_finding_novel").ConfigureAwait(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ namespace NadekoBot.Modules.Searches
|
|||||||
.WithTitle(novelData.Title)
|
.WithTitle(novelData.Title)
|
||||||
.WithUrl(novelData.Link)
|
.WithUrl(novelData.Link)
|
||||||
.WithImageUrl(novelData.ImageUrl)
|
.WithImageUrl(novelData.ImageUrl)
|
||||||
.AddField(efb => efb.WithName(GetText("authors")).WithValue(String.Join("\n", novelData.Authors)).WithIsInline(true))
|
.AddField(efb => efb.WithName(GetText("authors")).WithValue(string.Join("\n", novelData.Authors)).WithIsInline(true))
|
||||||
.AddField(efb => efb.WithName(GetText("status")).WithValue(novelData.Status).WithIsInline(true))
|
.AddField(efb => efb.WithName(GetText("status")).WithValue(novelData.Status).WithIsInline(true))
|
||||||
.AddField(efb => efb.WithName(GetText("genres")).WithValue(string.Join(" ", novelData.Genres.Any() ? novelData.Genres : new[] { "none" })).WithIsInline(true))
|
.AddField(efb => efb.WithName(GetText("genres")).WithValue(string.Join(" ", novelData.Genres.Any() ? novelData.Genres : new[] { "none" })).WithIsInline(true))
|
||||||
.WithFooter(efb => efb.WithText(GetText("score") + " " + novelData.Score));
|
.WithFooter(efb => efb.WithText(GetText("score") + " " + novelData.Score));
|
||||||
|
@ -67,6 +67,8 @@ namespace NadekoBot.Modules.Searches.Services
|
|||||||
var document = await BrowsingContext.New(config).OpenAsync(link);
|
var document = await BrowsingContext.New(config).OpenAsync(link);
|
||||||
|
|
||||||
var imageElem = document.QuerySelector("div.seriesimg > img");
|
var imageElem = document.QuerySelector("div.seriesimg > img");
|
||||||
|
if (imageElem == null)
|
||||||
|
return null;
|
||||||
var imageUrl = ((IHtmlImageElement)imageElem).Source;
|
var imageUrl = ((IHtmlImageElement)imageElem).Source;
|
||||||
|
|
||||||
var descElem = document.QuerySelector("div#editdescription > p");
|
var descElem = document.QuerySelector("div#editdescription > p");
|
||||||
|
@ -51,7 +51,6 @@ namespace NadekoBot.Modules.Searches.Services
|
|||||||
public ConcurrentDictionary<ulong, Timer> AutoButtTimers { get; } = new ConcurrentDictionary<ulong, Timer>();
|
public ConcurrentDictionary<ulong, Timer> AutoButtTimers { get; } = new ConcurrentDictionary<ulong, Timer>();
|
||||||
|
|
||||||
private readonly ConcurrentDictionary<ulong, HashSet<string>> _blacklistedTags = new ConcurrentDictionary<ulong, HashSet<string>>();
|
private readonly ConcurrentDictionary<ulong, HashSet<string>> _blacklistedTags = new ConcurrentDictionary<ulong, HashSet<string>>();
|
||||||
private readonly Timer _t;
|
|
||||||
|
|
||||||
private readonly SemaphoreSlim _cryptoLock = new SemaphoreSlim(1, 1);
|
private readonly SemaphoreSlim _cryptoLock = new SemaphoreSlim(1, 1);
|
||||||
public async Task<CryptoData[]> CryptoData()
|
public async Task<CryptoData[]> CryptoData()
|
||||||
|
@ -923,5 +923,5 @@
|
|||||||
"administration_invalid": "Invalid / Can't be found ({0})",
|
"administration_invalid": "Invalid / Can't be found ({0})",
|
||||||
"administration_mass_kill_in_progress": "Mass Banning and Blacklisting of {0} users is in progress...",
|
"administration_mass_kill_in_progress": "Mass Banning and Blacklisting of {0} users is in progress...",
|
||||||
"administration_mass_kill_completed": "Mass Banning and Blacklisting of {0} users is complete.",
|
"administration_mass_kill_completed": "Mass Banning and Blacklisting of {0} users is complete.",
|
||||||
"searches_error_finding_novel": "Can't find that novel. Make sure you've typed the exact full name, and that it exists on novelupdates.com"
|
"searches_failed_finding_novel": "Can't find that novel. Make sure you've typed the exact full name, and that it exists on novelupdates.com"
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user