-
Notifications
You must be signed in to change notification settings - Fork 550
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: Improved date parsing for Keyoapp sites #7140
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…Keyoapp sites & fix wrong dates time
vetleledaal
reviewed
Jan 12, 2025
lib-multisrc/keyoapp/src/eu/kanade/tachiyomi/multisrc/keyoapp/Keyoapp.kt
Outdated
Show resolved
Hide resolved
…Keyoapp.kt CamelCase Co-authored-by: Vetle Ledaal <[email protected]>
Also i fixes relative date parsing, adds French support, and corrects Astral Manga date format. |
vetleledaal
reviewed
Jan 12, 2025
AwkwardPeak7
approved these changes
Jan 13, 2025
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Introduced
DateSelector
variable inKeyoapp
base class: This allows individual sites to define a custom CSS selector for the date element. The previous fixed selector (.text-xs
) failed to accurately capture the date on sites with different HTML structures, for example, it was capturing a "New" tag instead of the actual date.Updated
ReaperScans
andStarboundScans
to use specificDateSelector
values:These sites required more precise selectors to pinpoint the correct date element within their unique HTML otherwise, it would capture the "New" tag for recently released chapters.
Simplified
parseRelativeDate
function: Removed the code that sets the time to midnight because it caused incorrect chapter release times. Now, the function correctly calculates the release time by subtracting the relative time from the current time.If a chapter was released "3 hours ago" and the current time is 4:00 PM, the old code would incorrectly calculate the release time as 9:00 PM the previous day (midnight minus 3 hours). The new code correctly calculates the release time as 1:00 PM today (4:00 PM minus 3 hours).
Checklist:
extVersionCode
value inbuild.gradle
for individual extensionsoverrideVersionCode
orbaseVersionCode
as needed for all multisrc extensionsisNsfw = true
flag inbuild.gradle
when appropriateid
if a source's name or language were changedweb_hi_res_512.png
when adding a new extension