[Plugin] Don't add torrent name to path

Suggest, post, or discuss plugins for Deluge
mhertz
Moderator
Moderator
Posts: 1288
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: [Plugin] Don't add torrent name to path

Post by mhertz »

mombolut
New User
New User
Posts: 2
Joined: Mon Jun 07, 2021 6:53 pm

Re: [Plugin] Don't add torrent name to path

Post by mombolut »

Could someone please update this plugin so it works with Python 2.7 and 3.9? I can't get it to work myself.
The source code is still available at https://github.com/tillkrischer/nofolder
(I'm using Deluge on a Synology NAS (2.0.3 Python 2.7) and Deluge on Windows (2.0.4 Python 3.9) as a Thin-client.)
mhertz
Moderator
Moderator
Posts: 1288
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: [Plugin] Don't add torrent name to path

Post by mhertz »

I updated plugin to deluge2, and also added magnet support additionally.

There's an error posted in log very first time enabling plugin, but can be ignored, and was to lazy to spend more time on it today than already did.

When adding magnets, then real metadata handler added, instead of quick time.sleep() hack I used to add in older days, e.g. in this thread previously etc, thanks bdutro for inspiration(from his labelplus fork). There's still an index out of range error shown in log when adding magnet, which also was before I updated it, and again not more time atleast today to try fix that, but works now atleast, so again just cosmetic.

I built it also for python2 as was requested in the post above.

Tested it quickly in python2 and python3, in both options provided and with torrent and magnet.

NoFolder-0.2.egg (Deluge2 py-3.x version)

NoFolder-0.2.py2.7.egg (Deluge2 py-2.7 version, for some NAS setups etc. - Not a deluge1 plugin, as uses gtk3 etc)

Edit: Fixed the cosmetic issues of error in log upon enabling/disabling plugin, and made it shut up about index-error/keyerror when using magnets, so no errors shown currently in my quick testings.
mombolut
New User
New User
Posts: 2
Joined: Mon Jun 07, 2021 6:53 pm

Re: [Plugin] Don't add torrent name to path

Post by mombolut »

Wow, I'm really grateful!
A huge thank you!

It works perfectly! Now I can finally use my NAS to seed!
mhertz
Moderator
Moderator
Posts: 1288
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: [Plugin] Don't add torrent name to path

Post by mhertz »

You're very welcome, and thanks for your post mate :)
KeganO
New User
New User
Posts: 2
Joined: Thu Aug 05, 2021 4:13 am

Re: [Plugin] Don't add torrent name to path

Post by KeganO »

mhertz wrote: Fri Jun 11, 2021 7:33 pm I updated plugin to deluge2, and also added magnet support additionally.

There's an error posted in log very first time enabling plugin, but can be ignored, and was to lazy to spend more time on it today than already did.

When adding magnets, then real metadata handler added, instead of quick time.sleep() hack I used to add in older days, e.g. in this thread previously etc, thanks bdutro for inspiration(from his labelplus fork). There's still an index out of range error shown in log when adding magnet, which also was before I updated it, and again not more time atleast today to try fix that, but works now atleast, so again just cosmetic.

I built it also for python2 as was requested in the post above.

Tested it quickly in python2 and python3, in both options provided and with torrent and magnet.

Rename to match python version if needed.

NoFolder-0.2-py3.9.egg

NoFolder-0.2.py2.7.egg

Edit: Fixed the cosmetic issues of error in log upon enabling/disabling plugin, and made it shut up about index-error/keyerror when using magnets, so no errors shown currently in my quick testings.
Would it be possible to get this for Python 3.8? If so that would be awesome!
mhertz
Moderator
Moderator
Posts: 1288
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: [Plugin] Don't add torrent name to path

Post by mhertz »

You can simply rename the plugin filename to ''NoFolder-0.2-py3.8.egg(or 'NoFolder-0.2.egg') and it should work for you. If not, then I'll built it for you with py3.8 :)
KeganO
New User
New User
Posts: 2
Joined: Thu Aug 05, 2021 4:13 am

Re: [Plugin] Don't add torrent name to path

Post by KeganO »

mhertz wrote: Thu Aug 05, 2021 7:07 am You can simply rename the plugin filename to ''NoFolder-0.2-py3.8.egg(or 'NoFolder-0.2.egg') and it should work for you. If not, then I'll built it for you with py3.8 :)
Sadly renaming it didn't seem to work, could you please build for 3.8 that would be awesome! :)
mhertz
Moderator
Moderator
Posts: 1288
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: [Plugin] Don't add torrent name to path

Post by mhertz »

Here you go, py38 rebuild: NoFolder-0.2.egg - I tested it on a deluge2 venv I spun up using py38 and it worked with enabling plugin and downloading test-torrent adding new dir correctly for the single file as I had defined in plugin settings.

@all, I don't have time to investigate now, why not works with renaming, as perplexing me honestly, and also just reproduced myself. When "building" plugin that simply means zipping it up with some metadata generated by setuptools, behind the scenes, and the '*py-x.x* notion only refers to current installed version, which setuptools thinks you've tested your code with and is compatible', but however, the code in plugin is from 2015, and only a readme update in 2019, so defenitelly not py3.9-only code in there, and then I updated plugin to work on deluge2 and added magnet propper support, which again wasen't py39-only code, but anyway, will look into that later, and now there's atleast a py38 and py39 version(plus the deluge2 py2 version for some NAS setups etc).

Edit: Fixed the issue, and also updated original post with updated link. The issue was that I had changed to a custom PKG-INFO metadata file to shut up deluge showing an error upon enabling plugin because didn't support newest setuptools introducing a change to description field now appearing in payload and not header anymore(I reported here previously: https://dev.deluge-torrent.org/ticket/3476). That custom file wasen't working propperly on both py38 and py39, so I exchanged it out again with a propper version generated from a previous version of setuptools deluge supporting. Thanks for making me aware KeganO :)
Post Reply