BiglySoftware / BiglyBT

Feature-filled Bittorrent client based on the Azureus open source project
https://www.biglybt.com
GNU General Public License v2.0
1.6k stars 154 forks source link

It would be great to be able to toggle networks based on tags #90

Closed ghost closed 7 years ago

ghost commented 7 years ago

It would be great to be able to toggle networks based on tags !

parg commented 7 years ago

You can do it via a script using the 'execute on assign' tag feature (right-click on the tag in sidebar to set this)

For example

javascript( var ta = pi.getTorrentManager().getAttribute( com.biglybt.pif.torrent.TorrentAttribute.TA_NETWORKS); var StringArray = Java.type("java.lang.String[]"); var nets = new StringArray(1); nets[0] = com.biglybt.core.util.AENetworkClassifier.AT_I2P; download.setListAttribute( ta, nets ))

sets assigned downloads to just be the I2P network.

Has to be a single line of script if you enter it directly.

ghost commented 7 years ago

that sounds great - can trackers also be added with javascript ?

parg commented 7 years ago

trackers can be added more simply by using 'tracker templates' - https://github.com/BiglySoftware/BiglyBT/wiki/Tags#Tracker_Templates

ghost commented 7 years ago

Yes i know - but in the stage of metadata download there is no option for this except scripts. Thanx for the support !

parg commented 7 years ago

ah, metadata download... that's a quantum download, exists and doesn't. You could add an &tr= argument to the magnet link ;)

ghost commented 7 years ago

so the javascript could append &tr= to the url in the metadata phase ?

parg commented 7 years ago

no :( I meant you could manually add it to the magnet before entering it in BiglyBT (obviously not a very good solution)

I can add a 'isMagnet()' method to the Tag Constraints language that would allow you to use Tracker Templates to do this, that work for you?

parg commented 7 years ago

it'll be in next beta

ghost commented 7 years ago

That would be fantastic - thanx for your excellent support ! Do you have a donation link for your project ? Many of the UI links don't work if you're on i2p only - any chance getting those using the i2phelper ?

parg commented 7 years ago

There's the Donation Help menu option but that won't work with I2P only of course - good point about links in an I2P only setup - many of them allow you to right-click and select the URL which you can then manually paste into a TorBrowser (for example) - if you have the TorBrowser plugin installed then that's one way of getting that.

You can donate btc at 1BiGLYBT38ttJhvZkjGc5mCw5uKoRHcUmr - thanks :)

ghost commented 7 years ago

The isMeta works like a charm ! Thumbs up - hands down :-)

parg commented 7 years ago

excellento!