Skip to content

Commit

Permalink
fixed logic issue, ux improvements
Browse files Browse the repository at this point in the history
- For mangas with over 500 chapters the program may send over 5 requests a second to the API, now it may send fewer but I prefer erring on the side of caution
- In the all ongoing form the loading bar will now stay so there isn't an awkward gap
- Removed confirmation MessageBox from the get all online button, it's now just a tooltip
- Check Online button now re-enables faster
  • Loading branch information
ErisLoona committed May 24, 2024
1 parent 57c0d17 commit 4983878
Show file tree
Hide file tree
Showing 33 changed files with 39 additions and 21 deletions.
2 changes: 1 addition & 1 deletion Properties/PublishProfiles/FolderProfile.pubxml.user
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<History>True|2024-05-23T07:17:13.9644300Z||;True|2024-05-23T09:05:46.2467509+02:00||;True|2024-05-22T22:13:45.9526537+02:00||;True|2024-05-22T22:09:03.4000755+02:00||;True|2024-05-22T22:08:00.0350517+02:00||;True|2024-05-22T21:44:48.4725626+02:00||;True|2024-05-22T21:32:35.3627900+02:00||;True|2024-05-22T19:33:34.6467061+02:00||;True|2024-05-19T19:19:28.1467287+02:00||;True|2024-05-19T19:17:09.7006733+02:00||;True|2024-05-19T19:14:06.6668981+02:00||;True|2024-05-19T14:42:07.1301968+02:00||;True|2024-05-19T14:38:02.4943907+02:00||;True|2024-05-19T09:20:51.2871097+02:00||;True|2024-05-19T09:18:16.6124371+02:00||;True|2024-05-19T09:15:08.6048404+02:00||;True|2024-05-18T22:34:28.8521894+02:00||;True|2024-05-18T22:22:14.4673452+02:00||;True|2024-05-18T21:56:58.6143811+02:00||;True|2024-05-18T07:41:43.4161277+02:00||;True|2024-05-17T11:48:43.3293227+02:00||;True|2024-05-17T09:31:58.9329403+02:00||;True|2024-05-17T09:25:57.4957904+02:00||;True|2024-05-16T19:52:10.0997229+02:00||;True|2024-05-16T18:17:01.7850021+02:00||;True|2024-05-15T09:33:00.6957135+02:00||;True|2024-05-15T08:32:31.7735956+02:00||;True|2024-05-13T17:25:21.1454345+02:00||;True|2024-05-13T17:15:09.7285346+02:00||;True|2024-05-13T16:52:20.9054581+02:00||;True|2024-05-13T16:51:27.0891569+02:00||;True|2024-05-13T16:50:34.5522468+02:00||;True|2024-05-13T16:49:22.6946988+02:00||;</History>
<History>True|2024-05-24T06:59:01.6326756Z||;True|2024-05-23T09:17:13.9644300+02:00||;True|2024-05-23T09:05:46.2467509+02:00||;True|2024-05-22T22:13:45.9526537+02:00||;True|2024-05-22T22:09:03.4000755+02:00||;True|2024-05-22T22:08:00.0350517+02:00||;True|2024-05-22T21:44:48.4725626+02:00||;True|2024-05-22T21:32:35.3627900+02:00||;True|2024-05-22T19:33:34.6467061+02:00||;True|2024-05-19T19:19:28.1467287+02:00||;True|2024-05-19T19:17:09.7006733+02:00||;True|2024-05-19T19:14:06.6668981+02:00||;True|2024-05-19T14:42:07.1301968+02:00||;True|2024-05-19T14:38:02.4943907+02:00||;True|2024-05-19T09:20:51.2871097+02:00||;True|2024-05-19T09:18:16.6124371+02:00||;True|2024-05-19T09:15:08.6048404+02:00||;True|2024-05-18T22:34:28.8521894+02:00||;True|2024-05-18T22:22:14.4673452+02:00||;True|2024-05-18T21:56:58.6143811+02:00||;True|2024-05-18T07:41:43.4161277+02:00||;True|2024-05-17T11:48:43.3293227+02:00||;True|2024-05-17T09:31:58.9329403+02:00||;True|2024-05-17T09:25:57.4957904+02:00||;True|2024-05-16T19:52:10.0997229+02:00||;True|2024-05-16T18:17:01.7850021+02:00||;True|2024-05-15T09:33:00.6957135+02:00||;True|2024-05-15T08:32:31.7735956+02:00||;True|2024-05-13T17:25:21.1454345+02:00||;True|2024-05-13T17:15:09.7285346+02:00||;True|2024-05-13T16:52:20.9054581+02:00||;True|2024-05-13T16:51:27.0891569+02:00||;True|2024-05-13T16:50:34.5522468+02:00||;True|2024-05-13T16:49:22.6946988+02:00||;</History>
<LastFailureDetails />
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Manga Library Manager
### [Download .exe](https://github.com/ErisLoona/Manga-Library-Manager/releases/tag/v1.6)
### [Download .exe](https://github.com/ErisLoona/Manga-Library-Manager/releases/tag/v1.7)
This is a manager for personal use that allows me to organize and keep track of ongoing releases of Mangas. It checks the `content.opf` file inside a `.epub` archive to get the title and last chapter listed in the description of the "book". It also attempts to get the `cover.*` image from the root of the epub archive.<br />

