Unofficial Deluge 2 for Windows 7 + 10

Specific support for Deluge on Microsoft Windows OS
fmar
Leecher
Leecher
Posts: 73
Joined: Sun Mar 08, 2020 5:34 pm

Re: Unofficial Deluge 2 for Windows 7 + 10

Post by fmar »

sscsr1 wrote: Wed Sep 15, 2021 2:38 am ...
Have you tried the AutoAdd plugin?
Ironclad17
New User
New User
Posts: 6
Joined: Sun Jul 07, 2019 11:30 pm

Re: Unofficial Deluge 2 for Windows 7 + 10

Post by Ironclad17 »

dev70 and 2.0.3 seem to break YaRSS2

Code: Select all

(2021-09-22T17:13:08): Exception occured in feedparser: <urlopen error unknown url type: https>
(2021-09-22T17:13:08): Feedparser was called with url: 'https://nyaa.si/?page=rss&u=AkihitoSubsWeeklies' using cookies: '{}' and User-agent: 'Deluge v2.0.4.dev70 YaRSS2 v2.1.5 Windows/10'
(2021-09-22T17:13:08): Stacktrace:
!! Traceback (most recent call last):
!!   File "c:\users\user\appdata\roaming\deluge\plugins\yarss2-2.1.5-py3.9.egg\yarss2\rssfeed_handling.py", line 185, in get_rssfeed_parsed
    parsed_feed = fetch_and_parse_rssfeed(rssfeed_data["url"], user_agent=user_agent,
!!   File "c:\users\user\appdata\roaming\deluge\plugins\yarss2-2.1.5-py3.9.egg\yarss2\rssfeed_handling.py", line 104, in fetch_and_parse_rssfeed_atom
    result = http.download_file(url_file_stream_or_string, site_cookies_dict=site_cookies_dict,
!!   File "c:\users\user\appdata\roaming\deluge\plugins\yarss2-2.1.5-py3.9.egg\yarss2\util\http.py", line 48, in download_file
    data = feedparsing._open_resource(url_file_stream_or_string, etag, modified, user_agent, referrer,
!!   File "c:\users\user\appdata\roaming\deluge\plugins\yarss2-2.1.5-py3.9.egg\yarss2\util\feedparsing\api.py", line 110, in _open_resource
    return http.get(url_file_stream_or_string, etag, modified, agent, referrer, handlers, request_headers, result, timeout=timeout)
!!   File "c:\users\user\appdata\roaming\deluge\plugins\yarss2-2.1.5-py3.9.egg\yarss2\util\feedparsing\http.py", line 184, in get
    f = opener.open(request, timeout=timeout)
!!   File "urllib\request.py", line 517, in open
!!   File "urllib\request.py", line 539, in _open
!!   File "urllib\request.py", line 494, in _call_chain
!!   File "urllib\request.py", line 1417, in unknown_open
!! urllib.error.URLError: <urlopen error unknown url type: https>
Changing the url to http doesn't help either. I tried deleting the plugins .config files and creating a new rss feed too.
mhertz
Moderator
Moderator
Posts: 1288
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Unofficial Deluge 2 for Windows 7 + 10

Post by mhertz »

fmar, thanks again for your contribution, you're a class act :)

Anyway, based on above report, I came to think about something I once encountered, and after downloading and extracting the portable archive you provide to check, then I suspect the culprit is same i.e. missing openssl dll's(libssl.dll/libcrypto.dll). I once had my scripts delete these from main folder, as thought they where redundant when allready under 'Lib' also, but found that they need be there so I changed scripts back to not delete them anymore, as too found issue with yarss2 when testing something for that. Libtorrent is linked against it's own openssl and uses that, but python itself when not using libtorrent, e.g. yarss2 does need these two dll's shipped with python, so I would advice that you don't delete them, but up to you of-course. Also I saw the two geoip dat files where 0kb, which I also encountered once, where the url was down at the time the files where requested. Hmm, are you using an old version of my scripts? Granted I don't work on them anymore as said, but I once changed the link to a more stable link because of this, and also changed the deleting of these two openssl dll's to not happen anymore also, so could sound like you use little older version, or else you just yourself got that idea too, and was unlucky at the time of retrieval of the geoip databases.

@ironclad17, i'm guessing if you download the python embeddable zip package and extract it and copy libssl and libcrypto dll's into your main install folder then should work, but just guessing mind you. I know you stated to have tried with http link too, but still the links in feed often are https anyway regardless I found.

https://www.python.org/ftp/python/3.9.7 ... -amd64.zip

Edit: first two links here for the geoip databases, if interested: https://mailfud.org/geoip-legacy/
fmar
Leecher
Leecher
Posts: 73
Joined: Sun Mar 08, 2020 5:34 pm

Re: Unofficial Deluge 2 for Windows 7 + 10

Post by fmar »

Thank you @Ironclad17 for reporting the issue and @mhertz for the great help, as always :)

There were some new commits to the dev build, so I thought about building a new dev version the coming week. I will have a look at the issues, the scripts and include the YaRSS2 plugin in my tests. Expect a new build in october 8-)
therobin
New User
New User
Posts: 6
Joined: Fri Mar 12, 2021 12:00 am

Re: Unofficial Deluge 2 for Windows 7 + 10

Post by therobin »

Not sure if this is specific to your build but with the latest windows 7 build, I am unable to apply a speed limit. Everytime I click a speed limit settings, it just ignores it.

However, if I restart the GUI, it will falsely show the last speed limit I attempted to select as the current active speed limit even though the daemon is still active without the speed limit.
fmar
Leecher
Leecher
Posts: 73
Joined: Sun Mar 08, 2020 5:34 pm

Re: Unofficial Deluge 2 for Windows 7 + 10

Post by fmar »

mhertz wrote: Thu Sep 23, 2021 6:41 pm fmar, thanks again for your contribution, you're a class act :)

Anyway, based on above report, I came to think about something I once encountered...
Hi mhertz,

thank you for your kind words and the advice to place the OpenSSL libraries in the Deluge folder!

I'm still working on some issues, since a lot has changed regarding mainly Python and its related components :evil:

I have tried several different OpenSSL versions and builds, but most of them didn't work. The only one that did was 1.1.1i from slproweb.
I also looked up how to build OpenSSL, but that also didn't change anything.
Finally I found a nice repositoy that provides Python 3.8 and OpenSSL binaries. And the OpenSSL library included is actually working with the YaRRS2 plugin. Funilly enough those libraries won't work with libtorrent, so I still need to build another version.

Then there was the issue that python.org stopped providing Windows binaries for 3.8, but I also found them on that github repo.
Same thing for the Nuget package you are using in your scripts, the last version is for Python 3.8.10. Also found on the github repo.
I think about getting in touch with the user that provides the binaries, maybe he likes to share his build scripts :)

