Skip to content

Commit

Permalink
Added auto-filling for Ongoing
Browse files Browse the repository at this point in the history
The program will now use the same API Response from getting the links to auto-fill whether the title is Ongoing or not
  • Loading branch information
ErisLoona committed May 17, 2024
1 parent 97f16a4 commit 60894d7
Show file tree
Hide file tree
Showing 33 changed files with 19 additions and 12 deletions.
Binary file not shown.
Binary file modified .vs/Manga Library Manager/v17/.futdcache.v2
Binary file not shown.
Binary file modified .vs/Manga Library Manager/v17/.suo
Binary file not shown.
2 changes: 1 addition & 1 deletion .vs/Manga Library Manager/v17/DocumentLayout.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"RelativeDocumentMoniker": "mainMenu.cs",
"ToolTip": "C:\\Users\\rares\\Documents\\Misc Programs\\Programming\\Manga Library Manager\\mainMenu.cs",
"RelativeToolTip": "mainMenu.cs",
"ViewState": "AQIAALsAAAAAAAAAAAAmwNQAAABJAAAA",
"ViewState": "AQIAALYAAAAAAAAAAAAYwNAAAAAXAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-05-12T16:16:26.664Z",
"EditorCaption": ""
Expand Down
Binary file modified .vs/ProjectEvaluation/manga library manager.metadata.v7.bin
Binary file not shown.
Binary file modified .vs/ProjectEvaluation/manga library manager.projects.v7.bin
Binary file not shown.
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-17T07:31:58.9329403Z;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-17T09:48:43.3293227Z;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,4 +1,4 @@
# Manga Library Manager
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".</br>
This is unique to how I like to organize my mangas, downloading chapters individually leads to many small files that are not coherent, so using Calibre I merge them into one file with the description listing all the chapters formatted as, for example, `Ch.001`. The program executable is meant to stay on the removable drive where I store my mangas, allowing me to scan the drive for new additions and update old entries in terms of what chapter they got to compared to what I obtain from the MangaDex API.</br>
[Download .exe](https://github.com/ErisLoona/Manga-Library-Manager/releases/tag/v1.0)
[Download .exe](https://github.com/ErisLoona/Manga-Library-Manager/releases/tag/v1.1)
7 changes: 7 additions & 0 deletions mainMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public override string ToString()
private bool filterToggled = false;
private Regex chapterRegex = new Regex("Ch\\.[0-9.]+"), titleSanitationRegex = new Regex("[^a-zA-Z0-9 ]");
private Dictionary<string, string> titleDictionary = new Dictionary<string, string>();
private List<bool> apiResponseOngoing = new List<bool>();
private DateTime lastClickedTime = DateTime.MinValue;
public static string jsonDump;

Expand Down Expand Up @@ -137,6 +138,7 @@ private void mangaList_SelectedIndexChanged(object sender, EventArgs e)
if (((eBook)mangaList.SelectedItem).Link == String.Empty)
{
titleDictionary.Clear();
apiResponseOngoing.Clear();
if (thread1.IsBusy == false)
thread1.RunWorkerAsync(argument: ((eBook)mangaList.SelectedItem).Title);
}
Expand Down Expand Up @@ -198,6 +200,7 @@ private void thread1_RunWorkerCompleted(object sender, System.ComponentModel.Run
{
string title = entry.SelectToken("attributes").SelectToken("title").SelectToken("en").Value<string>();
titleDictionary[title] = "https://mangadex.org/title/" + entry.SelectToken("id").Value<string>();
apiResponseOngoing.Add(entry.SelectToken("attributes").SelectToken("status").Value<string>() == "ongoing" || entry.SelectToken("attributes").SelectToken("status").Value<string>() == "hiatus");
autocompleteTemp.Add(title);
}
}
Expand All @@ -211,6 +214,7 @@ private void thread1_RunWorkerCompleted(object sender, System.ComponentModel.Run
if (book.Title == t.Item2)
{
book.Link = titleDictionary[autocompleteTemp[0]];
book.Ongoing = apiResponseOngoing[0];
break;
}
}
Expand All @@ -230,7 +234,10 @@ private void mangaList_MouseDown(object sender, MouseEventArgs e)
private void linkTextBox_TextChanged(object sender, EventArgs e)
{
if (titleDictionary.ContainsKey(linkTextBox.Text) == true)
{
ongoingCheckbox.Checked = apiResponseOngoing[linkTextBox.SelectedIndex];
BeginInvoke(new Action(() => linkTextBox.Text = titleDictionary[linkTextBox.Text]));
}
((eBook)mangaList.SelectedItem).Link = linkTextBox.Text;
toolTip.SetToolTip(linkTextBox, linkTextBox.Text);
}
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+ec9dc30d9d7e4e1f42d109cd3c1809a01df5fe4f")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+97f16a4814eba73f4639a2e0ab12e3f8eabf5b12")]
[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 @@
28d7080b2e3b0de30f964fd29bf8922b54ae356be6a4c167076991c68d44cb9d
cf1b147f910b7e4886caca4428d13f016ff7b20c68240e19e75c5e1c78d0f5dc
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/ec9dc30d9d7e4e1f42d109cd3c1809a01df5fe4f/*"}}
{"documents":{"C:\\Users\\rares\\Documents\\Misc Programs\\Programming\\Manga Library Manager\\*":"https://raw.githubusercontent.com/ErisLoona/Manga-Library-Manager/97f16a4814eba73f4639a2e0ab12e3f8eabf5b12/*"}}
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+ec9dc30d9d7e4e1f42d109cd3c1809a01df5fe4f")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+97f16a4814eba73f4639a2e0ab12e3f8eabf5b12")]
[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 @@
7a5c027dcfe6fac243cf7c177e0d5917f95a938be19248466779f2312ae1b87d
dfc1607b9c310256712ec1b896bc97c59f6c64b413597fa734e09cb0abffa53e
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/ec9dc30d9d7e4e1f42d109cd3c1809a01df5fe4f/*"}}
{"documents":{"C:\\Users\\rares\\Documents\\Misc Programs\\Programming\\Manga Library Manager\\*":"https://raw.githubusercontent.com/ErisLoona/Manga-Library-Manager/97f16a4814eba73f4639a2e0ab12e3f8eabf5b12/*"}}
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+ec9dc30d9d7e4e1f42d109cd3c1809a01df5fe4f")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+97f16a4814eba73f4639a2e0ab12e3f8eabf5b12")]
[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 @@
7a5c027dcfe6fac243cf7c177e0d5917f95a938be19248466779f2312ae1b87d
dfc1607b9c310256712ec1b896bc97c59f6c64b413597fa734e09cb0abffa53e
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/ec9dc30d9d7e4e1f42d109cd3c1809a01df5fe4f/*"}}
{"documents":{"C:\\Users\\rares\\Documents\\Misc Programs\\Programming\\Manga Library Manager\\*":"https://raw.githubusercontent.com/ErisLoona/Manga-Library-Manager/97f16a4814eba73f4639a2e0ab12e3f8eabf5b12/*"}}
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 60894d7

Please sign in to comment.