Skip to content

Commit

Permalink
Release 1.49.8.59
Browse files Browse the repository at this point in the history
  • Loading branch information
MonkAlex committed May 8, 2020
1 parent cd18a47 commit 804c348
Show file tree
Hide file tree
Showing 11 changed files with 65 additions and 21 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# История версий
***
## 1.49.8.59 — 2020-05-08

### Исправлено
* Актуализирован адрес https://henchan.pro/.

***
## 1.49.7.54 — 2020-04-30

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ await Dispatcher.UIThread.InvokeAsync(() =>

public void ResetView()
{
Items.Edit(updater =>
Items?.Edit(updater =>
{
var oldItems = Items.Items;
updater.Clear();
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
На текущий момент поддерживаются:
1. [ReadManga](https://readmanga.me)
2. [MintManga](https://mintmanga.live)
3. [Hentaichan](https://h-chan.me/)
3. [Hentaichan](https://henchan.pro/)
4. [Acomics](https://acomics.ru)
5. [Mangachan](https://manga-chan.me/)
6. [Hentai2Read](https://hentai2read.com//)
Expand Down
33 changes: 33 additions & 0 deletions Sites/Hentaichan.me/Convertation/HentaichanFrom48To49.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
using System;
using System.Threading.Tasks;
using MangaReader.Core.Convertation;
using MangaReader.Core.Convertation.Primitives;
using MangaReader.Core.NHibernate;
using MangaReader.Core.Services.Config;

namespace Hentaichan.Convertation
{
public class HentaichanFrom48To49 : ConfigConverter
{
protected override async Task ProtectedConvert(IProcess process)
{
using (var context = Repository.GetEntityContext())
{
var setting = ConfigStorage.GetPlugin<Hentaichan>().GetSettings();
var oldMainUri = new Uri("https://h-chan.me/");
var mainUri = new Uri("https://henchan.pro/");
if (setting != null && Equals(oldMainUri, setting.MainUri))
{
setting.MainUri = mainUri;
await context.Save(setting).ConfigureAwait(false);
}
}
}

public HentaichanFrom48To49()
{
this.Version = new Version(1, 49, 8);
this.Name = "Обновляем ссылки на henchan.pro...";
}
}
}
2 changes: 1 addition & 1 deletion Sites/Hentaichan.me/HentaichanLogin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ await Task.WhenAll(mangas.Select(async m =>
public HentaichanLogin()
{
// Адрес может быть переопределен в базе. Это только дефолтное значение.
this.MainUri = new Uri(@"https://h-chan.me/");
this.MainUri = new Uri(@"https://henchan.pro/");
}
}
}
9 changes: 7 additions & 2 deletions Sites/Hentaichan.me/Parser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ public override async Task UpdateContent(IManga manga)
});
}
}
else
{
// Раз не нашли других глав - качаем хотя бы эту.
chapters.Add(new ChapterDto(uri, manga.ServerName) { Number = 0 });
}
}
else
{
Expand Down Expand Up @@ -184,9 +189,9 @@ private async Task<Tuple<Page, Uri>> GetPageWithRedirect(Uri uri)

public override UriParseResult ParseUri(Uri uri)
{
// Manga : https://h-chan.me/manga/14212-love-and-devil-glava-25.html
// Manga : https://henchan.pro/manga/14212-love-and-devil-glava-25.html
// Volume : -
// Chapter : https://h-chan.me/online/14212-love-and-devil-glava-25.html
// Chapter : https://henchan.pro/online/14212-love-and-devil-glava-25.html
// Page : -

var hosts = ConfigStorage.Plugins
Expand Down
6 changes: 3 additions & 3 deletions Tests/Tests.Entities/Cache.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
"Status": "https://acomics.ru/~supersciencefriends\r\n\r\nАвтор оригинала: Tinman Creative Studios\r\nПереводчик: CrownedPenguin\r\nКоличество выпусков: 44\r\nКоличество подписчиков: 282\r\nОфициальный сайт: http://supersciencefriends.com/2099/\r\nВозрастной рейтинг: Parents strongly cautioned (Не рекомендуется лицам до 13 лет)\r\nЛицензия: Нет лицензии или не CC\r\n"
},
{
"Uri": "https://h-chan.me/manga/12850-twisted-intent-chast-1.html",
"Uri": "https://henchan.pro/manga/12850-twisted-intent-chast-1.html",
"FolderSize": 16369623,
"FilesInFolder": 49,
"AllFilesUnique": true,
"Description": "",
"Status": "Серия League of Legends\r\nАвтор OptionalTypo\r\nПереводчик TheMaximchik\r\nЯзык На русском\r\n"
},
{
"Uri": "https://h-chan.me/manga/14212-love-and-devil-glava-25.html",
"Uri": "https://henchan.pro/manga/14212-love-and-devil-glava-25.html",
"FolderSize": 0,
"FilesInFolder": 0,
"AllFilesUnique": false,
Expand Down Expand Up @@ -95,4 +95,4 @@
"Description": "4-кадровая манга дополнительно включенная в тома манги \"Город,в котором ты живешь\"",
"Status": "Томов: 1\r\nПеревод: завершен\r\nЖанры: повседневность, комедия\r\nКатегория: Ёнкома\r\nАвтор: Сэо Кодзи\r\nГод выпуска: 2008\r\nИздательство: Kodansha\r\nПереводчик: Aoshi Shinomori\r\n"
}
]
]
18 changes: 9 additions & 9 deletions Tests/Tests.Entities/Manga/HentaichanStructure.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,23 @@ public class HentaichanStructure : TestClass
[Test]
public async Task AddHentaichanMultiPages()
{
var manga = await GetManga("https://h-chan.me/manga/14212-love-and-devil-glava-25.html").ConfigureAwait(false);
var manga = await GetManga("https://henchan.pro/manga/14212-love-and-devil-glava-25.html").ConfigureAwait(false);
Assert.AreEqual(25, manga.Chapters.Count);
Assert.IsTrue(manga.HasChapters);
}

[Test]
public async Task AddHentaichanOneChapter()
{
var manga = await GetManga("https://h-chan.me/manga/15131-chuui-horeru-to-yakui-kara.html").ConfigureAwait(false);
var manga = await GetManga("https://henchan.pro/manga/15131-chuui-horeru-to-yakui-kara.html").ConfigureAwait(false);
Assert.AreEqual(1, manga.Chapters.Count);
Assert.IsTrue(manga.HasChapters);
}

[Test]
public async Task AddHentaichanSubdomain()
{
var manga = await GetManga("https://h-chan.me/manga/23083-ponpharse-tokubetsu-hen-chast-1.html").ConfigureAwait(false);
var manga = await GetManga("https://henchan.pro/manga/23083-ponpharse-tokubetsu-hen-chast-1.html").ConfigureAwait(false);
Assert.AreEqual(2, manga.Chapters.Count);
Assert.IsTrue(manga.HasChapters);
Assert.AreEqual(1, manga.Chapters.First().Number);
Expand All @@ -54,27 +54,27 @@ public async Task ParsingDoublesInChapterName()
public async Task HentaichanNameParsing()
{
// Спецсимвол \
await TestNameParsing("https://h-chan.me/manga/14504-lets-play-lovegames-shall-we-glava-1.html",
await TestNameParsing("https://henchan.pro/manga/14504-lets-play-lovegames-shall-we-glava-1.html",
"Let's Play Lovegames, Shall We?").ConfigureAwait(false);

// Спецсимвол # и одна глава
await TestNameParsing("https://h-chan.me/manga/15109-exhibitionist-renko-chan.html",
await TestNameParsing("https://henchan.pro/manga/15109-exhibitionist-renko-chan.html",
"#Exhibitionist Renko-chan").ConfigureAwait(false);

// Символ звездочки *
await TestNameParsing("https://h-chan.me/manga/15131-chuui-horeru-to-yakui-kara.html",
await TestNameParsing("https://henchan.pro/manga/15131-chuui-horeru-to-yakui-kara.html",
"*Chuui* Horeru to Yakui kara").ConfigureAwait(false);

// Символ /
await TestNameParsing("https://h-chan.me/manga/10535-blush-dc.-glava-1.html",
await TestNameParsing("https://henchan.pro/manga/10535-blush-dc.-glava-1.html",
"/Blush-DC.").ConfigureAwait(false);

// На всякий случай
await TestNameParsing("https://h-chan.me/manga/23083-ponpharse-tokubetsu-hen-chast-1.html",
await TestNameParsing("https://henchan.pro/manga/23083-ponpharse-tokubetsu-hen-chast-1.html",
"Ponpharse - Tokubetsu Hen").ConfigureAwait(false);

// Манга требующая регистрации для просмотра
await TestNameParsing("https://h-chan.me/manga/14212-love-and-devil-glava-25.html",
await TestNameParsing("https://henchan.pro/manga/14212-love-and-devil-glava-25.html",
"Love and Devil").ConfigureAwait(false);
}

Expand Down
4 changes: 2 additions & 2 deletions Tests/Tests.Entities/MangaInfos.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ public static class Acomics

public static class Henchan
{
[InfoCache("https://h-chan.me/manga/12850-twisted-intent-chast-1.html", true)]
[InfoCache("https://henchan.pro/manga/12850-twisted-intent-chast-1.html", true)]
public static MangaInfo TwistedIntent;

[InfoCache("https://h-chan.me/manga/14212-love-and-devil-glava-25.html", false)]
[InfoCache("https://henchan.pro/manga/14212-love-and-devil-glava-25.html", false)]
public static MangaInfo LoveAndDevil;
}

Expand Down
2 changes: 1 addition & 1 deletion Tests/Tests.Entities/Search/Henchan.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class Henchan : TestClass
public void SearchOnHenchan()
{
var mangas = Search("Poolside");
Assert.IsTrue(mangas.Any(m => m.Uri.OriginalString == "https://h-chan.me/manga/22839-shalosti-v-basseyne.html"));
Assert.IsTrue(mangas.Any(m => m.Uri.OriginalString == "https://henchan.pro/manga/22839-shalosti-v-basseyne.html"));

var game = Search("A Tale of Two Swords ");
Assert.IsEmpty(game);
Expand Down
2 changes: 1 addition & 1 deletion VersionInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

[assembly: AssemblyVersion("1.49.7.54")]
[assembly: AssemblyVersion("1.49.8.59")]

0 comments on commit 804c348

Please sign in to comment.