The program enables better organization of an offline digital manga (/book) library. The intended use (and actions of the program) goes as follows:<br />
Expand Down
26 changes: 23 additions & 3 deletions allOnlineChapters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,18 +85,38 @@ private void thread_DoWork(object sender, DoWorkEventArgs e)
if (passes <= 4)
while (passes > 0)
{
if (counter == 5)
{
sw.Stop();
span = sw.Elapsed;
if (span.Milliseconds < 1000)
Thread.Sleep(1000 - span.Milliseconds);
counter = 0;
sw.Reset();
sw.Start();
}
task = client.GetStringAsync(new Uri("https://api.mangadex.org/manga/" + mangaID + "/feed?translatedLanguage[]=en&limit=500".AppendQueryParam("offset", Convert.ToString(passes * 500)).AppendQueryParam("contentRating[]", new[] { "safe", "suggestive", "erotica", "pornographic" })));
extraPages.Add(task.Result);
passes--;
counter++;
}
else
{
for (int i = 1; i <= passes; i++)
{
if (i % 5 == 0)
Thread.Sleep(1000);
if (counter == 5)
{
sw.Stop();
span = sw.Elapsed;
if (span.Milliseconds < 1000)
Thread.Sleep(1000 - span.Milliseconds);
counter = 0;
sw.Reset();
sw.Start();
}
task = client.GetStringAsync(new Uri("https://api.mangadex.org/manga/" + mangaID + "/feed?translatedLanguage[]=en&limit=500".AppendQueryParam("offset", Convert.ToString(passes * 500)).AppendQueryParam("contentRating[]", new[] { "safe", "suggestive", "erotica", "pornographic" })));
extraPages.Add(task.Result);
counter++;
}
}
}
Expand Down Expand Up @@ -143,7 +163,7 @@ private void thread_ProgressChanged(object sender, ProgressChangedEventArgs e)
private void thread_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
doneButton.Text = "Close";
loadingBar.Visible = false;
//loadingBar.Visible = false;
Dictionary<string, int> result = new Dictionary<string, int>();
try
{
Expand Down
4 changes: 2 additions & 2 deletions mainMenu.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions mainMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -930,8 +930,6 @@ private void tagsTextBox_Enter(object sender, EventArgs e)

private void checkAllOnlineButton_Click(object sender, EventArgs e)
{
if (MessageBox.Show("This will check all the Ongoing mangas for new chapters online.\nAre you sure you want to start the check?", "Update all chapters", MessageBoxButtons.YesNo) == DialogResult.No)
return;
booksCopy.Clear();
foreach (eBook book in books)
if (book.Ongoing == true)
Expand Down
6 changes: 3 additions & 3 deletions mainMenu.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>150, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="resetButton.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
Expand Down Expand Up @@ -287,9 +290,6 @@
AAAAAAAAAAAAsDRbbPH/AH6kZznXAcjGAAAAAElFTkSuQmCC
</value>
</data>
<metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>150, 17</value>
</metadata>
<metadata name="openFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
[assembly: System.Reflection.AssemblyCompanyAttribute("Manga Library Manager")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+c32318795b68d433d4adc60408f3480d0c7c378e")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+57c0d177a18391f29c35b1cc9e78b85076b48a50")]
[assembly: System.Reflection.AssemblyProductAttribute("Manga Library Manager")]
[assembly: System.Reflection.AssemblyTitleAttribute("Manga Library Manager")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ff5dd3e0122d10922ab8d5893782773688e7f5af6020aa30e42abff9ba2d144f
c51de77f64cb96c8a62fd8855260a32a302ac590000d4cf82c52b5c1b40f1029
Binary file not shown.
Binary file modified obj/Debug/net8.0-windows/Manga Library Manager.dll
Binary file not shown.
Binary file modified obj/Debug/net8.0-windows/Manga Library Manager.pdb
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"documents":{"C:\\Users\\rares\\Documents\\Misc Programs\\Programming\\Manga Library Manager\\*":"https://raw.githubusercontent.com/ErisLoona/Manga-Library-Manager/c32318795b68d433d4adc60408f3480d0c7c378e/*"}}
{"documents":{"C:\\Users\\rares\\Documents\\Misc Programs\\Programming\\Manga Library Manager\\*":"https://raw.githubusercontent.com/ErisLoona/Manga-Library-Manager/57c0d177a18391f29c35b1cc9e78b85076b48a50/*"}}
Binary file modified obj/Debug/net8.0-windows/apphost.exe
Binary file not shown.
Binary file modified obj/Debug/net8.0-windows/ref/Manga Library Manager.dll
Binary file not shown.
Binary file modified obj/Debug/net8.0-windows/refint/Manga Library Manager.dll
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
[assembly: System.Reflection.AssemblyCompanyAttribute("Manga Library Manager")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+c32318795b68d433d4adc60408f3480d0c7c378e")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+57c0d177a18391f29c35b1cc9e78b85076b48a50")]
[assembly: System.Reflection.AssemblyProductAttribute("Manga Library Manager")]
[assembly: System.Reflection.AssemblyTitleAttribute("Manga Library Manager")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
895e9d87dd91511be1962bfd0a87da25774e76e0688e2eaf78248a933e712021
ef15c3b6c4fd9405dd155bd49dfd44c8741ab3777e9d28348c76fb5cd8ec4ad2
Binary file not shown.
Binary file modified obj/Release/net8.0-windows/Manga Library Manager.dll
Binary file not shown.
Binary file modified obj/Release/net8.0-windows/Manga Library Manager.pdb
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"documents":{"C:\\Users\\rares\\Documents\\Misc Programs\\Programming\\Manga Library Manager\\*":"https://raw.githubusercontent.com/ErisLoona/Manga-Library-Manager/c32318795b68d433d4adc60408f3480d0c7c378e/*"}}
{"documents":{"C:\\Users\\rares\\Documents\\Misc Programs\\Programming\\Manga Library Manager\\*":"https://raw.githubusercontent.com/ErisLoona/Manga-Library-Manager/57c0d177a18391f29c35b1cc9e78b85076b48a50/*"}}
Binary file modified obj/Release/net8.0-windows/apphost.exe
Binary file not shown.
Binary file modified obj/Release/net8.0-windows/ref/Manga Library Manager.dll
Binary file not shown.
Binary file modified obj/Release/net8.0-windows/refint/Manga Library Manager.dll
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
[assembly: System.Reflection.AssemblyCompanyAttribute("Manga Library Manager")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+c32318795b68d433d4adc60408f3480d0c7c378e")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+57c0d177a18391f29c35b1cc9e78b85076b48a50")]
[assembly: System.Reflection.AssemblyProductAttribute("Manga Library Manager")]
[assembly: System.Reflection.AssemblyTitleAttribute("Manga Library Manager")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
895e9d87dd91511be1962bfd0a87da25774e76e0688e2eaf78248a933e712021
ef15c3b6c4fd9405dd155bd49dfd44c8741ab3777e9d28348c76fb5cd8ec4ad2
Binary file not shown.
Binary file modified obj/Release/net8.0-windows/win-x64/Manga Library Manager.dll
Binary file not shown.
Binary file modified obj/Release/net8.0-windows/win-x64/Manga Library Manager.pdb
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"documents":{"C:\\Users\\rares\\Documents\\Misc Programs\\Programming\\Manga Library Manager\\*":"https://raw.githubusercontent.com/ErisLoona/Manga-Library-Manager/c32318795b68d433d4adc60408f3480d0c7c378e/*"}}
{"documents":{"C:\\Users\\rares\\Documents\\Misc Programs\\Programming\\Manga Library Manager\\*":"https://raw.githubusercontent.com/ErisLoona/Manga-Library-Manager/57c0d177a18391f29c35b1cc9e78b85076b48a50/*"}}
Binary file modified obj/Release/net8.0-windows/win-x64/apphost.exe
Binary file not shown.
Binary file modified obj/Release/net8.0-windows/win-x64/ref/Manga Library Manager.dll
Binary file not shown.
Binary file not shown.

0 comments on commit 4983878

Please sign in to comment.