mirror of
https://github.com/hkalexling/Mango.git
synced 2026-03-20 00:00:48 -04:00
Decouple Queue and related classes from MangaDex
This commit is contained in:
18
src/plugin/downloader.cr
Normal file
18
src/plugin/downloader.cr
Normal file
@@ -0,0 +1,18 @@
|
||||
class Plugin
|
||||
class Downloader < Queue::Downloader
|
||||
@library_path : String = Config.current.library_path
|
||||
@downloading = false
|
||||
|
||||
def self.default : self
|
||||
unless @@default
|
||||
@@default = new
|
||||
end
|
||||
@@default.not_nil!
|
||||
end
|
||||
|
||||
def initialize
|
||||
@queue = Queue.default
|
||||
@queue << self
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user