Closed sotiris-bos closed 1 year ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Thanks for the idea, I will try the script
This script worked better for me :
#!/bin/bash
# get a list of all torrents transmission-remote 2.52
transmission-remote --auth user:pass -t all --files > _all_torrents.tmp
# all items in this directory
for i in *
do
# is it a file or a directory
if test -f "$i" -o -d "$i"
then
# does it NOT exist in the list of all torrent files
#if [[ $all_files != *"$i"* ]]
if ! grep -Fq "$i" _all_torrents.tmp
then
# does it not start with an underscore (my special char for files in directory not related to transmission
if [[ "$i" != _* ]]
then
# delete them
echo rm -rf \"$i\"
# rm -rf "$i"
fi
fi
fi
done
# clear tmp file
rm _all_torrents.tmp
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
this would be fine as a docker mod but it isn't something we would put directly into the container. https://www.linuxserver.io/blog/2019-09-14-customizing-our-containers
feel free to create a mod and PR it to us
This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.
This issue is locked due to inactivity
Desired Behavior
Hello, I have manually added this to my transmission container, I think the userbase could benefit from it.
There is a script provided by: https://gist.github.com/alexnorton/1a6bfcf3528bd18f8dfb
This helps to identify which files and folders in the downloads directory are not a member of a torrent currently loaded by transmission. This script identifies files that are taking space in the downloads directory, files that were left there as a result of deleting a torrent but retaining the data.
The script needs modification. First of all, gawk needs to be installed because awk gives
Regex error "Repetition not preceded by valid expression"
The modified script is this:
After the script is added, the DIRECTORIES variable must be set. This could probably be automated or set by environment variables.
At last, running
docker exec transmission ./transmission_orphaned.script
reveals the orphaned downloads.This script only works when ran inside the container, because the directories are different between the container and the host. That is why I feel like it would be a nice addition to this image.