-
Notifications
You must be signed in to change notification settings - Fork 49
Home
First you need to have a Telegram account with a Username, It's a unique name that starts with @, You can set it in the settings area of your Telegram if you haven't already.
Next you go to speak with the @BotFather to make a new bot that you'll use to interact with Transmission, Send the command /newbot to the BotFather, He will ask you which name you want for your bot, choose anything you like, I will call mine Transmission for clarity.
Then he will ask you about the username you would like to choose for the bot, this username has to be unique and ends with bot.
After that you'll get a message with your new bot URL and an HTTP API token.
Now you just execute transmission-telegram and set the flag -token= to the bot's token, and the flag -master= to your own Telegram Username NOT the bot's username that ends with bot e.g.
transmission-telegram -token=294691344:AAE0YNeGDlKnwNPG6XcXOPCe4EG5xpLEdYY -master=Adam
if your Transmission is running on http://localhost:9091/transmission/rpc without requiring authentication, it will connect to it, you can now go to your bot and send /help to get a list of commands.
Possible flags:
-
-token=Bot tokenREQUIRED. -
-master=Your Telegram username, so the bot will answer only to you, you can specify more than one masterREQUIRED. -
-url=Set to transmission's RPC url, it has to be the full url, starts withhttpand ends with/rpc. -
-username=Transmission's RPC username. -
-password=Transmission's RPC password. -
-logfile=Write logs to a file instead of STDOUT. -
-transmission-logfile=Point it to Transmission's log file to monitor torrents completion to notify upon them, Starttransmission-daemonwith the--logfileto get a log file. -
-no-liveA flag to turn off keeping the info live by updating some of the sent messages for a period of time, Helps if you're reaching some requesting limits.
These are the commands that will be available for you through the bot
-
listorliLists all the torrents, takes an optional argument which is a query to list only torrents that has a tracker matches the query, or some of it. -
headorheLists the first n number of torrents, n defaults to 5 if no argument is provided. -
tailortaLists the last n number of torrents, n defaults to 5 if no argument is provided. -
downordlLists torrents with the status of Downloading or in the queue to download. -
seedingorsdLists torrents with the status of Seeding or in the queue to seed. -
pausedorpaLists Paused torrents. -
checkingorchLists torrents with the status of Verifying or in the queue to verify. -
activeoracLists torrents that are actively uploading or downloading. -
errorsorerLists torrents with with errors along with the error message. -
sortorsoManipulate the sorting of the aforementioned commands, Call it without arguments for more. -
trackersortrLists all the trackers along with the number of torrents. -
addoradTakes one or many URLs or magnets to add them, You can send a .torrent file via Telegram to add it. -
searchorseTakes a query and lists torrents with matching names. -
latestorlaLists the newest n torrents, n defaults to 5 if no argument is provided. -
infoorinTakes one or more torrent's IDs to list more info about them. -
stoporspTakes one or more torrent's IDs to stop them. or all to stop all torrents. -
startorstTakes one or more torrent's IDs to start them. or all to start all torrents. -
checkorckTakes one or more torrent's IDs to verify them. or all to verify all torrents. -
delTakes one or more torrent's IDs to delete them. -
deldataTakes one or more torrent's IDs to delete them and their data. -
statsorsaShows Transmission's stats. -
speedorssShows the upload and download speeds. -
countorcoShows the torrents counts per status. -
helpShows this a help message. -
versionShows version numbers.
To get a notification upon a torrent completion all you have to do is run your transmission-daemon with the --logfile flag to have a log file, and run transmission-telegram with the -transmission-logfile flag and point that to the transmission log file, upon the completion of any torrent it should send you a message.