Skip to content
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

Automatically extract .rar files #701

Closed
carlostiberiojr opened this issue Feb 8, 2019 · 12 comments
Closed

Automatically extract .rar files #701

carlostiberiojr opened this issue Feb 8, 2019 · 12 comments
Labels
help wanted inactivity Used by Stale bot to mark issues that will be closed

Comments

@carlostiberiojr
Copy link

Hi Guys,

I read a lot about automatically extracting any torrent downloaded with .rar parts, but I'm missing something here:

I have this configured in my docker compose:

image

Configuration done:

TRANSMISSION_SCRIPT_TORRENT_DONE_ENABLED
TRANSMISSION_SCRIPT_TORRENT_DONE_FILENAME

This is my extract_torrent.sh:

#!/bin/bash
cd ${TR_TORRENT_DIR}/${TR_TORRENT_NAME}
unrar e -o- *.rar

Still, I'm not getting my torrents to be extracted automatically...
I made a manual test on container:

docker exec -it "id of container" bash

root@09122d9e82cd:/data/completed# pwd
/data/completed

root@09122d9e82cd:/data/completed# export TR_TORRENT_DIR=/data/completed

root@09122d9e82cd:/data/completed# echo $TR_TORRENT_DIR
/data/completed

root@09122d9e82cd:/data/completed# export TR_TORRENT_NAME=Sorry.to.Bother.You.2018.1080p.BluRay.x264-DRONES

root@09122d9e82cd:/data/completed# echo $TR_TORRENT_NAME
Sorry.to.Bother.You.2018.1080p.BluRay.x264-DRONES

root@09122d9e82cd:/data/watch# . extract_torrent.sh

UNRAR 5.30 beta 2 freeware      Copyright (c) 1993-2015 Alexander Roshal


Extracting from sorry.to.bother.you.2018.1080p.bluray.x264-drones.rar

Extracting  Sorry.to.Bother.You.2018.1080p.BluRay.x264-DRONES.mkv      1%
...

I checked the logs on container and cannot see any problem with script, there is any way to see if something is wrong with this whole configuration?

Thanks in advance for the help!

@haugene
Copy link
Owner

haugene commented Feb 9, 2019

Have to come back to you on this. But the script looks good and you've verified it manually as you say.
The logs from the scripts will probably not show up in the container logs, but in the transmission.log in /data.

For reference in both issues, fixing this could also solve #615 I guess. And there was one more issue where someone was trying to run a script but something was just off. Need to search the issues for it, and don't have time now. But this is a very handy feature so we should investigate a bit :)

@billy369
Copy link

billy369 commented Feb 9, 2019

It seems to work fine for me. I'm using Docker on DSM and mounted a path to it.

Now i'm just having issues getting it to play nice with Sonarr. for some reason the extracted file ends up in the destination directory and in the original folder it is extracted to.

@carlostiberiojr
Copy link
Author

I'm just waiting for a new torrent with .rar parts to test...
I can see on logs the script being called, but nothing more (because the torrents where script was called wasn't .rar torrents)

Example:

[2019-02-07 03:06:03.393] Boy.Erased.2018.REMUX.1080p.BluRay.AVC.DTS-HD.MA.5.1-iFT moving "/data/incomplete/Boy.Erased.2018.REMUX.1080p.BluRay.AVC.DTS-HD.MA.5.1-iFT/Boy.Erased.2018.REMUX.1080p.BluRay.AVC.DTS-HD.MA.5.1-iFT.mkv" to "/data/completed/Boy.Erased.2018.REMUX.10
80p.BluRay.AVC.DTS-HD.MA.5.1-iFT/Boy.Erased.2018.REMUX.1080p.BluRay.AVC.DTS-HD.MA.5.1-iFT.mkv" (torrent.c:3157)
[2019-02-07 03:15:37.262] Boy.Erased.2018.REMUX.1080p.BluRay.AVC.DTS-HD.MA.5.1-iFT Calling script "/data/watch/extract_torrent.sh" (torrent.c:2118)
[2019-02-07 03:15:38.429] Saved "/data/transmission-home/resume/Colette.2018.REMUX.1080p.AVC.DTS-HD.MA.5.1-iFT.6004f59fc92e5755.resume" (variant.c:1266)

@Troubadoure
Copy link
Contributor

@billy369 That's how Sonarr works - it copies the file to the destination directory - it doesn't move it

@haugene
Copy link
Owner

haugene commented Mar 17, 2019

@carlostiberiojr Any update? Think I'll close this soon.

@billy369
Copy link

It's been working fine for me for about a month now. No complaints or errors I'm aware of.

@lastb0isct
Copy link

This is not working for me either. Using the same script and verified that it is executable. No idea what could be causing this as the logs don't show anything.

@lastb0isct
Copy link

I think I might know why, but not sure how to accomplish this -- when using transmission with "labels" or custom directories it does not seem to pull the proper directory with the TR_TORRENT_DIR.

@stale
Copy link

stale bot commented Apr 5, 2020

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.

@stale stale bot added the inactivity Used by Stale bot to mark issues that will be closed label Apr 5, 2020
@stale
Copy link

stale bot commented Apr 12, 2020

Note: The stale bot was recently added to this project to help weed out outdated issues. This will help us to focus time and energy on issues that are important and move the others out of the way. There could however be many issues that are still relevant but have gotten old without ever being fixed. As this is the first round of cleaning it might have been too eager. Feel free to re-open this issue if you think it deserves another look.

@d4g79
Copy link

d4g79 commented Jul 30, 2020

Do we have a solution for this. I am stuck as the script errors.
Can someone post screen shots of how they got this to work. Transmission-open vpn on OMV5

Thanks.

@d4g79
Copy link

d4g79 commented Jul 30, 2020

I have figured it out.

Running OMV5 with the Transmission-Openvpn docker. Issue was that the script would not ruin and this was due to the noexec under the disk where the script is being held. See below how to remove the noexec from the disk/s. Hope this helps others as it took me a while to find the issue and resolve it.

1. SSH your server and become root.

2. (type) nano /etc/openmediavault/config.xml (enter)

3. F6 to search. Search for "noexec" or "mntent"

4. Delete your instances of noexec. You can either delete it on all your disks, or just delete it from the disk that has this script.

5. Cntrl X, Y, then Enter to save.

6. Back at the prompt. For OMV 5: (type) omv-salt deploy run fstab (enter)
	           For OMV 4: (type) omv-mkconf fstab (enter)
7. (type) reboot (enter)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted inactivity Used by Stale bot to mark issues that will be closed
Projects
None yet
Development

No branches or pull requests

6 participants