mirror of
https://github.com/hkalexling/Mango.git
synced 2025-08-03 03:15:31 -04:00
Fix timestamp precision issue in plugin
This commit is contained in:
parent
2c7c29fef9
commit
cae832911d
@ -300,7 +300,9 @@ class Plugin
|
|||||||
end
|
end
|
||||||
|
|
||||||
def new_chapters(manga_id : String, after : Int64)
|
def new_chapters(manga_id : String, after : Int64)
|
||||||
json = eval_json "newChapters('#{manga_id}', #{after})"
|
# Converting standard timestamp to milliseconds so plugins can easily do
|
||||||
|
# `new Date(ms_timestamp)` in JS.
|
||||||
|
json = eval_json "newChapters('#{manga_id}', #{after * 1000})"
|
||||||
begin
|
begin
|
||||||
json.as_a.each do |obj|
|
json.as_a.each do |obj|
|
||||||
assert_chapter_type obj
|
assert_chapter_type obj
|
||||||
|
Loading…
x
Reference in New Issue
Block a user