Possible to change the default startup filter?

General support for problems installing or using Deluge
Jerrk
Member
Member
Posts: 23
Joined: Thu Feb 13, 2020 4:45 pm

Re: Possible to change the default startup filter?

Post by Jerrk »

Hmm... it doesn't seem to work for me.

I added the plugin to "...\Roaming\deluge\plugins" in windows and to the appdata plugin folder on unraid - same as all other plugins.

Restarting the deluge docker, the plugin does show up and i can start it and add 'done' (without the apostrophes) to the filter field.

But with the setting set and the plugin enabled, connecting to the deluge container from the thinclient does not switch the startup filter.

I've then done a bit of testing and there seems to be an issue thats easy to recreate - whatever text is in the "filter" field in the config the thinclient will not change the heading (i.e if 'Active' is selected it will still be selected) as is expected by your testing.
What happens though is that the plugin filter will be set to DEFAULT_PREFS ('filter': "") which is the 'No Label' "Label" in deluge.

This can easily be reproduced going into the "plugin" settings and just disabling and re-enabling the plugin

I've tried restarting the container as well with no change in the behavior.

I tried looking at the logs as well but i wasn't able to see anything

Code: Select all

==> deluge-web.log <==
13:49:23 [INFO    ][deluge.ui.web.pluginmanager:93  ] startfilter plugin contains no WebUI code, ignoring WebUI enable call.

==> deluged.log <==
13:49:22 [INFO    ][deluge.pluginmanagerbase         :250 ] Plugin startfilter disabled...
13:49:23 [INFO    ][deluge.pluginmanagerbase         :189 ] Plugin startfilter enabled...
startfilter.conf is also created successfully and is edited as expected when changing the value in the settings

Code: Select all

{
    "file": 1,
    "format": 1
}{
    "filter": "3-done"
}
from the switching of the percieved filter when just enabling the plugin i would take a guess and say that the plugin might be running when the plugin is started instead of when the UI is started? or something different entirely

also super minor gripe the text input field should probably just be line-height + some padding instead of filling the whole window :P
Image
mhertz
Moderator
Moderator
Posts: 2215
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Possible to change the default startup filter?

Post by mhertz »

I apologize Jerrk, sorry mate, I f'ed up and only tested this to be working fine in non-thinclient mode here, as that almost never makes a diff, so was too lazy to test in that, but this is one of these cases as you found, and I see now too.

I only made the filtering code in the GTK-UI related part of plugin, so I thought would only run in, and when, firering up the GUI locally, but it doesn't work as you say :(

Honestly I don't even know if I can make it work now, after thinking some more about it, but will try, and if do then will return. Sorry again for the noise, and feel much stupid.

About the looks in GTKUI preferences, then sure looks ugly, but I played with it alot, for other plugins too before, and cannot make look proper when only one text entry, and only when adding several options, and such look better - just me of-course. It's really annoying css code, which i'm worse than python at. I could make look better in vertical, and some other way, but since not perfect, then just decided left as is. This is actually how it looks by default by the official create_plugin.py script, which generates exactly such a look in the boilerplate code generated upon starting to make plugin and I just add more options to it, or change the field type(s), when having made other plugins before. So will have to live with it unfortunetly(if can fix plugin even).

Anyway, sorry again and as said, will try see if I can fix, but beginning to doubt honestly.
Jerrk
Member
Member
Posts: 23
Joined: Thu Feb 13, 2020 4:45 pm

Re: Possible to change the default startup filter?

Post by Jerrk »

Thanks for giving it a shot, it's unfortunate if it doesn't work but in the absolute worst case i guess i could just go back to using the older unofficial installer since i'm just using it as a thin-client, just hope that that wouldn't cause any issues :roll: .
mhertz
Moderator
Moderator
Posts: 2215
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Possible to change the default startup filter?

Post by mhertz »

I appreciate your reply bro :)

It should work now. The startfilter.conf file under your windows appdata deluge profile folder isn't used anymore, only the one on daemon is used, so if wondering why it doesn't get updated and still lists 'filter: ""'. then that is why. You can delete it, or leave be, doesn't matter as ignored(this is the proper way for thinclient, and the other way was lil' bit too hackish). Just adding for completeness.

Hope helps.

startfilter-0.1.egg

Edit: Made preferences setting look normal too now, finally could make it work.
Jerrk
Member
Member
Posts: 23
Joined: Thu Feb 13, 2020 4:45 pm

Re: Possible to change the default startup filter?

Post by Jerrk »

Works perfectly now, thanks!
mhertz
Moderator
Moderator
Posts: 2215
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Possible to change the default startup filter?

Post by mhertz »

Most welcome bro, thanks for letting me know :)
mhertz
Moderator
Moderator
Posts: 2215
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Possible to change the default startup filter?

Post by mhertz »

Just wanted to add that I updated the plugin now to fix/support the previously mentioned inability to correctly select right filter at left. I took it little personally that I couldn't figure it out, good motivation when getting pissed off by oneself lol :)

Anyway, it works, but i'm not fully happy about certain things still, regarding this aspect, so might change it again, but if do then will just make a small edit about it to this post, and probably only useful for own piece of mind, but regardless...

Edit: Sorry, spoke to soon - works fine in normal mode, but only for labels and some of the states in thinclient mode(like 'Active'), unless having 'view > sidebar > show zero hits' enabled, in which case everything works again. I fixed this issue specifically recently, but apparently only works in non-thinclient mode sadly. will look into it.

Edit2: Fixed. Still wanna improve the left-selection code though, as lame way currently, i.e. for non-labels I could only make it work through checking if you have show_zero_hits enabled(for sidebar), if having, fine, if not, then enable it, 0.1 sec non-blocking delay, select row, disable it again, done, and the delay being for avoid clashing with one of deluge's own callbacks for updating treeview(as check/use itself show_zero_hits setting), and happening to slow in thinclient mode. If find better way, then will make new edit here, but functionality is working at least, just implementation little bonkers.

Edit3: Improved speed for left-selection, and added loop to make it wait if delayed when not using 'show_zero_hits'(e.g for 'Active', where now waits till it emerges to select it, instead of giving up right away if not there).
Post Reply