lad1337 / XDM-main-plugin-repo

The official main Plugin Repository
20 stars 11 forks source link

How should you use the BlackHole downloader? #7

Open jmichiel opened 10 years ago

jmichiel commented 10 years ago

You can only configure the downloader where to put its NZBs or torrent files. If you configure a mover, you can only tell where to move to. How can you tell any of them where to look for finished downloads?

lad1337 commented 10 years ago

you don't have to ... the downloaders will report that each downloader plugin has methods to check what the status of a download is

e.g. the Sabnzbd https://github.com/lad1337/XDM-main-plugin-repo/blob/master/Sabnzbd/Sabnzbd.py#L112 this method is called periodically

BUT the BlackHole downloader does not support this ... correct you could expand it to check a folder and look for files that match a name or something and then report that back https://github.com/lad1337/XDM-main-plugin-repo/blob/master/Sabnzbd/Sabnzbd.py#L137 with the finished location (this expanding would of course require a final location config fyi if you use the word path in the config name the gui will have a folder selector if you use the word filepath its a file selector)

this location is passed to the post process scripts

fyi most plugins i make are only very basic especially the BlackHole downloader ^_^

ps the full "spec" of a plugin class is always the class itself Downloader: https://github.com/lad1337/XDM/blob/master/xdm/plugins/bases.py#L468 (if that helps)

jmichiel commented 10 years ago

Thanks for the info! If I find the time, I'll fork and update Blackhole!

BTW: there are a few typos in XDM:

lad1337 commented 10 years ago

sigh ... Thanks

And thanks :)

Torf commented 10 years ago

Be careful that plugins have to be updated with XDM when you change this kind of names.

Btw, i found some other misspelling in bases.py & pluginManager.py :