Another issue was with the Python version used. The grep in your scripts is only checking for single digit versions, so all the builds I've done were actually using 3.8.9.

And last but not least the GeoIP issue: last time I built Deluge I had some trouble with the installer script (because of the included themes). So I executed them a lot of times. But each time the script downloads the GeoIP from the server, wich got my IP banned for some time and the downloaded files were empty :lol:

That was my little journey during the weekend. I'm finishing up the Windows 7 build right now and will move on to the Windows 10 version in the next days.
Last edited by fmar on Mon Sep 27, 2021 2:52 am, edited 2 times in total.
fmar
Leecher
Leecher
Posts: 73
Joined: Sun Mar 08, 2020 5:34 pm

Re: Unofficial Deluge 2 for Windows 7 + 10

Post by fmar »

Ironclad17 wrote: Wed Sep 22, 2021 9:21 pm dev70 and 2.0.3 seem to break YaRSS2
...
Have you tried the workaround that mhertz suggested? That worked fine in my own tests.
The Windows 10 built will probably need some additional days to mature.
highvoltage
Member
Member
Posts: 31
Joined: Mon Apr 11, 2016 11:11 pm
Location: Brazil

Re: Unofficial Deluge 2 for Windows 7 + 10

Post by highvoltage »

Thanks very much fmar, for all works

Edit 2021-09-27: The current versions have empty GeoIP files and issues with some plugins. Fix is upcoming

I will be looking forward to testing the new update.
therobin
New User
New User
Posts: 6
Joined: Fri Mar 12, 2021 12:00 am

Re: Unofficial Deluge 2 for Windows 7 + 10

Post by therobin »

The speed limit issue I was having with dev70 is no longer occurring after updating to dev77.

Thanks for keeping the builds coming.
mhertz
Moderator
Moderator
Posts: 1288
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Unofficial Deluge 2 for Windows 7 + 10

Post by mhertz »

@fmar,

Thanks bro, likewise! :)

Sorry about the grep mistake, good catch.

About openssl, then yeah python comes by default with _ssl/_hashlib modules which is linked dynamically to the two openssl dll's also provided, and e.g. used by yarss2 etc(python apps importing ssl module, imports/needs these dll's), but for torrenting specifically then libtorrent is dynamically linked to the dll's in openssl-build folder and so needs those specifically. I just thought most about libtorrent using the newest, so never dwelled that deep into it, but just now read up little more on it, and it seems there is a file that maybe need patched for this to work with just replacing dll's to newer, but then another user reported having succes simply by adding an additional build option 'no-asm' when building openssl, so probably the dll's supplied with python is build with that flag too, though I thought to myself this should theoretically losse little performance as it disables some assembler routines and falls back to C routines instead, but nonetheless. Here's the thread if interested: https://discuss.python.org/t/how-are-th ... llers/6909

Last, I used to have my openssl script just download and unpack the prebuilt openssl from slproweb site, but I later changed to build openssl from source/scratch because then could enable LTO(WPO) optimization(like libtorrents), since that is the most CPU intensive task during torrenting, as every transferred block is hash-checked against those openssl libs for integrity check(and so not just about the hashing seen at end of download). You can go little back in the openssl script history on my github if wanted and instead use the other older version which just downloads/unpacks latest prowebssl prebuilt versions, if preferred instead, though without LTO(WPO) optimization, but don't know how much faster it improves honestly, but just thought why not. For your issue specifically you could keep as is, and try add that 'no-asm' flag and see if you can just replace dll's when building with that, just remember rename the dll's as I believe names little different if remember right.

Good job again mate!

Edit: Also nice repo you found for latest 3.8.x - the author builds from official source, so should be by this Readme, and other stuff therein like build.bat etc. https://github.com/python/cpython/tree/v3.8.12/PCbuild

There's also official python windows binary dep section here: https://github.com/python/cpython-bin-deps, under 'Releases', but probably same as included officially anyway.

I think see python officially builds openssl with no-asm config option, so in feature if wanted, then as previously stated can just add that switch to my openssl build-script and see if works replacing official dlls with newly built version, or else need patch uplink.c from openssl additionally, which also looks like is done with there(python's) openssl vc project file i.e:

Code: Select all

<Target Name="_PatchUplink" BeforeTargets="Build">
    <PropertyGroup>
      <Uplink>$(opensslDir)\ms\uplink.c</Uplink>
      <BeforePatch>((h = GetModuleHandle(NULL)) == NULL)</BeforePatch>
      <AfterPatch>((h = GetModuleHandleA("_ssl.pyd")) == NULL) if ((h = GetModuleHandleA("_ssl_d.pyd")) == NULL) if ((h = GetModuleHandle(NULL)) == NULL /*patched*/)</AfterPatch>
    </PropertyGroup>
(If no-asm not enough and need apply above mod additionally, then just one line needs replacing i.e BeforePatch content with AfterPatch content in openssl/ms/uplink.c after the git clone and before the perl command e.g a single sed line could be added to my openssl build-script doing this, and no-asm switch added to perl command probably also needed - then in deluge build scripts the built dlls from openssl-build could be copied over and overwrite the old dlls included with python.)
Post Reply