diff --git a/Downloader.axaml.cs b/Downloader.axaml.cs index 34b4006..749da4d 100644 --- a/Downloader.axaml.cs +++ b/Downloader.axaml.cs @@ -360,6 +360,8 @@ private void AddMangaToQueue(string mangaID, bool isUpdate) ContentRating = MDLGetData.GetContentRating().Substring(0, 1).ToUpper() + MDLGetData.GetContentRating().Substring(1), Tags = MDLGetData.GetTags().ToList() }; + if (isUpdate == true) + newManga.TempManga.Tags = mangaList[passIndex].Tags; newManga.Updating = isUpdate; TextBlock title = new TextBlock() @@ -538,8 +540,8 @@ private async void DownloadButton_Clicked(object sender, RoutedEventArgs args) currentManga.TempManga.Title = currentManga.Titles[currentManga.SelectedTitleIndex]; - Dictionary chaptersToDownload = new Dictionary(); // Chapter ID to Nr. of pages - List selectedChapterNumbers = new List(); + Dictionary chaptersToDownload = new Dictionary(); // Chapter ID to Nr. of pages for the Progress Bars + List selectedChapterNumbers = new List(); for (int i = 0; i < currentManga.Chapters.Count; i++) if (currentManga.Chapters[i].Checked == true) { @@ -547,12 +549,13 @@ private async void DownloadButton_Clicked(object sender, RoutedEventArgs args) try { currentManga.TempManga.FileLastChapter = Convert.ToDecimal(currentManga.Chapters[i].Content.Split(' ')[0].Split("Ch.")[1]); - selectedChapterNumbers.Add(Convert.ToDecimal(currentManga.Chapters[i].Content.Split(' ')[0].Split("Ch.")[1])); + string sanitizedGroupName = new string(currentManga.Chapters[i].Content.Split(" by ")[1].Where(c => char.IsLetter(c)).ToArray()).ToLower(); + selectedChapterNumbers.Add(currentManga.Chapters[i].Content.Split(' ')[0].Split("Ch.")[1] + "by" + sanitizedGroupName); } catch { currentManga.TempManga.FileLastChapter = Convert.ToDecimal(currentManga.Chapters[i].Content.Split("Ch.")[1]); - selectedChapterNumbers.Add(Convert.ToDecimal(currentManga.Chapters[i].Content.Split("Ch.")[1])); + selectedChapterNumbers.Add(currentManga.Chapters[i].Content.Split("Ch.")[1]); } } @@ -1028,7 +1031,7 @@ private async void DownloadButton_Clicked(object sender, RoutedEventArgs args) if (selectedChapterNumbers.Count > 0) { - string nr = padDecimal(selectedChapterNumbers.Max(), "D" + selectedChapterNumbers.Count.ToString().Length.ToString()); + string nr = padDecimal(currentManga.TempManga.FileLastChapter, "D" + selectedChapterNumbers.Count.ToString().Length.ToString()); doc.DocumentElement.SelectSingleNode("//dc:description", nsmgr).InnerText = currentManga.TempManga.Description.Replace("\r\n", "
").Replace("\n", "
") + "
Last chapter: " + "Ch." + nr; } diff --git a/Manga Manager.csproj b/Manga Manager.csproj index 31d7905..75f71b8 100644 --- a/Manga Manager.csproj +++ b/Manga Manager.csproj @@ -10,7 +10,7 @@ Eris Loona, pseudonym https://github.com/ErisLoona/Manga-Library-Manager en - 3.1.0 + 3.1.1 icon256.ico embedded true diff --git a/MangaDex Library/MDLGetData.cs b/MangaDex Library/MDLGetData.cs index ab6f193..f21ff36 100644 --- a/MangaDex Library/MDLGetData.cs +++ b/MangaDex Library/MDLGetData.cs @@ -231,7 +231,7 @@ private static void UpdateFeed() RateLimiter.ApiCall(); try { - pages.Add(JObject.Parse(client.GetStringAsync($"{apiLink}{MDLParameters.MangaID}/feed?translatedLanguage[]={MDLParameters.Language}&limit=100&contentRating[]=safe&contentRating[]=suggestive&contentRating[]=erotica&contentRating[]=pornographic&includes[]=scanlation_group").Result)); + pages.Add(JObject.Parse(client.GetStringAsync($"{apiLink}{MDLParameters.MangaID}/feed?translatedLanguage[]={MDLParameters.Language}&limit=100&contentRating[]=safe&contentRating[]=suggestive&contentRating[]=erotica&contentRating[]=pornographic&includes[]=scanlation_group&order[volume]=asc&order[chapter]=asc").Result)); int nrPages = pages[0].SelectToken("total").Value(); if (nrPages > 100) { @@ -239,7 +239,7 @@ private static void UpdateFeed() while (passes > 0) { RateLimiter.ApiCall(); - pages.Add(JObject.Parse(client.GetStringAsync($"{apiLink}{MDLParameters.MangaID}/feed?translatedLanguage[]={MDLParameters.Language}&limit=100&offset={passes * 100}&contentRating[]=safe&contentRating[]=suggestive&contentRating[]=erotica&contentRating[]=pornographic&includes[]=scanlation_group").Result)); + pages.Add(JObject.Parse(client.GetStringAsync($"{apiLink}{MDLParameters.MangaID}/feed?translatedLanguage[]={MDLParameters.Language}&limit=100&offset={passes * 100}&contentRating[]=safe&contentRating[]=suggestive&contentRating[]=erotica&contentRating[]=pornographic&includes[]=scanlation_group&order[volume]=asc&order[chapter]=asc").Result)); passes--; } } @@ -260,6 +260,8 @@ private static void UpdateFeed() foreach (JObject page in feed) foreach (JToken chapter in page.SelectToken("data")) { + if (chapter.SelectToken("attributes.pages").Value() == 0) + continue; chapterIDs.Add(chapter.SelectToken("id").Value()); chapterNumbers.Add(Convert.ToDecimal(chapter.SelectToken("attributes.chapter").Value(), new CultureInfo("en-US"))); chapterTitles.Add(chapter.SelectToken("attributes.title").Value()); diff --git a/Properties/PublishProfiles/Linux Publish.pubxml.user b/Properties/PublishProfiles/Linux Publish.pubxml.user index 73a19a5..dcb7211 100644 --- a/Properties/PublishProfiles/Linux Publish.pubxml.user +++ b/Properties/PublishProfiles/Linux Publish.pubxml.user @@ -4,7 +4,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. --> - True|2024-12-05T09:28:02.9478449Z||;True|2024-12-03T08:55:53.8428381+01:00||;True|2024-12-02T21:20:46.8860520+01:00||;True|2024-12-02T20:39:14.6506039+01:00||;True|2024-11-29T11:47:46.0927549+01:00||;True|2024-11-29T11:37:55.4255378+01:00||;True|2024-11-29T11:37:15.3144929+01:00||;True|2024-11-29T11:35:01.2234796+01:00||;True|2024-11-29T10:43:07.8303034+01:00||;True|2024-11-27T20:49:34.0528895+01:00||;True|2024-11-27T20:48:22.3163582+01:00||;True|2024-11-27T20:30:06.3097457+01:00||;True|2024-11-27T16:59:22.2651522+01:00||;True|2024-11-27T09:39:28.4152325+01:00||;True|2024-11-27T09:01:20.5273611+01:00||;True|2024-11-27T08:56:54.6418789+01:00||;True|2024-11-27T08:51:22.1782954+01:00||; + False|2024-12-26T16:59:02.3545398Z||;True|2024-12-26T13:50:46.8276076+01:00||;True|2024-12-05T10:28:02.9478449+01:00||;True|2024-12-03T08:55:53.8428381+01:00||;True|2024-12-02T21:20:46.8860520+01:00||;True|2024-12-02T20:39:14.6506039+01:00||;True|2024-11-29T11:47:46.0927549+01:00||;True|2024-11-29T11:37:55.4255378+01:00||;True|2024-11-29T11:37:15.3144929+01:00||;True|2024-11-29T11:35:01.2234796+01:00||;True|2024-11-29T10:43:07.8303034+01:00||;True|2024-11-27T20:49:34.0528895+01:00||;True|2024-11-27T20:48:22.3163582+01:00||;True|2024-11-27T20:30:06.3097457+01:00||;True|2024-11-27T16:59:22.2651522+01:00||;True|2024-11-27T09:39:28.4152325+01:00||;True|2024-11-27T09:01:20.5273611+01:00||;True|2024-11-27T08:56:54.6418789+01:00||;True|2024-11-27T08:51:22.1782954+01:00||; \ No newline at end of file diff --git a/Properties/PublishProfiles/Windows Release.pubxml.user b/Properties/PublishProfiles/Windows Release.pubxml.user index 37f99bd..5cff782 100644 --- a/Properties/PublishProfiles/Windows Release.pubxml.user +++ b/Properties/PublishProfiles/Windows Release.pubxml.user @@ -4,7 +4,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. --> - True|2024-12-16T13:24:31.6017240Z||;True|2024-12-05T15:48:21.6380912+01:00||;True|2024-12-05T15:41:01.2998753+01:00||;True|2024-12-05T10:27:53.9063325+01:00||;True|2024-12-05T10:21:12.0877537+01:00||;True|2024-12-03T08:56:07.4697318+01:00||;True|2024-12-02T21:20:40.1113007+01:00||;True|2024-12-02T20:38:59.4610959+01:00||;True|2024-12-02T14:28:33.8752294+01:00||;True|2024-11-29T11:47:38.5429477+01:00||;True|2024-11-29T11:44:44.4931353+01:00||;True|2024-11-29T11:37:46.7879782+01:00||;True|2024-11-29T11:37:29.3303495+01:00||;True|2024-11-29T11:34:51.3573996+01:00||;True|2024-11-29T10:43:16.4214680+01:00||;True|2024-11-27T22:06:40.4122930+01:00||;True|2024-11-27T17:00:15.2266919+01:00||;True|2024-11-27T09:40:04.3729036+01:00||;True|2024-11-27T09:01:36.0426378+01:00||;True|2024-11-27T08:35:34.4591883+01:00||;True|2024-11-27T08:25:58.6905083+01:00||;True|2024-11-26T18:08:57.6730121+01:00||;True|2024-11-26T17:32:30.7716846+01:00||; + True|2024-12-26T17:07:43.1946932Z||;True|2024-12-26T18:00:59.6828279+01:00||;True|2024-12-26T13:51:02.1846282+01:00||;True|2024-12-26T13:41:06.4260890+01:00||;True|2024-12-26T13:40:56.7004797+01:00||;True|2024-12-16T14:24:31.6017240+01:00||;True|2024-12-05T15:48:21.6380912+01:00||;True|2024-12-05T15:41:01.2998753+01:00||;True|2024-12-05T10:27:53.9063325+01:00||;True|2024-12-05T10:21:12.0877537+01:00||;True|2024-12-03T08:56:07.4697318+01:00||;True|2024-12-02T21:20:40.1113007+01:00||;True|2024-12-02T20:38:59.4610959+01:00||;True|2024-12-02T14:28:33.8752294+01:00||;True|2024-11-29T11:47:38.5429477+01:00||;True|2024-11-29T11:44:44.4931353+01:00||;True|2024-11-29T11:37:46.7879782+01:00||;True|2024-11-29T11:37:29.3303495+01:00||;True|2024-11-29T11:34:51.3573996+01:00||;True|2024-11-29T10:43:16.4214680+01:00||;True|2024-11-27T22:06:40.4122930+01:00||;True|2024-11-27T17:00:15.2266919+01:00||;True|2024-11-27T09:40:04.3729036+01:00||;True|2024-11-27T09:01:36.0426378+01:00||;True|2024-11-27T08:35:34.4591883+01:00||;True|2024-11-27T08:25:58.6905083+01:00||;True|2024-11-26T18:08:57.6730121+01:00||;True|2024-11-26T17:32:30.7716846+01:00||; \ No newline at end of file