I've created this to scratch my own itch, but once i've tested it out i'll commit it into the repo. So with this in mind i'm just posting here to float the idea and if anyone has any improvement suggestions over my base usage of it.
The idea is that in situations where Flexget only has a magnet URL to work on it'll spin up a mini torrent client and produce a .torrent file out for the rest of the processing to use. For me this was to scratch the itch of being able to use content_size and content_filter on magnet URL torrents and also avoid the complications of groups not uploading to the torrent cache sties.
It'll spin up libtorrent to connect to the DHT and attempt to grab the full hash and produce a .torrent file in to
~/.flexget/converted/, in the event that the torrent is zero seeded or slow it'll timeout after a default of 30 seconds. If its successful it'll override the
url field on the Entry and add it to
urls, so that if it hits the torrent cache rewrite after that then it'll just skip over.
At the moment it only has the bare minimum configuration options, a timeout value so the client doesn't sit there forever and wait on a zero seeded magnet. Another option i'm thinking off is adding a "reject if conversion failed" option, at the moment it'll just fail and let the torrent_cache rewriter try its thing. The priorty is 130 but thinking about it due to the time required to actually produce the .torrent files maybe it should sit after torrent_cache.
Dependency-wise, it'll need
python-libtorrent, for someone who uses Deluge it has zero extra requirements.
So, yes, there it is, any suggestions/ideas/bitches are welcome
Oh, here is the plugin for anyone wanting to give it a go: