Page 9 of 66

Re: Deluge 2.0 Windows 7z-sfx-installer available.

Posted: Fri Nov 08, 2019 10:39 pm
by idiocracy
mhertz wrote:Nice :)

For me it did remember resizing and placement of columns, but only tested it one time and with limited adjustments done - I added two new columns and changed placement of some and resized one of the columns much bigger, and after a restart, the changes where persistent.

Btw, I saw you posted in the addtorrentcheck plugin thread, and i'm sorry for giving you badly worded directions possibly before, but just for others not f***'ing there deluge2 up, because of me, then the file to replace is:

"C:\Program Files\Deluge2\Lib\site-packages\deluge\core\torrentmanager.py"

(I just meant the file to replace where in core folder, but not to overwrite the core folder. Also, it's ending in .py and not .pyc in deluge2).

Lastly, are you sure you need to enable logging for getting the plugin to work? I mean of course it's nice to see progress and how it goes, but for the functionality to work then i'm doubting it's needed, but could be wrong of course :)
Actually, i am not entirely sure. I think it was because the plugin reads the tracker status, time stamps from the log, isn't that why it's importing the log?

Code: Select all

import time
import logging
from deluge.log import LOG as loglog.info("[AddTrackerCheck](%s)(%s) : %s", torrent_id, time.time() - tid_status['time_added'], tid_status['tracker_status'])
I did understand that you were just overwriting the file inside the \core dir, changed it for clarity. The zip only contains the file, so even if you tried you could not overwrite the \core dir and mess anything up, all that could happen is extract to wrong dir and then nothing would happen.

Re: Deluge 2.0 Windows 7z-sfx-installer available.

Posted: Sat Nov 09, 2019 12:34 am
by mhertz
I checked through the code again, and your quote, and no it don't need access to your log on disk, or enabled log at all. it doesn't check the log for tracker status, but directly queries deluge through TorrentManager component and get_status(), as far as I can tell with my limited experience with this :)

Anyway, to be sure, then I hacked your plugin up to simply force-reannounce no matter what the checks results too, and then I enabled it in deluge instead of the old version, and then I used ipmagnet site, well it was down now, so I used an alternative at torguard's site, and there I could see that it continued to show my IP(so force-reannouncing behind the scenes), again and again, whereas it normally only does it once or twise, and then waits a long time for showing it again, so I could conclude that it works without access to your saved log on disk, or even enabling logging at all.

It does need the logging-component, as it logs info messages for clarity, internally, and which you can see if enabling logging yourself, but if not enabling it, then those messages are made still, but just not shown to you. I could delete that functionality also, but nice to have for debugging, and don't hurt anything.

Thanks for changing the post, and I didn't knew that, thanks :)

Re: Deluge 2.0 Windows 7z-sfx-installer available.

Posted: Sat Nov 09, 2019 11:27 am
by idiocracy
I see, guess i misunderstood that part then, thanks for clarifying.

Re: Deluge 2.0 Windows 7z-sfx-installer available.

Posted: Mon Nov 11, 2019 5:45 pm
by idiocracy
Running fine so far, the only thing i've noticed that i'm pretty sure is a bug of some sort. Whenever the UI is open, the cpu usage goes through the roof. Open UI not in focus ~5/9% cpu usage, open UI not in focus but moving mouse over the UI ~35/45% cpu usage, open UI in focus 50/65% cpu usage, minimized ~3.5/6% usage.
I'm fairly sure it isn't supposed to behave like that. I'm guessing it's a deluge thing and has nothing to do with these builds.

Re: Deluge 2.0 Windows 7z-sfx-installer available.

Posted: Tue Nov 12, 2019 2:48 am
by yziecg
I don't understand why you don't just have C:\Program Files\Deluge2\gvsbuild\release\bin added to the PATH env variable for the session, it should be rather trivial and doesn't make any permanent changes, only affects child processes. It is essentially the same way Linux handles env variables.

Re: Deluge 2.0 Windows 7z-sfx-installer available.

Posted: Tue Nov 12, 2019 12:17 pm
by mhertz
@idiocrazy, I see, bummer, that's annoying, though I couldn't really reproduce it in my VM, though also have only 1 torrent loaded, maybe that's why, or something else different between our systems. When having deluge minimized or maximized it uses roughly the same, and when having another window in foreground and placing mouse in deluge window and going little back and fourth with the mouse on there, then the cpu goes up alot more, but settles back, alittle after, but the same happens in qutebrowser for me, and also firefox, so unrelated. Do others experience this too? (I mean what idiocrazy reported, not me)

@yziecg, I would, but deluge is exe "compiled", and even if straight py file, I don't know if I could code it into deluge directly.

Other than this, then I thought about e.g. using a batchfile to run deluge which set the path first, but then the command-prompt need stay open afterwards, and even if I could hide it, it would be messy imho, as the shortcut I made works perfectly and is simple, and only is an issue if needing browser-integration and there people can easily add it themselves(I mean add to path env-var themselves, and I posted instructions for it a couple posts above or so).

I also thought about, and tested, using env.exe from gnuwin32, which would shortly blink a cmd window upon start and also would still not work with browsers, unless using a batchfile which not all browsers support opening torrents from, and so I still prefer the shortcut current method. For others BTW, only the gtk ui needs a special shortcut which I made and included, but the daemon and webui works without.

As stated originally in this thread, I stopped adding to path with my installer, because it would rarely e.g. mess up your path, like trippling severel items, and upon uninstall, then it once deleted one of my lines it shouldn't have, which several also reported online likewise behaviour, and so even though my installer also backed it up first, just in case, then I didn't liked it regardless, as if reinstalling multiple times without noticing then you could get in trouble possibly - and I always had to mention a warning with every release about using at own risk, which I don't need now as cannot anymore f*** your system up, except maybe your old torrents, but I have often mentioned to back your profile-folder up firstly.

Have you a better suggestion? :).

Re: Deluge 2.0 Windows 7z-sfx-installer available.

Posted: Wed Nov 13, 2019 12:46 am
by mhertz
I researched the above again, and found a clever method to get the addition to path env-var only for the session and so without needing a special shortcut anymore, so now the deluge.exe file will work standalone and e.g. also when defined as torrent/magnet-handler in a browser.

I found that you could add a file with pth extension into site-packages folder and which upon starting a python app, then each line in that file would get appended to the library search path for python modules. This didn't work with simply adding the gvsbuild folder path to that, as we need changing the actual path env-var, and not just using a library-search path addition. However, there where also allowed to get python-code executed from said pth file, so when adding a line starting with import, then that single line would be executed, so I looked up how to add to path env-var from python, and added that code as single line with semi-colon as delimiter, and starting with import, into such a pth file, which I included under site-packages folder, and it worked, so I updated the installer and the link in first post. For now i've only updated the alternative installer with newest libtorrent v1.2.2 though. You can just install over the previous install and not needing uninstall first.

Thanks for prompting me to look into this again yziecg! :)

(Note, as this is the only change done, then if not really affecting you, then no need to update really)

Re: Deluge 2.0 Windows 7z-sfx-installer available.

Posted: Fri Nov 15, 2019 8:58 pm
by eddycatboy
I just wanted to let you know, when i installed Deluge 2.0 with my old Deluge 1.3.15, it completely removed my torrents in 1.3 and didn't show up in 2.0. It only was until i put 2.0 on thin client, then put back 1.3 on classic mode and put 2.0 on back to standalone again, all of my torrents came back just like before.
It's only until now, all of my torrents are gone out of nowhere, even after uninstalling 2.0 there still gone.
I still have all of torrents in /state and /archive with my old tracker icons on /icons. is there anyway to backup torrents (for the people who didn't used 2.0 yet)? can you make your Deluge 2.0 install without 1.3 getting affected (like an option to put it with it's own AppData folder) and is there anyway to bring back/import my old torrents on Deluge 1.3?


https://dev.deluge-torrent.org/ticket/3201#comment:44
also can you make a update patch to libtorrent v1.2.2 in Deluge 1.3? just asking if that's even possible since you said libtorrent v1.1.13 isn't working on Deluge 2.0.

Re: Deluge 2.0 Windows 7z-sfx-installer available.

Posted: Fri Nov 15, 2019 9:32 pm
by mhertz
Yeah, I have stated often to always backup your profile-folder before installing deluge2 just in case, as it can remove all your torrent-data, and also if wanting to return back to old deluge again afterwards. I know you also did, btw, and just mentioning it again.

You can get your torrents back on old deluge if uninstalling deluge2, installing deluge1 and placing back the backup'ed profile folder.

I could change the default profile folder used, by modifying the sourcecode directly, but I feel that isn't a good idea, and want to keep in line with what devs have decided unless something is trully wrong(on windows), like a few places which this installer already addresses.

In my testing, updating to deluge2 transfered my single test-torrent fine, but others have reported failure like you, and I believe it's an issue with non-ascii chars used for file-names, and there where previously posted some python code to fix this, and I also see Cas recently added a patch for this in the development git branch.

I am in the process of building another alternative installer made from git-develop branch, so including also the extra fixes published from after latest stable v2.0.3 was released(this installer), which i'll post later, but not today anyways.

Libtorrent v1.2.2 isn't supported on deluge1, so that wouldn't work, no. Deluge1 supports only libtorrent v1.1.x, which currently latest is v1.1.13, which can be gotten from Nekotan here: viewtopic.php?t=55168

Re: Deluge 2.0 Windows 7z-sfx-installer available.

Posted: Sat Nov 16, 2019 12:06 am
by idiocracy
pythonw priority is set to "below normal". Installing the new version, which priority does deluge.exe have by default?