jkaberg / textractor Goto Github PK
View Code? Open in Web Editor NEWExtract torrents upon completion
Extract torrents upon completion
With current pything versions, the script causes deprecation warnings, e.g.
/config/extract.py:111: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead
logger.warn('This must be a single file torrent, exiting!')
Please consider replacing logger.warn
by logger.warning
in lines 73, 112 and 119.
In the sonarr config, what arguments do I need to send it? I don't understand how Sonarr is supposed to know which file to delete if I just run the script without arguments.
edit: they get passed automatically as environment variables i see now
Unraid: 6.8.1
Docker: 19.03.5
DelugeVPN: 2.0.4.dev23
Radarr: 0.2.0.1450
Sonarr: 2.0.0.5338
Each docker stores its script within the appdata sub-folder but it bound to the /config path for each container.
When i download a torrent with a bunch of .r# + 1 .rar file nothing seems to happen.
My downloads go into /mnt/torrents which is a cache share so that it doesnt keep ticking away on my HDDs constantly. when the torrent is finished downloading it gets moved to the /mnt/Media/.seeding share.
Does the script think that the <download_location> is the /mnt/torrents folder? as in does the execute script run before the torrent moves to its "finished" folder? would adding a delay in the script fix this perhaps? or maybe a specific argument that waits for the move to finish?
should the sonar/radar_cleanup scripts have an extension? i added .sh to them although the github shows them w/o an extension.
Am i at least on the right track here? thanks.
So tried to run this and noticed that nothing was running. Looked at deluged.log
file in my docker container and saw syntax errors around line 101. Then fixed that and go runtime errors around the use of shutil. Below is the diff of the changes I made to fix the errors.
9c9
< import shutil
---
> from shutil import which
44c44
< exec_path = shutil.which(util)
---
> exec_path = which(util)
100c100
< logger.debug('Moveing file: {0} to: {1}'.format(f, out_dir))
---
> logger.debug('Moveing file: {0} to: {1}'.format(f, out_dir)
102c102
<
---
>
I'm still trying to figure out how to work around the use of the temp dir in a docker container. Without making my docker image large enough to handle the size of any movie extracted, it will fail because of running out of space.
EDIT:
Found a quick workaround for getting the extraction out of the docker image.
temp_dir = tempfile.mkdtemp(dir='/downloads/tmp')
. Just forced the temporary directory to be inside a directory that was already mounted to somewhere outside the container.
Hi!
Thanks for these awesome scripts. I have just one tiny request:
Could you add a parameter to change the root path of the extraction directory?
The reason I'm asking is because the rar
file is on a HDD, which then gets extracted on my SSD which is not meant for storage, so I can't guarantee an archive being extracted on it will never fill it up completely. And then, of course, there's the copying overhead. Moving from HDD to SSD and back takes more time than just directly writing on the HDD.
I hope I explained the situation well and that it's an easy change if you indeed add such a parameter.
:)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.