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
+10 -18
View File
@@ -1,6 +1,3 @@
import { Plan } from "@prisma/client";
import { hasProFeatures } from "./edition";
export type TitleFields = {
/** YouTube video title */
title?: string | null;
@@ -9,18 +6,16 @@ export type TitleFields = {
artist?: string | null;
};
/** Resolve the title sent to YouTube. Pro may omit video title → `${artist} - ${songTitle}`. */
export function resolveYouTubeTitle(meta: TitleFields, plan: Plan): string {
/** Resolve the title sent to YouTube, falling back to artist and song metadata. */
export function resolveYouTubeTitle(meta: TitleFields): string {
const videoTitle = meta.title?.trim();
if (videoTitle) return videoTitle;
if (hasProFeatures(plan)) {
const artist = meta.artist?.trim();
const song = meta.songTitle?.trim();
if (artist && song) return `${artist} - ${song}`;
if (song) return song;
if (artist) return artist;
}
const artist = meta.artist?.trim();
const song = meta.songTitle?.trim();
if (artist && song) return `${artist} - ${song}`;
if (song) return song;
if (artist) return artist;
return "";
}
@@ -33,13 +28,10 @@ export function resolveBurnedSongTitle(
return meta.songTitle?.trim() || fallback;
}
export function validateYouTubeTitle(meta: TitleFields, plan: Plan): string | null {
const resolved = resolveYouTubeTitle(meta, plan);
export function validateYouTubeTitle(meta: TitleFields): string | null {
const resolved = resolveYouTubeTitle(meta);
if (!resolved) {
if (hasProFeatures(plan)) {
return "Enter a video title, or both artist and song title for the YouTube fallback";
}
return "Each video must have a video title";
return "Enter a video title, song title, or artist";
}
return null;
}