stefantalpalaru / deluge-default-trackers

Deluge plugin for adding default trackers to all the new torrents
GNU General Public License v3.0
141 stars 23 forks source link

WebUI compatibility #14

Closed haarp closed 2 years ago

haarp commented 8 years ago

This plugin works well when configured manually, thanks for that!

But it would be great if there could a GUI for the WebUI too.

This is already on the todo list of this project. I just wanted to let you know that others could use this too :)

Apocrathia commented 3 years ago

Can we at least get an example configuration to use? Some of us don't even have access to a GUI to perform an initial configuration of the plugin.

stefantalpalaru commented 3 years ago

"~/.config/deluge/defaulttrackers.conf":

{
    "file": 1,
    "format": 1
}{
    "dynamic_trackerlist_url": "https://newtrackon.com/api/stable",
    "dynamic_trackers_update_interval": 1,
    "last_dynamic_trackers_update": 1605532185,
    "trackers": [
        {
            "url": "udp://open.stealth.si:80/announce"
        },
        {
            "url": "udp://cyteam.ru:6969/announce"
        }
    ]
}

I've deleted most of the trackers, but you get the idea.

Apocrathia commented 3 years ago

Perfect! That at least gives a starting point for using the plugin in the web UI. I was originally working off of this snippet in the source, but I wasn't sure if the file and format keys were required.

Subcode commented 3 years ago

I have the egg in the plugins folder and this config in the .config folder. Is that all i need to configure it manually? i havent noticed trackers being added. Unfortunately i only have access to deluged with the webui.

stefantalpalaru commented 3 years ago

You also need to enable this plugin from somewhere.

My "~/.config/deluge/core.conf" has this in it:

    "enabled_plugins": [
        "DefaultTrackers"
    ],
hugalafutro commented 3 years ago

If using docker you also need to build own image with higer version of six as detailed in here: https://github.com/stefantalpalaru/deluge-default-trackers/issues/35#issuecomment-756707615

To summarize, I got this working on a headless deluge running in a docker accessed via WebUI like so:

  1. uploaded the DefaultTrackers-0.2-py3.6.egg into dir which mounts to /config inside the container.
  2. added DefaultTrackers into the enabled_plugins array inside core.conf as outlined in the post above.
  3. created defaulttrackers.conf in dir which mounts to /config inside the container, with this in it:
{
    "file": 1,
    "format": 1
}{
    "dynamic_trackerlist_url": "https://newtrackon.com/api/stable",
    "dynamic_trackers_update_interval": 1,
    "last_dynamic_trackers_update": 1610455621,
    "trackers": [
    ]
}

(this will get populated by trackers when it next updates the list)

  1. built custom image according to https://github.com/stefantalpalaru/deluge-default-trackers/issues/35#issuecomment-756707615
  2. recreated container with docker-compose.yml adjusted by commenting out image: and adding build: ./<subdir with the Dockerfile from step above>
  3. It just works ;)
johnnyasantoss commented 2 years ago

I guess a good starting point to implement this feature would be to look at other plugins that already have a webUI. Like https://github.com/noam09/deluge-telegramer & https://github.com/nicklan/Deluge-Pieces-Plugin

stefantalpalaru commented 2 years ago

Thanks, @johnnyasantoss! I looked at those and added WebUI support.

The only thing that's missing is a "refresh" button for the dynamic tracker list.