Flutter plugin to download torrents

1,817

Solution 1

I developed Torrento package for dealing with torrents.

It has support for many torrent clients and lets you control them remotely.

Here's what you can try to download torrents:

  • Install your torrent client software
  • Setup username and password for Web Ui in the preferences.

Then you can download or add torrents etc , by including the above package in your flutter's pubspec.yaml file.

Here's a small exampel :

import 'package:torrento/torrento.dart';

QbitTorrentController obj = QbitTorrentController('192.168.0.101' , 8080) ; 
await obj.logIn('username' , 'password') ; 

await obj.addTorrent('magnet:?xt=urn:btih:0d18397945bcc9f495818aa2c823ab167dc8da5c&dn=The.Lion.King.2019.1080p.BluRay.H264.AAC-RARBG') ; 

var torrents = await obj.getTorrentsList(filter: TorrentFilter.paused) ; 

torrents.forEach((t)=>print('${t['name']} : ${t['hash']}')) ; 

print("Starting all torrents") ;
await obj.startAllTorrents() ; 

print(await obj.getVersion()) ; 

await obj.logOut() ; 

Solution 2

The torrent_task plugin is a pure dart implementation of the BitTorrent protocol.

Share:
1,817
T Hansda
Author by

T Hansda

Love to play with codes and electronics

Updated on December 06, 2022

Comments

  • T Hansda
    T Hansda over 1 year

    I want to develop a flutter app to search and download files from torrent. The searching part is done but now I'm out of any idea how to implement the download functionality.

    I want to download the actual file that the torrent file or the magnet link directing to. For example I want the app to download Linux distro from given torrent file or from given magnet link.

    Is there any plugin for this or I need to build it myself? If I need to create one, then how?