Strip Songs2VID to a payment-free self-hosted OSS core.
Remove Stripe/billing/pricing/marketing, simplify schema and entitlements for unlimited self-host use, and keep auth, encode, and YouTube upload. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
935abfb22e
commit
925aadae75
+1
-4
@@ -5,7 +5,6 @@ import { QUEUE_NAME } from "../lib/constants";
|
||||
import { prisma } from "../lib/db";
|
||||
import { cleanupFiles, encodeVideo, getFfmpegPath } from "../lib/ffmpeg/encode";
|
||||
import { getRedisConnection } from "../lib/queue/client";
|
||||
import { releaseReservation } from "../lib/quota";
|
||||
import { getJobDir } from "../lib/storage";
|
||||
import type { VideoJobData } from "../lib/types";
|
||||
import { formatYouTubeErrorForUser } from "../lib/youtube/errors";
|
||||
@@ -46,7 +45,6 @@ async function processJobItem(data: VideoJobData) {
|
||||
where: { id: item.id },
|
||||
data: { status: JobItemStatus.FAILED, error: message },
|
||||
});
|
||||
await releaseReservation(item.job.userId, item.billingSource, 1).catch(() => {});
|
||||
await updateJobStatus(item.jobId);
|
||||
throw new Error(message);
|
||||
}
|
||||
@@ -128,7 +126,7 @@ async function processJobItem(data: VideoJobData) {
|
||||
},
|
||||
});
|
||||
|
||||
// Lifetime successful renders only (not monthly quota — that was reserved at create).
|
||||
// Track successful renders for instance statistics.
|
||||
await prisma.user.update({
|
||||
where: { id: data.userId },
|
||||
data: { createdVideoCount: { increment: 1 } },
|
||||
@@ -142,7 +140,6 @@ async function processJobItem(data: VideoJobData) {
|
||||
where: { id: item.id },
|
||||
data: { status: JobItemStatus.FAILED, error: message },
|
||||
});
|
||||
await releaseReservation(data.userId, item.billingSource, 1).catch(() => {});
|
||||
throw new Error(message);
|
||||
} finally {
|
||||
await updateJobStatus(data.jobId);
|
||||
|
||||
Reference in New Issue
Block a user