Skip to content

Commit 0364025

Browse files
author
Meyn
committed
Update Shard.DownloadAssistant Version to 1.0.3
1 parent aa40d71 commit 0364025

File tree

5 files changed

+29
-8
lines changed

5 files changed

+29
-8
lines changed

WebsiteScraper/Downloadable/Books/Chapter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using AngleSharp.Dom;
22
using DownloadAssistant.Base;
3-
using DownloadAssistant.Request;
3+
using DownloadAssistant.Requests;
44
using Requests;
55
using Requests.Options;
66
using System.Diagnostics;

WebsiteScraper/Downloadable/Books/Comic.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using AngleSharp.Dom;
22
using DownloadAssistant.Base;
3-
using DownloadAssistant.Request;
3+
using DownloadAssistant.Requests;
44
using Requests;
55
using Requests.Options;
66
using System.Globalization;

WebsiteScraper/WebsiteScraper.csproj

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<Title>WebsiteScraper</Title>
99
<Authors>Meyn</Authors>
1010
<Company>Shard</Company>
11-
<Version>1.2.0</Version>
11+
<Version>1.2.1</Version>
1212
<Description>WebsiteScraper is a powerful tool that allows you to effortlessly download your favorite comics and manga from various websites.
1313
You can easily provide a JSON file containing the website links, and the scraper will do the rest.
1414
Using the advanced parsing capabilities of Angelsharp and Regex, the tool efficiently extracts the desired content from the website and saves it onto your device for offline reading.
@@ -22,7 +22,7 @@ With WebsiteScraper, you can enjoy your favorite comics and manga anytime, anywh
2222
<PackageTags>WebsiteScraper; Shard; Manga; Comic; JSON; Parser</PackageTags>
2323
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
2424
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
25-
<PackageReleaseNotes>Update Shard.DownloadAssistant Version to 0.1.3</PackageReleaseNotes>
25+
<PackageReleaseNotes>Update Shard.DownloadAssistant Version to 1.0.3</PackageReleaseNotes>
2626
</PropertyGroup>
2727

2828
<ItemGroup>
@@ -41,7 +41,8 @@ With WebsiteScraper, you can enjoy your favorite comics and manga anytime, anywh
4141
</ItemGroup>
4242

4343
<ItemGroup>
44-
<PackageReference Include="AngleSharp" Version="1.0.7" />
45-
<PackageReference Include="Shard.DownloadAssistant" Version="0.1.3" />
44+
<PackageReference Include="AngleSharp" Version="1.1.2" />
45+
<PackageReference Include="Shard.DownloadAssistant" Version="1.0.3" />
46+
<PackageReference Include="Shard.Requests" Version="2.1.5" />
4647
</ItemGroup>
4748
</Project>

WebsiteScraper/WebsiteUtilities/Website.Info.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using DownloadAssistant.Request;
1+
using DownloadAssistant.Requests;
22
using Requests.Options;
33
using System.Diagnostics;
44
using System.Text.Json;

WebsiteScraper/WebsiteUtilities/Website.Search.cs

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,11 @@ private StringBuilder CreateSearchURL()
203203
}
204204
stringBuilder.Replace("[tags]", tags.ToString());
205205
tags = new();
206+
StringBuilder en_tags = new();
207+
bool isEn_Tags = SearchPattern.Contains($"[enabled_tags]");
208+
StringBuilder ex_tags = new();
209+
bool isEx_Tags = SearchPattern.Contains($"[disabled_tags]");
210+
206211
foreach (DisableAbleTag tag in _lastSearch.DisableAbleTags.Values)
207212
{
208213
if (SearchPattern.Contains($"[{tag.Key}]"))
@@ -214,10 +219,25 @@ private StringBuilder CreateSearchURL()
214219
else
215220
stringBuilder.Replace($"[{tag.Key}]", tag.NotSet);
216221
}
222+
else if (tag.State == DisableAbleState.Enabled)
223+
{
224+
if (isEn_Tags)
225+
en_tags.Append(tag.Enabled);
226+
else tags.Append(tag.Enabled);
227+
}
228+
else if (tag.State == DisableAbleState.Disabled)
229+
{
230+
if (isEx_Tags)
231+
ex_tags.Append(tag.Disabled);
232+
else tags.Append(tag.Disabled);
233+
}
217234
else
218-
tags.Append(tag.State == DisableAbleState.Enabled ? tag.Enabled : tag.State == DisableAbleState.Disabled ? tag.Disabled : tag.NotSet);
235+
tags.Append(tag.NotSet);
219236
}
220237
stringBuilder.Replace("[disable_tags]", tags.ToString());
238+
stringBuilder.Replace("[disabled_tags]", ex_tags.ToString());
239+
stringBuilder.Replace("[enabled_tags]", en_tags.ToString());
240+
221241
foreach (TextTag tag in _lastSearch.TextTags.Values)
222242
{
223243
if (tag.IsSet)

0 commit comments

Comments
 (0)