Closed garnajee closed 3 months ago
does your transmission process have permission to remove files?
I still can't re-reproduce this. this library will send request data {'tag': 1, 'method': 'torrent-remove', 'arguments': {'delete-local-data': True, 'ids': [...]}}
and it's same data with web-ui
Thanks for the reply. Yes, transmission have the right permission to remove file (I'm using the linuxserver/transmission docker with the same puid/pgid as for the files. I even tried with root id).
How could I get the request data used by lib? I don't know what else to do/try.
Thanks for the reply. Yes, transmission have the right permission to remove file (I'm using the linuxserver/transmission docker with the same puid/pgid as for the files. I even tried with root id).
How could I get the request data used by lib? I don't know what else to do/try.
set logging level to debug
Thanks ! So, here is my python code for the tests:
#!/usr/bin/env python3
import logging
from transmission_rpc import Client
# Configure root logger to print DEBUG messages to console
logging.basicConfig(level=logging.DEBUG)
ip = "localhost"
port = 9091
username = "admin"
password = "admin"
client = Client(host=ip, port=port, username=username, password=password)
# Add a logger for transmission-rpc and set level to DEBUG
transmission_logger = logging.getLogger("transmission-rpc")
transmission_logger.setLevel(logging.DEBUG)
# Create a console handler for transmission-rpc logger
transmission_console_handler = logging.StreamHandler()
transmission_console_handler.setLevel(logging.DEBUG)
# Create a formatter and add it to the handler
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
transmission_console_handler.setFormatter(formatter)
# Add the console handler to the logger
transmission_logger.addHandler(transmission_console_handler)
# Remove torrent with ID 27 and log DEBUG messages
print("list:",client.get_torrents(arguments=["id", "name"]))
print("removing...")
client.remove_torrent(32,True)
And here is the full log : https://gist.github.com/garnajee/2ef96f1c7b6d64ec435fb6d00aae66a9
you can see it generate same request data
https://gist.github.com/garnajee/2ef96f1c7b6d64ec435fb6d00aae66a9#file-logs-transmission-L201
Yes, but the file still exists (not the <hash>.torrent
, just the content)
and I don't think it's possible that json only encode method
and ids
but not delete-local-data
for request body...
Can you 100% reproduce this? is there any extra log from transmission-daemon?
Hello, sorry for the late reply
I can reproduce this indefinitely. No other logs.
2nd test: https://gist.github.com/garnajee/160fd109213407b012e65b55f3022072
adding more information (tree
before/after, docker-compose.yml, file's permissions)
Ok, apologies, seems to work well finally. My fault...
services:
transmission:
...
volumes:
- ./tr-config/:/config
- - ./data:/data
volumes:
- ./tr-config/:/config
+ - ./data:/downloads
....
happy to know it's not a but 😄
I'm sorry again, I'm a bit ashamed ahah
no need for apologies
Sorry to reopen this, but it seems that I have the same issue with the lib (latest version transmission-rpc==7.0.5).
By trying to delete a torrent (the file itself and the data) using the
remove_torrent()
function, only the file (<hash>.torrent
in the transmission folder) is removed. It doesn't matter whetherdelete_data
is set toTrue
orFalse
, the torrent file is always removed. But never the contents of the torrent.Here is the json data request using the web-ui (with the webui it works fine) :
Here is my python script :
client.remove_torrent(151,True)
I don't know what else I can provide, I don't have any other logs.
Thanks
Originally posted by @garnajee in https://github.com/trim21/transmission-rpc/issues/182#issuecomment-2118863024