-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Help with transmission script to unrar torrents #75
Comments
Hey, and thanks :) When I exec'ed into the container it doesn't seem unrar is installed. root@3d1f6f2b91c2:/# unrar
bash: unrar: command not found When you checked 'which unrar' and it said '/bin/unrar', was that on the commandline to your Synology, or inside the container? The script will be executed by transmission inside the container where unrar does not exist. I added rar and unrar to the container, they are nice to have tools for simple scripts like this. Pull the image again using the dev tag and let me know how it goes ;) |
Man you rule! Now my script is able to unrar files - sweet. Would it be possible to add unzip, 7z or similar to the container as well? For you question about 'which unrar' I must admit that I was doing a lot of hacking while trying to make unrar work so not really sure how correct my answer would be actually. Can we just leave it at that ;) Thanks again for a fast fix! |
Haha, no worries. Let's leave it at that :) I added zip and unzip as well, I guess that covers the basics of packing and unpacking stuff. You can check it out, it's on the dev tag for now. I'm gonna merge it to master sometime soon, just got to clean up a little first. |
Fix is merged to master and available on the main tag. That should close this... |
Mange tak :-) |
Bare hyggelig |
mightymads / haugene, I realize this issue is closed but was hoping you could help shed a little light on exactly how you pointed your container to the script... I have the following simple script saved as a "unrar.sh"
In my docker run I have the following volume mounted and then in my DockerEnv, I have The unrar.sh file is placed in /share/CACHEDEV1_DATA/Library/Application Support/Transmission-AirVPN When I run the container I get the following error: What am I doing wrong? |
Hi ethanopp, Not sure I can be of much help, but I can tell you how I have configured it. In my docker run script I have added: And I have placed extract_torrent.sh in: extract_torrent.sh looks like this: Hope it helps. |
Thanks for the quick response! Looking at your code actually made me realize an error in mine... I had a space between Updating to this seems to avoid the error I was previously getting Now I'm just downloading something to see if my bash script works, may have to steal yours if it doesn't. Thanks again! |
Script doesn't seem to work when a download completes... What is odd though is if I SSH into the container and manually run the script, it works as expected. Any other ideas? I've set the scripts permissions to 0777 |
Restarted everything... seems to be working now. Thanks again for the help! |
@haugene I didn't want to open a new issue about this since it's likely intentional / by-design, but is there a chance that the image could change in such a way that automatically extracting rar/zip/etc either Just Worked(tm) or could be turned on with a single boolean setting? It's completely fine if not, of course, and this thread is perfect for how to get a script going that'll handle it, but I just wanted to see if it was possible to have something more "in the box". 😄 Maybe something like the script from @mightymads being included in the transmission dir (looks like the image already includes the things the script depends on AFAICT) so it would end up in /etc/transmission in the image, then the default TRANSMISSION_SCRIPT_TORRENT_DONE_FILENAME could point to it and a user would only need to turn on TRANSMISSION_SCRIPT_TORRENT_DONE_ENABLED for this (I would imagine common?) case? Thanks!! |
Hi! I'm not opposed to a boolean switch saying "unzip/untar stuff automatically and bundling a script for it. I'd suggest you create a new issue for it, describe the need and link it to this issue and the script you're mentioning and then see if someone can help bundle it. I'm not sure I'll be able to look at it in a while, kind of moving and changing jobs, so a lot happening :) |
Hello all, after a long journey as a total noob I got everything working thanks to countless hours of reading through this and other material, however I still lack some basic skill obviously as I cant figure out what/how to change the script to move the unpacked items in a specific directory on my data mount instead of the same directory where the rar files are. Can somebody help me? This is what I use and it works for me, thanks to @mightymads post above: And I have placed extract_torrent.sh in: extract_torrent.sh looks like this: |
@zaphod007 great work :-) Without having tried this I assume you can simply change the lines: To something like: Where PATH_TO_DIR could be something like: |
works like a charm (just needed to add a blank space between -o and PATH in the last line and path to dir= /data/unrar/, thank you so much @mightymads ! |
Just wanted to thank the poster for their script and haugene for implementing unrar and that 3 years after posting, this post is still useful. |
Hi there, found this thread while trying to implement my own unrar when a torrent is completed, so thanks all! |
Hi,
First of all thanks for making this available to the public! It works like a charm on my Synology DSM 6 and it was fairly easy to setup and configure to my liking.
I'm however having some problems trying to get transmission to automatically unpack downloaded files. I have configured transmission to execute a simple script after downloading completes using TRANSMISSION_SCRIPT_TORRENT_DONE_ENABLED and TRANSMISSION_SCRIPT_TORRENT_DONE_FILENAME, and it can navigate to the torrent using TR_TORRENT_DIR and TR_TORRENT_NAME.
The problem is that it doesn't seem like calling unrar or 7z works - or at least nothing seems to happen when calling them. If I do a 'which unrar' inside the script it correctly logs '/bin/unrar'. But when I try to unrar files nothing happens - and I have tried all sorts of different variations using relative path and absolute path to unrar, and even copying unrar to the torrent directory and calling it with "./unrar", but all to no avail.
Anything special I need to be aware of here? Is something in the nature of this setup preventing a script from executing binaries? Any help would be highly appreciated.
Thanks.
The text was updated successfully, but these errors were encountered: