qbittorrent / qBittorrent

qBittorrent BitTorrent client
https://www.qbittorrent.org
Other
28.56k stars 4k forks source link

[Proposal] Create .torrent (with Bitcoin url support) #2169

Open gubatron opened 10 years ago

gubatron commented 10 years ago

Hi there, I was at first wondering if you'd be interested in receiving a pull request with an enhanced "Create .torrent" dialog that would enable qBittorrent users to specify donations/tips urls.

I just tried the app for the first time and I believe you don't have a feature to create .torrents yet.

I'd like to volunteer to create such feature, it'd look a lot like the one I implemented for FrostWire.

Torrent contents, tracking, web seeds screen shot 2014-11-15 at 5 28 52 pm

Donations/Tips support (would do Bitcoin and any URL), the enhanced .torrent info dictionary would be compatible with FrostWire's proposed specs

screen shot 2014-11-15 at 5 12 29 pm

Adding licensing info (probably not for first pull request) screen shot 2014-11-15 at 5 12 24 pm

Is this something you guys would like to have in your client?

sorokin commented 10 years ago

Personally I like both these features. I wonder if they would be widely used or not.

I don't know the best way to integrate them in the current torrent creation dialog. Or should this dialog be redesigned in someway.

gubatron commented 10 years ago

@sorokin for the life of me I could not find the current dialog (as a user, so I didn't search for it in the code), please tell me where it is in the UI to take a look.

sorokin commented 10 years ago

I have it as a first item in Tools menu:

create-dialog1

I uses git master.

gubatron commented 10 years ago

oh! thank you (should probably have that in Files)

gubatron commented 10 years ago

beautiful, I'd just put the current widget as the first page of a QTabWidget and add the rest.

sorokin commented 10 years ago

Before you get started I think we should wait for a maintainer to answer if he is ready to accept this change.

gubatron commented 10 years ago

sure, thanks for letting me know.

sledgehammer999 commented 10 years ago

And where would you put the license/tip info? In the comment section?

gubatron commented 10 years ago

no, if you want license, it'd be a tab of its own, as in the case of picking a creative commons license it's not that simple (you have to give attribution, and you want the user to acknowledge they're not going to be faking someone else's identity)

check the screenshots @sledgehammer999

sledgehammer999 commented 10 years ago

No I didn't mean visually. I meant how the actual .torrent file is constructed and where in the file are the licensing/tips info saved. The comment section of the file? AFAIK, the torrent specification doesn't have separate sections for licensing/tips.

sorokin commented 10 years ago

Here is some documentation: https://github.com/frostwire/frostwire-desktop/wiki/Extending-a-Torrent's-info-map-with-Cryptocurrency-Wallet-addresses-and-a-Creative-Commons-license.-BitTorrent-meets-Bitcoin#integrating-licensing-and-crypto-wallet-metadata-into-the-torrent

gubatron commented 10 years ago

check this torrent, not in the comment's section. it's much better to have a formal abstraction. It has it's own dictionaries, one for licensing, another for payments/tips.

They go inside info, so they cannot be tampered without changing the infohash of the .torrent.

Here's an example torrent info from a real torrent (depicted in JSON):

{
//all other info fields, and then the new ones  
...
paymentOptions : {
   'bitcoin' : 'bitcoin:14F6JPXK2fR5b4gZp3134qLRGgYtvabMWL',    
   'paypalUrl' : 'http://www.frostwire.com/give',    
   'isDct' : true
   } ,
license : {  
   'open-source' :   {   'attributionAuthor' : 'FrostWire LLC',    
                                  'attributionTitle' : 'FrostWire 6.0.0',    
                                  'attributionUrl' : 'http://www.frostwire.com',    
                                  'licenseUrl' : 'https://www.gnu.org/licenses/gpl.html',    
                                 'isDct' : true }
   } ,
name.utf-8 : 'frostwire-6.0.0.windows.coc.premium.exe'  
}

Here's the sample torrent if you want to see the bencoding, or bedecode for yourself http://dl.frostwire.com/frostwire/6.0.0/frostwire-6.0.0.windows.coc.premium.exe.torrent

sledgehammer999 commented 10 years ago

-I didn't actually read the links yet- Next question: Is anybody else(client) supporting this? Because we'll have users complain "utorrent doesn't display my licensing info to end users" etc. And we might end up implementing a feature that will never be useful. Note: I am not against it yet.

gubatron commented 10 years ago

no it'd be only frostwire and qbittorrent, so I thought the best way to get adoption is me building this for every client that's willing to accept it. utorrent is not open, so it will be a matter of all open clients implementing this and then people will ask them to include it.

I'll also be implementing an open source (simple) command line tool based on libtorrent, that allows you to create bitcoin enabled torrents, this way it's less effort/lazyness for other developers to have the feature.

sledgehammer999 commented 10 years ago

I think I am positive to this. I need to study the links. If I don't answer in a few days feel free to ping me again the coming weekend.