Skip to content

Commit

Permalink
Fix https://*lib.me/
Browse files Browse the repository at this point in the history
  • Loading branch information
OnlyFart committed Nov 16, 2024
1 parent 87a3a2d commit 70b28de
Show file tree
Hide file tree
Showing 13 changed files with 12 additions and 218 deletions.
2 changes: 1 addition & 1 deletion Core/Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>net8.0</TargetFramework>
<LangVersion>latestmajor</LangVersion>
<PackageId>Core</PackageId>
<Version>2.6.0</Version>
<Version>2.6.1</Version>
<GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using Core.Configs;

namespace Core.Logic.Getters.LibSocial.NewSocialLib;
namespace Core.Logic.Getters.LibSocial;

public class HentaiLibGetter : MangaLibGetterBase {
public HentaiLibGetter(BookGetterConfig config) : base(config) { }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using System;
using Core.Configs;

namespace Core.Logic.Getters.LibSocial.NewSocialLib;
namespace Core.Logic.Getters.LibSocial;

public class MangaLibGetter : MangaLibGetterBase {
public MangaLibGetter(BookGetterConfig config) : base(config) { }

protected override Uri ImagesHost => new("https://img33.imgslib.link/");

protected override Uri SystemUrl => new("https://test-front.mangalib.me/");
protected override Uri SystemUrl => new("https://mangalib.me/");
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using Core.Types.SocialLib;
using HtmlAgilityPack;

namespace Core.Logic.Getters.LibSocial.NewSocialLib;
namespace Core.Logic.Getters.LibSocial;

public abstract class MangaLibGetterBase : NewLibSocialGetterBase {
protected MangaLibGetterBase(BookGetterConfig config) : base(config) { }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using Core.Configs;

namespace Core.Logic.Getters.LibSocial.NewSocialLib;
namespace Core.Logic.Getters.LibSocial;

public class MangaLibOrgGetter : MangaLibGetterBase {
public MangaLibOrgGetter(BookGetterConfig config) : base(config) { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
using HtmlAgilityPack.CssSelectors.NetCore;
using Microsoft.Extensions.Logging;

namespace Core.Logic.Getters.LibSocial.NewSocialLib;
namespace Core.Logic.Getters.LibSocial;

public abstract class NewLibSocialGetterBase : GetterBase{
protected NewLibSocialGetterBase(BookGetterConfig config) : base(config) { }

private static Uri AuthHost => new("https://auth.lib.social/");

private static Uri ApiHost => new("https://api.lib.social/");
private static Uri ApiHost => new("https://api.mangalib.me/");

private static Uri BaseImageHost => new("https://cover.imglib.info/");

Expand Down

This file was deleted.

69 changes: 0 additions & 69 deletions Core/Logic/Getters/LibSocial/OldSocialLib/MangaOldLibGetterBase.cs

This file was deleted.

128 changes: 0 additions & 128 deletions Core/Logic/Getters/LibSocial/OldSocialLib/OldLibSocialGetterBase.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
using HtmlAgilityPack;
using Microsoft.Extensions.Logging;

namespace Core.Logic.Getters.LibSocial.NewSocialLib;
namespace Core.Logic.Getters.LibSocial;

public class RanobeLibGetter : NewLibSocialGetterBase {
public RanobeLibGetter(BookGetterConfig config) : base(config) { }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using Core.Configs;

namespace Core.Logic.Getters.LibSocial.NewSocialLib;
namespace Core.Logic.Getters.LibSocial;

public class SlashLibGetter : MangaLibGetter {
public SlashLibGetter(BookGetterConfig config) : base(config) { }
Expand Down
2 changes: 1 addition & 1 deletion Core/Logic/Getters/LitresGetter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ private async Task<IEnumerable<TempFile>> GetImages(HtmlNode doc, LitresBook boo
private async Task<HttpResponseMessage> GetFileResponse(LitresArt art, LitresFile file) {
var paths = new []{"download_book_j", "download_book_subscr", "download_my_book_j"};
var hosts = new List<string> { null };
if (_me.PartnerSubscriptions?.Subscriptions != default) {
if (_me?.PartnerSubscriptions?.Subscriptions != default) {
hosts.AddRange(_me.PartnerSubscriptions.Subscriptions.Where(s => s.IsActive && s.Type == (art.ArtType == LitresArtTypeEnum.Audio ? "audio" : "text")).Select(s => s.Host).Distinct());
}

Expand Down
2 changes: 1 addition & 1 deletion Core/Logic/Getters/NovelhallGetter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace Core.Logic.Getters;
public class NovelhallGetter : GetterBase {
public NovelhallGetter(BookGetterConfig config) : base(config) { }

protected override Uri SystemUrl => new("https://novelhall.com/");
protected override Uri SystemUrl => new("https://www.novelhall.com/");

protected override string GetId(Uri url) {
return url.GetSegment(1);
Expand Down

0 comments on commit 70b28de

Please sign in to comment.