posborne / putio-sync

Python daemon that automatically downloads files from put.io
MIT License
29 stars 12 forks source link

Feature Request - Add Upload To Put.io #22

Closed krash1220 closed 8 years ago

krash1220 commented 8 years ago

I would really like to see an option to have putio-sync watch a particular folder for torrents and upload them to a put.io account and then download them like it does now.

posborne commented 8 years ago

Here's what I think could fit the bill:

$ putiosync -w D:\Torrents\Unprocessed D:\Downloads

Where the -w option is a directory to "watch" for new torrent files. When a new torrent file is added to that directory, the daemon would automatically add it to put.io and move the torrent file to a processed directory (or maybe tag it as processed in its database; input here welcome). All you would need to do is put torrents in that folder (or have another app put them in that folder) and they would be added to put.io automatically.

posborne commented 8 years ago

There is now directory watch and basic tranmission RPC API support

krash1220 commented 8 years ago

Is this suppose to be working now or it's just added but not released?

posborne commented 8 years ago

It is in master but I have not pushed a new release to pypi (so it can be pip installed).

krash1220 commented 8 years ago

Never mind I misunderstood what your message said. I thought you meant you had not pushed a new release but it could be pip installed.

dannydan412 commented 7 years ago

How do I get the latest version with this feature? If i just clone the dir from github, how do I install it?

okmatt commented 7 years ago

@dannydan412 There's more than one way but this is how I do it on a Mac:

  1. Download the zip.
  2. Use Terminal to cd to the unzipped folder "cd ~/Downloads/putio-sync-master"
  3. Install it "sudo python setup.py install"

If you have a previous version you will need to "sudo pip uninstall putiosync"

dannydan412 commented 7 years ago

Thanks @okmatt! I'm getting the following error when running it though: 2016-12-18 01:48:58,151 | putiosync | WARNING | Starting main application 2016-12-18 01:48:58,565 | putiosync.webif.webif | ERROR | Exception on / [GET] Traceback (most recent call last): File "C:\Python27\lib\site-packages\flask-0.10.1-py2.7.egg\flask\app.py", line 1817, in wsgi_app response = self.full_dispatch_request() File "C:\Python27\lib\site-packages\flask-0.10.1-py2.7.egg\flask\app.py", line 1477, in full_dispatch_request rv = self.handle_user_exception(e) File "C:\Python27\lib\site-packages\flask-0.10.1-py2.7.egg\flask\app.py", line 1381, in handle_user_exception reraise(exc_type, exc_value, tb) File "C:\Python27\lib\site-packages\flask-0.10.1-py2.7.egg\flask\app.py", line 1475, in full_dispatch_request rv = self.dispatch_request() File "C:\Python27\lib\site-packages\flask-0.10.1-py2.7.egg\flask\app.py", line 1461, in dispatch_request return self.view_functionsrule.endpoint File "build\bdist.win32\egg\putiosync\webif\webif.py", line 145, in _view_active return render_template("active.html") File "C:\Python27\lib\site-packages\flask-0.10.1-py2.7.egg\flask\templating.py", line 127, in render_template return _render(ctx.app.jinja_env.get_or_select_template(template_name_or_list), File "C:\Python27\lib\site-packages\jinja2-2.8-py2.7.egg\jinja2\environment.py", line 851, in get_or_select_template return self.get_template(template_name_or_list, parent, globals) File "C:\Python27\lib\site-packages\jinja2-2.8-py2.7.egg\jinja2\environment.py", line 812, in get_template return self._load_template(name, self.make_globals(globals)) File "C:\Python27\lib\site-packages\jinja2-2.8-py2.7.egg\jinja2\environment.py", line 774, in _load_template cache_key = self.loader.get_source(self, name)[1] File "C:\Python27\lib\site-packages\flask-0.10.1-py2.7.egg\flask\templating.py", line 64, in get_source raise TemplateNotFound(template) TemplateNotFound: active.html

Any ideas?

ghost commented 7 years ago

I'm not a developer of putio-sync and I don't use it but the code looks good ;)

What OS are you using? What terminal app? What are the environment variables? What's the current working directory when you launch the app?

You could try to explicitly define the relevant paths.

Add this to putio-sync/webif/webif.py:

self.app.root_path = os.path.dirname(os.path.abspath(__file__))

Maybe use instance_path instead as mentioned here.

You would add the code here.

And you might have to add import os to the top of the same file.

Hope that helps!

ghost commented 7 years ago

Oh... Your using Windows? Thats a shame. :worried: Which means your probably using the Windows command interperter aka command prompt. I should have realized that from the path at first glance.

Anyways... I actually don't want to help you because of that. :laughing: