Download the PHP package ohnotnow/laravel-transmission without Composer
On this page you can find all versions of the php package ohnotnow/laravel-transmission. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ohnotnow/laravel-transmission
More information about ohnotnow/laravel-transmission
Files in ohnotnow/laravel-transmission
Package laravel-transmission
Short Description Laravel wrapper for the Transmission torrent server API
License MIT
Informations about the package laravel-transmission
WIP
Laravel API wrapper for Transmission
This is a (for now) very basic wrapper around the Transmission bittorrent client's API.
For now it only supports getting a list of all current torrents, fetching a specific torrent and adding a new torrent in 'paused' mode. This was all I needed for my purposes in transcopy.
If you want a plain PHP version without the Laravel stuff have a look at the underlying library.
Installing
Assuming you have composer available :
Assuming you are on Laravel 5.5+ the package should be auto-discovered. If not you'll have to manually add it to the Providers/Aliases to add to your config/app.php
:
Usage
You need to set some environment variables first :
Then in a somewhere in your project :
You can also use the Transmission facade if you wish :
The find() method returns a single TorrentEntry class, the all() method returns a collection of them. The data is in the format provided by Tranmissions API - so for example the 'percentDone' is given as a float from 0.0 to 1.0 so you'd have to multiply it by 100 to get a 'realistic' percentage. You can get the data from them :
Using the collection from all() you can use all of Laravel's collection methods of course. For example, to get a list of torrents which are still downloading :