mirror of
https://github.com/hkalexling/Mango.git
synced 2025-08-03 11:25:29 -04:00
Base64 encode chapter IDs
This commit is contained in:
parent
031df3a2bc
commit
d862c386f1
@ -49,7 +49,7 @@ class Plugin
|
||||
"Pushing to download queue"
|
||||
jobs = matches.map { |ch|
|
||||
Queue::Job.new(
|
||||
"#{plugin.info.id}-#{ch["id"]}",
|
||||
"#{plugin.info.id}-#{Base64.encode ch["id"].as_s}",
|
||||
"", # manga_id
|
||||
ch["title"].as_s,
|
||||
sub.manga_title,
|
||||
|
@ -70,7 +70,13 @@ class Queue
|
||||
ary = @id.split("-")
|
||||
if ary.size == 2
|
||||
@plugin_id = ary[0]
|
||||
@plugin_chapter_id = ary[1]
|
||||
# This begin-rescue block is for backward compatibility. In earlier
|
||||
# versions we didn't encode the chapter ID
|
||||
@plugin_chapter_id = begin
|
||||
Base64.decode_string ary[1]
|
||||
rescue
|
||||
ary[1]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -785,7 +785,7 @@ struct APIRouter
|
||||
|
||||
jobs = chapters.map { |ch|
|
||||
Queue::Job.new(
|
||||
"#{plugin.info.id}-#{ch["id"]}",
|
||||
"#{plugin.info.id}-#{Base64.encode ch["id"].as_s}",
|
||||
"", # manga_id
|
||||
ch["title"].as_s,
|
||||
manga_title,
|
||||
|
Loading…
x
Reference in New Issue
Block a user