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.
This commit is contained in:
Atakan Doğan Özban
2026-08-03 06:52:00 +02:00
parent 7d7043b150
commit d9cdaff521
108 changed files with 397 additions and 8061 deletions
+1 -4
View File
@@ -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);