AutoPlug-Client icon indicating copy to clipboard operation
AutoPlug-Client copied to clipboard

Enhance "custom-download-url" logic

Open LKits opened this issue 1 year ago • 12 comments

Importance: 5/10

Problem: Please add a feature that AutoPlug forces to download a plugin from "custom-download-url", then checks if the hash is different and replaces the current jar with the downloaded one. This could be the default behavior if no custom-check-url is provided.

Solution: For example, when "force-download: true" or "spigot-id: 0" or something. GeyserMC doesn't use Jenkins anymore, new url: https://geysermc.org/download#bungeecord

plugins.yml Geyser-BungeeCord: exclude: false version: 0 latest-version: 0 author: GeyserMC spigot-id: 0 bukkit-id: 0 ignore-content-type: false custom-check-url: custom-download-url: https://download.geysermc.org/v2/projects/geyser/versions/latest/builds/latest/downloads/bungeecord alternatives: github: repo-name: asset-name: jenkins: project-url: artifact-name: build-id: 0 modrinth-id:

LKits avatar Dec 26 '23 11:12 LKits

This is indeed a problem I also have on my Purpur 1.20.4 server that uses the Spigot plugin.

Minionguyjpro avatar Jan 01 '24 20:01 Minionguyjpro

Wow I have the same Issue too, glad to see I'm not the only one, Please fix this thanks

AlecMcCutcheon avatar Feb 12 '24 14:02 AlecMcCutcheon

You need to provide an id for autoplug to be able to check if there is an update available, since the custom download url only provides a link to a file.

Then if there is an update, since you provided custom-download-url, that is used to download the file.

Osiris-Team avatar Feb 12 '24 14:02 Osiris-Team

You need to provide an id for autoplug to be able to check if there is an update available, since the custom download url only provides a link to a file.

Then if there is an update, since you provided custom-download-url, that is used to download the file.

I'm very much aware of this therefore this was enhancement ticket, not a bug one.

At the moment I've added "wget" before every time server starts to download JAR file. Why couldn't Autoplug do this? Download the file, compare hash or some version and replace old plugin file when changes have been made?

LKits avatar Feb 12 '24 14:02 LKits

Ideed updated the issue.

Osiris-Team avatar Feb 12 '24 15:02 Osiris-Team

You need to provide an id for autoplug to be able to check if there is an update available, since the custom download url only provides a link to a file.

Then if there is an update, since you provided custom-download-url, that is used to download the file.

The focal point still lies in implementing a force download feature, wherein upon server restart or plugin check, the server should decisively download a new copy and overwrite the existing one without necessitating a version check. While validating hashes would be ideal to avoid overwriting unchanged files, it's more practical to have the server manage the download and overwrite process during restart or plugin check. This approach saves the hassle of manually updating plugins without an ID or with an outdated ID, as exemplified by Geyser. Moreover, Floodgate lacks an ID altogether, underscoring the need for a straightforward updating mechanism in such scenarios.

AlecMcCutcheon avatar Feb 12 '24 16:02 AlecMcCutcheon

Yeah in the case that nothing is provided except the custom-download-url we could use that logic. This also removes the need to add a new force-download option in the config.

Osiris-Team avatar Feb 12 '24 17:02 Osiris-Team

Any progress on this? It would be nice to auto-update Geyser and Floodgate.

ShayBox avatar Mar 28 '24 05:03 ShayBox

Any progress on this? It would be nice to auto-update Geyser and Floodgate.

I just added wget to shell script, restarting daily so it forces to re-download every time autoplug starts:

wget -O plugins/Geyser-BungeeCord.jar https://download.geysermc.org/v2/projects/geyser/versions/latest/builds/latest/downloads/bungeecord

wget -O plugins/floodgate-bungee.jar https://download.geysermc.org/v2/projects/floodgate/versions/latest/builds/latest/downloads/bungee

LKits avatar Mar 28 '24 05:03 LKits

@ShayBox I'm not adding new features to AP anymore. Best would be if you find a Java developer or do it yourself.

Osiris-Team avatar Mar 28 '24 07:03 Osiris-Team

@ShayBox I'm not adding new features to AP anymore. Best would be if you find a Java developer or do it yourself.

Why are you still accepting monthly subscriptions then...

ShayBox avatar Apr 03 '24 20:04 ShayBox

@ShayBox Features related to AutoPlug-Web are the priority, AP-Client only features are not.

Why are you still accepting monthly subscriptions then...

You pay for the currently working AP-web features.

Osiris-Team avatar Apr 03 '24 20:04 Osiris-Team