User Tools

Site Tools


config:transmission

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
config:transmission [2020/08/01 11:51] – created Wulf Rajekconfig:transmission [2024/07/09 15:11] (current) – [Re-add failed torrents] Wulf Rajek
Line 1: Line 1:
 ====== Transmission ====== ====== Transmission ======
  
 +===== Install =====
 +<code>
 +sudo apt-get install transmission-daemon
 +sudo service transmission-daemon stop
 +sudo vi /var/lib/transmission-daemon/info/settings.json
 +#change rcp username and password (the password can be plaintext, next restart it'll be replaced with sha1 format)
 +#add local network to rcp whitelist like 127.0.0.1,192.168.1.*
 +#set "incomplete-dir": "/var/lib/transmission-daemon/downloads",
 +#set "incomplete-dir-enabled": true,
 +#set umask to 2
 +#default torrent folder is /var/lib/transmission-daemon/downloads. place torrent in there and it will start downloading.
 +sudo usermod -a -G debian-transmission wuff
 +sudo usermod -a -G users debian-transmission
 +
 +#increase UDP buffers for uTP support
 +sudo vi /etc/sysctl.conf
 +add 
 +#UDP buffer increase for Transmission uTP support
 +net.core.rmem_max = 16777216
 +net.core.wmem_max = 4194304
 +
 +#then 
 +sudo sysctl -p
 +
 +sudo service transmission-daemon start
 +#default web interface is http://server-ip:9091
 +</code>
 +Firefox addon for adding magnet links/bt to remote transmission:\\
 +https://addons.mozilla.org/en-US/firefox/addon/transmitter-for-transmission/?src=ss
 +
 +
 +<code>
 +sudo apt-get install smbclient
 +sudo apt-get install cifs-utils
 +
 +# if wifi/bluetooth is required only:
 +sudo apt-get install wpasupplicant wireless-tools
 +####Be VERY careful with the following command and only install connman if you really need it. Connman takes over default Linux network and wifi connection settings and results in a very hard time to configure it yourself and might even result in network not to work as it's supposed to!
 +sudo apt-get install connman
 +connmanctl enable bluetooth 
 +hciconfig hci0 up
 +</code>
 +
 +
 +===== Firefox addon for remote magnet links =====
 +
 +
 +Firefox addon to add magnet/torrent links to transmission web server:
 +https://addons.mozilla.org/en-GB/firefox/addon/transmitter-for-transmission/?src=search
 +https://addons.mozilla.org/en-GB/firefox/addon/magnet-link-to-transmission/
  
 https://forum.transmissionbt.com/viewtopic.php?p=67122#p67122 https://forum.transmissionbt.com/viewtopic.php?p=67122#p67122
 +
 +===== Python script for magnet links =====
 +
  
 Python script for adding magnet links: Python script for adding magnet links:
-<code>+<code python>
 #!/usr/bin/python3 #!/usr/bin/python3
 # #
Line 47: Line 100:
  
 Python script for adding magnet links with notification (windows): Python script for adding magnet links with notification (windows):
-<code>+<code python>
 #!/usr/bin/python3 #!/usr/bin/python3
 # #
Line 135: Line 188:
     post_link(argv[1])     post_link(argv[1])
 </code> </code>
 +
 +===== Re-add failed torrents =====
 +
 +Store all current torrents in csv file, then prompt for confirmation for each failed torrent to remove it with data and re-submit it to transmission.
 +
 +<code>
 +pip install transmissionrpc
 +</code>
 +
 +<code python transmission-readd-failed.py>
 +#!/bin/python
 +import transmissionrpc
 +import csv
 +
 +# Connect to Transmission server with authentication
 +tc = transmissionrpc.Client('192.168.1.2', port=9091, user='synbt', password='synbt')
 +
 +# Retrieve list of torrents with error messages
 +torrents = tc.get_torrents(arguments=['id', 'name', 'status', 'progress', 'magnetLink', 'errorString'])
 +torrents_with_errors = [t for t in torrents if t.errorString != '']
 +
 +# Iterate over each torrent with errors
 +for torrent in torrents_with_errors:
 +    # Output the torrent information
 +    print(f"Name: {torrent.name}\nError: {torrent.errorString}")
 +
 +    # Ask for confirmation to delete and re-add the torrent
 +    confirmation = input("Delete and re-add this torrent? (y/n): ").strip().lower()
 +    if confirmation == 'y':
 +        # Delete the torrent and re-add it with the magnet link
 +        tc.remove_torrent(torrent.id, delete_data=True)
 +        tc.add_torrent(torrent.magnetLink)
 +        print(f"{torrent.name} has been deleted and re-added.")
 +    else:
 +        print(f"{torrent.name} will not be deleted and re-added.")
 +
 +# Output the torrent information to a CSV file
 +with open('torrent_info.csv', 'w', newline='') as csvfile:
 +    fieldnames = ['id', 'name', 'magnet', 'error']
 +    writer = csv.DictWriter(csvfile, fieldnames=fieldnames)
 +    writer.writeheader()
 +    for torrent in torrents_with_errors:
 +        writer.writerow({'id': torrent.id, 'name': torrent.name, 'magnet': torrent.magnetLink, 'error': torrent.errorString})
 +</code>
 +
config/transmission.1596279099.txt.gz · Last modified: 2023/05/29 11:53 (external edit)