Osiris-Team / AutoPlug-Client

Server manager with automatic plugin- mod- server- java- self- updater, scheduled restarts, automatic backups, shared folders, and many more handy features to automate/boost your server maintenance.
https://autoplug.one/
MIT License
55 stars 23 forks source link

Enhance "custom-download-url" logic #227

Open LKits opened 8 months ago

LKits commented 8 months ago

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:

Minionguyjpro commented 8 months ago

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

AlecMcCutcheon commented 7 months ago

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

Osiris-Team commented 7 months ago

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.

LKits commented 7 months ago

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?

Osiris-Team commented 7 months ago

Ideed updated the issue.

AlecMcCutcheon commented 7 months ago

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.

Osiris-Team commented 7 months ago

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.

ShayBox commented 5 months ago

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

LKits commented 5 months ago

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

Osiris-Team commented 5 months ago

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

ShayBox commented 5 months ago

@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...

Osiris-Team commented 5 months ago

@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.