ci: fixing release pipeline

This commit is contained in:
Chubby Granny Chaser
2025-10-28 21:37:28 +00:00
parent fc6068d603
commit 6b96c99bb1
11 changed files with 80 additions and 5 deletions

View File

@@ -9,6 +9,13 @@ const addDownloadSource = async (
url: string
) => {
try {
const existingSources = await downloadSourcesSublevel.values().all();
const urlExists = existingSources.some((source) => source.url === url);
if (urlExists) {
throw new Error("Download source with this URL already exists");
}
const downloadSource = await HydraApi.post<DownloadSource>(
"/download-sources",
{
@@ -17,7 +24,7 @@ const addDownloadSource = async (
{ needsAuth: false }
);
if (HydraApi.isLoggedIn()) {
if (HydraApi.isLoggedIn() && HydraApi.hasActiveSubscription()) {
try {
await HydraApi.post("/profile/download-sources", {
urls: [url],

View File

@@ -13,7 +13,7 @@ const removeDownloadSource = async (
if (downloadSourceId) params.set("downloadSourceId", downloadSourceId);
if (HydraApi.isLoggedIn()) {
if (HydraApi.isLoggedIn() && HydraApi.hasActiveSubscription()) {
void HydraApi.delete(`/profile/download-sources?${params.toString()}`);
}