fix(updater): migrate legacy release repositories
Redirect settings that still reference the former private repositories to the public GitHub release source so existing installations can discover v2.0.1 and later updates.
This commit is contained in:
+11
-9
@@ -328,15 +328,17 @@ function normalizeProviderOrder(
|
||||
return result;
|
||||
}
|
||||
|
||||
const DEPRECATED_UPDATE_REPOS = new Set([
|
||||
"sucukdeluxe/real-debrid-downloader"
|
||||
]);
|
||||
|
||||
function migrateUpdateRepo(raw: string, fallback: string): string {
|
||||
const trimmed = raw.trim();
|
||||
if (!trimmed || DEPRECATED_UPDATE_REPOS.has(trimmed.toLowerCase())) {
|
||||
return fallback;
|
||||
}
|
||||
const DEPRECATED_UPDATE_REPO_NAMES = new Set([
|
||||
"real-debrid-downloader",
|
||||
"multi-debrid-downloader"
|
||||
]);
|
||||
|
||||
function migrateUpdateRepo(raw: string, fallback: string): string {
|
||||
const trimmed = raw.trim();
|
||||
const repoName = trimmed.split("/").filter(Boolean).pop()?.replace(/\.git$/i, "").toLowerCase() || "";
|
||||
if (!trimmed || (DEPRECATED_UPDATE_REPO_NAMES.has(repoName) && trimmed.toLowerCase() !== fallback.toLowerCase())) {
|
||||
return fallback;
|
||||
}
|
||||
return trimmed;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user