EhPanda-Team / EhPanda

An unofficial E-Hentai App for iOS built with SwiftUI & TCA.
https://ehpanda.app
MIT License
3.22k stars 211 forks source link

Fixes for Gallery and Settings Parsing Issues with Display Optimizations #384

Closed vvbbnn00 closed 1 month ago

vvbbnn00 commented 1 month ago

In this PR:

1. Fix: Unable to Parse Gallery Information

Following updates to the ExHentai site, the div element for thumbnails now appears in the format:

<div id="gdt" class="gt200">...</div>

This structure was not compatible with the current version of the app, causing parsing failures.

2. Fix: Account Configuration Parsing Issue

ExHentai’s updated configuration page has several differences from E-Hentai's, which required adjustments:

2.1 Thumbnail Size

E-Hentai:

<tr>
    <td style="padding-top:6px">Size: </td>
    <td>
        <div id="tssel">
            <div><label class="lr"><input type="radio" name="ts" value="0" id="ts_0" checked="checked" /><span></span> Normal</label></div>
            <div><label class="lr"><input type="radio" name="ts" value="1" id="ts_1" /><span></span> Large</label></div>
        </div>
    </td>
</tr>

ExHentai:

<tr>
    <td style="padding-top:6px">Size: </td>
    <td>
        <div id="tssel">
            <div><label class="lr"><input type="radio" name="ts" value="0" id="ts_0" /><span></span> Auto</label></div>
            <div><label class="lr"><input type="radio" name="ts" value="2" id="ts_2" /><span></span> Small</label></div>
            <div><label class="lr"><input type="radio" name="ts" value="1" id="ts_1" checked="checked" /><span></span> Normal</label></div>
        </div>
    </td>
</tr>

2.2 Thumbnail Rows

E-Hentai:

<tr>
    <td style="padding-top:6px">Rows:</td>
    <td>
        <div id="trsel">
            <div><label class="lr"><input type="radio" name="tr" value="0" id="tr_0" checked="checked" /><span></span> 4</label></div>
            <div><label class="lr"><input type="radio" name="tr" value="1" id="tr_1" disabled="disabled" /><span></span> 10</label></div>
            <div><label class="lr"><input type="radio" name="tr" value="2" id="tr_2" disabled="disabled" /><span></span> 20</label></div>
            <div><label class="lr"><input type="radio" name="tr" value="3" id="tr_3" disabled="disabled" /><span></span> 40</label></div>
        </div>
    </td>
</tr>

ExHentai:

<tr>
    <td style="padding-top:6px">Rows:</td>
    <td>
        <div id="trsel">
            <div><label class="lr"><input type="radio" name="tr" value="0" id="tr_0" checked="checked" /><span></span> 4</label></div>
            <div><label class="lr"><input type="radio" name="tr" value="1" id="tr_1" disabled="disabled" /><span></span> 8</label></div>
            <div><label class="lr"><input type="radio" name="tr" value="2" id="tr_2" disabled="disabled" /><span></span> 20</label></div>
            <div><label class="lr"><input type="radio" name="tr" value="3" id="tr_3" disabled="disabled" /><span></span> 40</label></div>
        </div>
    </td>
</tr>

2.3 Gallery Page Thumbnail Labeling

E-Hentai:

<h2>Gallery Page Numbering</h2>
<div class="optouter">
    <p>Show gallery page numbers:
    <div>
        <p><label class="lr"><input type="radio" name="pn" value="0" id="pn_0" checked="checked" /><span></span> No</label></p>
        <p><label class="lr"><input type="radio" name="pn" value="1" id="pn_1" /><span></span> Yes</label></p>
    </div>
</div>

ExHentai:

<h2>Gallery Page Thumbnail Labeling</h2>
<div class="optouter">
    <p>Show label below gallery thumbnails:
    <div>
        <p><label class="lr"><input type="radio" name="pn" value="0" id="pn_0" checked="checked" /><span></span> None</label></p>
        <p><label class="lr"><input type="radio" name="pn" value="1" id="pn_1" /><span></span> Page Number Only</label></p>
        <p><label class="lr"><input type="radio" name="pn" value="2" id="pn_2" /><span></span> Page Number + Name</label></p>
    </div>
</div>

3. Fix: Display Overlap in DetailView

This fix resolves the title and navigation bar overlap issue in DetailView, as shown below:

Display Overlap in DetailView
tatsuz0u commented 1 month ago

Thanks for the patch! We will review it ASAP.