Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance "custom-download-url" logic #227

Open
LKits opened this issue Dec 26, 2023 · 12 comments
Open

Enhance "custom-download-url" logic #227

LKits opened this issue Dec 26, 2023 · 12 comments

Comments

@LKits
Copy link

LKits commented Dec 26, 2023

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:

@github-actions github-actions bot added this to 🔍 Evaluating... in AutoPlug-Client-Development Dec 26, 2023
@Minionguyjpro
Copy link
Contributor

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

@Osiris-Team Osiris-Team moved this from 🔍 Evaluating... to ⭐️ Enhancements in AutoPlug-Client-Development Jan 1, 2024
@AlecMcCutcheon
Copy link

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

@Osiris-Team
Copy link
Owner

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.

AutoPlug-Client-Development automation moved this from ⭐️ Enhancements to ✅ Done Feb 12, 2024
@LKits
Copy link
Author

LKits commented Feb 12, 2024

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 Osiris-Team changed the title Force download "custom-download-url" Enhance "custom-download-url" logic Feb 12, 2024
@Osiris-Team Osiris-Team reopened this Feb 12, 2024
AutoPlug-Client-Development automation moved this from ✅ Done to 🔨 Working on... Feb 12, 2024
@Osiris-Team Osiris-Team moved this from 🔨 Working on... to ⭐️ Enhancements in AutoPlug-Client-Development Feb 12, 2024
@Osiris-Team
Copy link
Owner

Ideed updated the issue.

@AlecMcCutcheon
Copy link

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
Copy link
Owner

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
Copy link

ShayBox commented Mar 28, 2024

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

@LKits
Copy link
Author

LKits commented Mar 28, 2024

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
Copy link
Owner

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

@ShayBox
Copy link

ShayBox commented Apr 3, 2024

@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
Copy link
Owner

Osiris-Team commented Apr 3, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
AutoPlug-Client-Development
  
⭐️ Enhancements
Development

No branches or pull requests

5 participants