@@ -30,34 +30,31 @@ static EHentaiEngine() { }
3030
3131 public EHentaiEngine ( bool useExHentai = true ) : base ( EHentaiBase )
3232 {
33- IsLoggedIn = false ;
34-
33+ IsLoggedIn = false ;
3534 UseExHentai = useExHentai ;
36-
37- Jar = new CookieJar ( ) ;
35+ Jar = new CookieJar ( ) ;
3836 }
3937
4038 // NOTE: a separate HttpClient is used for EHentai because of special network requests and other unique requirements...
4139
4240#region
4341
44- public static readonly Url EHentaiIndex = "https://forums.e-hentai.org/index.php" ;
45- public static readonly Url EHentaiBase = "https://e-hentai.org/" ;
46- public static readonly Url EHentaiLookup = "https://upld.e-hentai.org/image_lookup.php" ;
47-
42+ public static readonly Url EHentaiIndex = "https://forums.e-hentai.org/index.php" ;
43+ public static readonly Url EHentaiBase = "https://e-hentai.org/" ;
4844 public static readonly Url ExHentaiBase = "https://exhentai.org/" ;
45+ public static readonly Url EHentaiLookup = "https://upld.e-hentai.org/image_lookup.php" ;
4946 public static readonly Url ExHentaiLookup = "https://upld.exhentai.org/upld/image_lookup.php" ;
5047
5148#region
5249
53- public override Url BaseUrl => IsLoggedIn ? ExHentaiBase : EHentaiBase ;
54-
55- private Url BaseUrl2 => UseExHentai ? ExHentaiBase : EHentaiBase ;
50+ public override Url Url => IsLoggedIn ? ExHentaiBase : EHentaiBase ;
5651
57- private Url LookupUrl =>
52+ private Url Url2 => UseExHentai ? ExHentaiBase : EHentaiBase ;
5853
59- // todo: handle UseExHentai
60- IsLoggedIn ? ExHentaiLookup : EHentaiLookup ;
54+ /// <summary>
55+ /// todo: handle UseExHentai
56+ /// </summary>
57+ private Url LookupUrl => IsLoggedIn ? ExHentaiLookup : EHentaiLookup ;
6158
6259 private const string HOST_EH = ".e-hentai.org" ;
6360 private const string HOST_EX = ".exhentai.org" ;
@@ -74,7 +71,7 @@ public EHentaiEngine(bool useExHentai = true) : base(EHentaiBase)
7471
7572 private Task < IFlurlResponse > GetSessionAsync ( )
7673 {
77- return Client . Request ( BaseUrl2 )
74+ return Client . Request ( Url2 )
7875 . WithCookies ( Jar )
7976 . WithTimeout ( Timeout )
8077 . WithHeaders ( new
@@ -234,7 +231,7 @@ public async ValueTask<bool> ApplyCookiesAsync(ICookiesSource source, Cancellati
234231 c |= isEh ;
235232
236233 if ( c ) {
237- Jar . AddOrReplace ( cookie . Name , cookie . Value , BaseUrl2 ) ;
234+ Jar . AddOrReplace ( cookie . Name , cookie . Value , Url2 ) ;
238235 }
239236 }
240237
0 commit comments