use manifest name in file name instead of url hash (#1127)

This commit is contained in:
Space Walker
2024-09-03 19:13:04 +02:00
committed by GitHub
parent 7ab6e56a37
commit 039b435e5d
5 changed files with 33 additions and 45 deletions

View File

@@ -30,17 +30,21 @@ import org.jetbrains.annotations.ApiStatus;
public interface VersionsManifestsAPI {
/**
* Adds a URL to a versions manifest json with the default priority of {@code 0}.
* @param name a string that uniquely identifies this versions manifest,
* to be used in cache file paths
* @param url the String-representation of the URL to the manifest json
*/
default void add(String url) {
add(url, 0);
default void add(String name, String url) {
add(name, url, 0);
}
/**
* Adds a URL to a versions manifest json with the given priority.
* @param name a string that uniquely identifies this versions manifest,
* to be used in cache file paths
* @param url the String-representation of the URL to the manifest json
* @param priority the priority with which this URL gets sorted against other entries
* entries are sorted by priority, from lowest to highest
*/
void add(String url, int priority);
void add(String name, String url, int priority);
}