Git Komut Rehberi & Terminal Asistanı
Sıfırdan Yeni Bir Depo Başlatın:
Mevcut Bir Git Deposu veya Klasörü Gönderin:
Hataları Geri Alma, İptal & Temizlik:
Son commit'i geri al (yapılan değişiklikleri korur):
git reset --soft HEAD~1
Yapılan yerel değişiklikleri iptal et (çalışma ağacını temizler):
git restore .
Takip edilmeyen gereksiz dosyaları sil:
git clean -fd
Değişiklikleri geçici sakla ve geri getir (stash):
git stash git stash pop
Dal (Branch) ve Sürüm Etiketleri:
Yeni dal aç ve geçiş yap:
git checkout -b yeni-ozellik git push -u origin yeni-ozellik
Sürüm etiketi (tag) oluştur ve gönder:
git tag -a v1.0.0 -m "Sürüm 1.0.0" git push origin --tags
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6d49d3666e | ||
|
|
8411c5c23d | ||
|
|
89c42e2d74 | ||
|
|
d4b7da078a | ||
|
|
1b00c9dd27 | ||
|
|
3cc67d7eea | ||
|
|
b40267b7da | ||
|
|
b5e8ea28ce | ||
|
|
18f8a601e8 |
@@ -0,0 +1,55 @@
|
|||||||
|
name: Publish PeerTube Plugin to npm
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- master
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
release:
|
||||||
|
types:
|
||||||
|
- published
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
id-token: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: '24'
|
||||||
|
|
||||||
|
- name: Syntax check main plugin entrypoint
|
||||||
|
run: node --check main.js
|
||||||
|
|
||||||
|
- name: Check npm version and publish if new
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
NPM_TOKEN_SECRET: ${{ secrets.NPM_TOKEN }}
|
||||||
|
run: |
|
||||||
|
PKG_NAME=$(node -p "require('./package.json').name")
|
||||||
|
PKG_VER=$(node -p "require('./package.json').version")
|
||||||
|
PUBLISHED=$(npm view "${PKG_NAME}@${PKG_VER}" version 2>/dev/null || true)
|
||||||
|
|
||||||
|
if [ "$PUBLISHED" = "$PKG_VER" ]; then
|
||||||
|
echo "Version ${PKG_VER} of ${PKG_NAME} is already on npm. Skipping publish."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$NPM_TOKEN_SECRET" ]; then
|
||||||
|
printf "//registry.npmjs.org/:_authToken=%s\n" "$NPM_TOKEN_SECRET" > ~/.npmrc
|
||||||
|
npm publish --access public
|
||||||
|
else
|
||||||
|
npm install -g npm@latest
|
||||||
|
npm -v
|
||||||
|
npm publish --provenance --access public
|
||||||
|
fi
|
||||||
@@ -360,6 +360,38 @@ const DEFAULT_BLOCKED_KEYWORDS = [
|
|||||||
'hentai',
|
'hentai',
|
||||||
'boob',
|
'boob',
|
||||||
'boobs',
|
'boobs',
|
||||||
|
'prnstars',
|
||||||
|
'pornstar',
|
||||||
|
'pornstars',
|
||||||
|
'brazzers',
|
||||||
|
'brattysis',
|
||||||
|
'nubiles',
|
||||||
|
'naughty america',
|
||||||
|
'sexploitation',
|
||||||
|
'twerking',
|
||||||
|
'gyat',
|
||||||
|
'nalgona',
|
||||||
|
'pawg',
|
||||||
|
'ssbbw',
|
||||||
|
'bimbofication',
|
||||||
|
'femdom',
|
||||||
|
'fetish',
|
||||||
|
'ear licking',
|
||||||
|
'mic licking',
|
||||||
|
'lens licking',
|
||||||
|
'foot tickle',
|
||||||
|
'tickle feet',
|
||||||
|
'foot goddess',
|
||||||
|
'stepsister',
|
||||||
|
'stepmom',
|
||||||
|
'sara jay',
|
||||||
|
'julia ann',
|
||||||
|
'lisa ann',
|
||||||
|
'alexis texas',
|
||||||
|
'lexi belle',
|
||||||
|
'alyx star',
|
||||||
|
'lady sonia',
|
||||||
|
'krazee klipz',
|
||||||
'uyuşturucu',
|
'uyuşturucu',
|
||||||
'uyusturucu',
|
'uyusturucu',
|
||||||
'esrar',
|
'esrar',
|
||||||
@@ -803,8 +835,15 @@ async function register({ registerHook, getRouter, registerSetting, settingsMana
|
|||||||
}
|
}
|
||||||
parsedHomeCategories = parseHomeCategories(rawHomeCategories);
|
parsedHomeCategories = parseHomeCategories(rawHomeCategories);
|
||||||
|
|
||||||
async function loadPluginSettings() {
|
let lastSettingsLoadTime = 0;
|
||||||
|
const SETTINGS_CACHE_TTL_MS = 60 * 1000;
|
||||||
|
|
||||||
|
async function loadPluginSettings(force = false) {
|
||||||
if (!settingsManager || typeof settingsManager.getSetting !== 'function') return;
|
if (!settingsManager || typeof settingsManager.getSetting !== 'function') return;
|
||||||
|
if (!force && lastSettingsLoadTime > 0 && Date.now() - lastSettingsLoadTime < SETTINGS_CACHE_TTL_MS) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
lastSettingsLoadTime = Date.now();
|
||||||
try {
|
try {
|
||||||
const val = await settingsManager.getSetting('guest-import-limit');
|
const val = await settingsManager.getSetting('guest-import-limit');
|
||||||
if (val !== undefined && val !== null && String(val).trim() !== '') {
|
if (val !== undefined && val !== null && String(val).trim() !== '') {
|
||||||
@@ -896,9 +935,9 @@ async function register({ registerHook, getRouter, registerSetting, settingsMana
|
|||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
await loadPluginSettings();
|
await loadPluginSettings(true);
|
||||||
if (settingsManager && typeof settingsManager.onSettingsChange === 'function') {
|
if (settingsManager && typeof settingsManager.onSettingsChange === 'function') {
|
||||||
settingsManager.onSettingsChange(loadPluginSettings);
|
settingsManager.onSettingsChange(() => loadPluginSettings(true));
|
||||||
}
|
}
|
||||||
resolveYtDlpPath(logger, customYtDlpPath, peertubeHelpers);
|
resolveYtDlpPath(logger, customYtDlpPath, peertubeHelpers);
|
||||||
|
|
||||||
@@ -1444,24 +1483,30 @@ async function register({ registerHook, getRouter, registerSetting, settingsMana
|
|||||||
return res.json(result);
|
return res.json(result);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Reusable YouTube Raw Search Helper (with Cache & SafeSearch)
|
const inFlightYouTubeSearches = new Map();
|
||||||
|
|
||||||
|
// Reusable YouTube Raw Search Helper (with Cache, In-Flight Dedupe & SafeSearch)
|
||||||
function searchYouTubeRaw(query, maxCount = 24) {
|
function searchYouTubeRaw(query, maxCount = 24) {
|
||||||
return new Promise((resolve, reject) => {
|
const cleanQ = (query || '').trim();
|
||||||
const cleanQ = (query || '').trim();
|
if (!cleanQ || cleanQ.length < 2) return Promise.resolve({ results: [], cached: false });
|
||||||
if (!cleanQ || cleanQ.length < 2) return resolve({ results: [], cached: false });
|
if (safeSearchEnabled && isContentBlocked(cleanQ, blockedKeywordsList)) {
|
||||||
if (safeSearchEnabled && isContentBlocked(cleanQ, blockedKeywordsList)) {
|
return Promise.resolve({ results: [], cached: false, blocked: true });
|
||||||
return resolve({ results: [], cached: false, blocked: true });
|
}
|
||||||
}
|
|
||||||
|
|
||||||
const cacheKey = `${cleanQ.toLocaleLowerCase('tr')}__${maxCount}`;
|
const cacheKey = `${cleanQ.toLocaleLowerCase('tr')}__${maxCount}`;
|
||||||
const cached = getCached(cacheKey) || (maxCount <= 24 ? getCached(cleanQ) : null);
|
const cached = getCached(cacheKey) || (maxCount <= 24 ? getCached(cleanQ) : null);
|
||||||
if (cached) {
|
if (cached) {
|
||||||
const filteredCached = safeSearchEnabled
|
const filteredCached = safeSearchEnabled
|
||||||
? cached.filter(e => !isContentBlocked(e.title, blockedKeywordsList))
|
? cached.filter(e => !isContentBlocked(e.title, blockedKeywordsList))
|
||||||
: cached;
|
: cached;
|
||||||
return resolve({ results: filteredCached.slice(0, maxCount), cached: true });
|
return Promise.resolve({ results: filteredCached.slice(0, maxCount), cached: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (inFlightYouTubeSearches.has(cacheKey)) {
|
||||||
|
return inFlightYouTubeSearches.get(cacheKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
const p = new Promise((resolve, reject) => {
|
||||||
const ytdlpPath = resolveYtDlpPath(logger, customYtDlpPath, peertubeHelpers);
|
const ytdlpPath = resolveYtDlpPath(logger, customYtDlpPath, peertubeHelpers);
|
||||||
const args = [
|
const args = [
|
||||||
`ytsearch${maxCount}:${cleanQ}`,
|
`ytsearch${maxCount}:${cleanQ}`,
|
||||||
@@ -1471,8 +1516,13 @@ async function register({ registerHook, getRouter, registerSetting, settingsMana
|
|||||||
'--no-warnings'
|
'--no-warnings'
|
||||||
];
|
];
|
||||||
|
|
||||||
execFile(ytdlpPath, args, { maxBuffer: 10 * 1024 * 1024, timeout: 15000 }, (error, stdout) => {
|
execFile(ytdlpPath, args, { maxBuffer: 10 * 1024 * 1024, timeout: 30000 }, (error, stdout, stderr) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
|
if (logger) {
|
||||||
|
logger.warn(
|
||||||
|
`[YakTube Search] yt-dlp search error for "${cleanQ}": ${error.message} ${stderr || ''}`.trim()
|
||||||
|
);
|
||||||
|
}
|
||||||
return reject(error);
|
return reject(error);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
@@ -1523,7 +1573,12 @@ async function register({ registerHook, getRouter, registerSetting, settingsMana
|
|||||||
return reject(parseErr);
|
return reject(parseErr);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}).finally(() => {
|
||||||
|
inFlightYouTubeSearches.delete(cacheKey);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
inFlightYouTubeSearches.set(cacheKey, p);
|
||||||
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
function isCrawlerBotRequest(req) {
|
function isCrawlerBotRequest(req) {
|
||||||
@@ -1600,7 +1655,7 @@ async function register({ registerHook, getRouter, registerSetting, settingsMana
|
|||||||
return res.json({ results: enrichedResults, cached, guestImportLimit });
|
return res.json({ results: enrichedResults, cached, guestImportLimit });
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (logger) logger.error('YouTube search error: ' + err.message);
|
if (logger) logger.error('YouTube search error: ' + err.message);
|
||||||
return res.status(500).json({ error: 'Search failed', details: err.message });
|
return res.json({ results: [], searchError: true, errorDetails: err.message, guestImportLimit });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1727,6 +1782,38 @@ async function register({ registerHook, getRouter, registerSetting, settingsMana
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let localLibrarySnapshotCache = { time: 0, rows: [] };
|
||||||
|
const LOCAL_LIBRARY_CACHE_TTL_MS = 30 * 1000;
|
||||||
|
|
||||||
|
async function getCachedLocalLibraryRows() {
|
||||||
|
if (
|
||||||
|
localLibrarySnapshotCache.rows.length > 0 &&
|
||||||
|
Date.now() - localLibrarySnapshotCache.time < LOCAL_LIBRARY_CACHE_TTL_MS
|
||||||
|
) {
|
||||||
|
return localLibrarySnapshotCache.rows;
|
||||||
|
}
|
||||||
|
const rows = await dbQuery(
|
||||||
|
`SELECT v.id, v.uuid, v.name, v.category, v.duration, v.views, v."createdAt",
|
||||||
|
(SELECT t.filename FROM "thumbnail" t WHERE t."videoId" = v.id ORDER BY t.width ASC NULLS LAST LIMIT 1) AS "thumbFilename",
|
||||||
|
vi."targetUrl" AS "importUrl",
|
||||||
|
(
|
||||||
|
SELECT tg.name
|
||||||
|
FROM "videoTag" vt2
|
||||||
|
INNER JOIN "tag" tg ON tg.id = vt2."tagId"
|
||||||
|
WHERE vt2."videoId" = v.id
|
||||||
|
ORDER BY vt2."createdAt" ASC
|
||||||
|
LIMIT 1
|
||||||
|
) AS "primaryTag"
|
||||||
|
FROM "video" v
|
||||||
|
LEFT JOIN "videoImport" vi ON vi."videoId" = v.id
|
||||||
|
WHERE v.remote = false AND v.state = 1
|
||||||
|
ORDER BY v.id DESC
|
||||||
|
LIMIT 250`
|
||||||
|
);
|
||||||
|
localLibrarySnapshotCache = { time: Date.now(), rows };
|
||||||
|
return rows;
|
||||||
|
}
|
||||||
|
|
||||||
router.get('/smart-recommendations', async (req, res) => {
|
router.get('/smart-recommendations', async (req, res) => {
|
||||||
await loadPluginSettings();
|
await loadPluginSettings();
|
||||||
if (isCrawlerBotRequest(req)) {
|
if (isCrawlerBotRequest(req)) {
|
||||||
@@ -1766,14 +1853,26 @@ async function register({ registerHook, getRouter, registerSetting, settingsMana
|
|||||||
|
|
||||||
if (resolvedUuid) {
|
if (resolvedUuid) {
|
||||||
try {
|
try {
|
||||||
const currentRows = await dbQuery(
|
let currentRows = [];
|
||||||
`SELECT v.id, v.uuid, v.name, v.category, v."channelId", vi."targetUrl"
|
if (/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(resolvedUuid)) {
|
||||||
FROM "video" v
|
currentRows = await dbQuery(
|
||||||
LEFT JOIN "videoImport" vi ON vi."videoId" = v.id
|
`SELECT v.id, v.uuid, v.name, v.category, v."channelId", vi."targetUrl"
|
||||||
WHERE v.uuid::text = $1 OR v.id::text = $2
|
FROM "video" v
|
||||||
LIMIT 1`,
|
LEFT JOIN "videoImport" vi ON vi."videoId" = v.id
|
||||||
[resolvedUuid, rawUuid]
|
WHERE v.uuid = $1::uuid
|
||||||
);
|
LIMIT 1`,
|
||||||
|
[resolvedUuid]
|
||||||
|
);
|
||||||
|
} else if (/^\d+$/.test(rawUuid)) {
|
||||||
|
currentRows = await dbQuery(
|
||||||
|
`SELECT v.id, v.uuid, v.name, v.category, v."channelId", vi."targetUrl"
|
||||||
|
FROM "video" v
|
||||||
|
LEFT JOIN "videoImport" vi ON vi."videoId" = v.id
|
||||||
|
WHERE v.id = $1::int
|
||||||
|
LIMIT 1`,
|
||||||
|
[parseInt(rawUuid, 10)]
|
||||||
|
);
|
||||||
|
}
|
||||||
if (currentRows.length > 0) {
|
if (currentRows.length > 0) {
|
||||||
currentVideoRow = currentRows[0];
|
currentVideoRow = currentRows[0];
|
||||||
const tagRows = await dbQuery(
|
const tagRows = await dbQuery(
|
||||||
@@ -1781,7 +1880,7 @@ async function register({ registerHook, getRouter, registerSetting, settingsMana
|
|||||||
FROM "videoTag" vt
|
FROM "videoTag" vt
|
||||||
INNER JOIN "tag" t ON t.id = vt."tagId"
|
INNER JOIN "tag" t ON t.id = vt."tagId"
|
||||||
WHERE vt."videoId" = $1
|
WHERE vt."videoId" = $1
|
||||||
ORDER BY vt.id ASC
|
ORDER BY vt."createdAt" ASC
|
||||||
LIMIT 8`,
|
LIMIT 8`,
|
||||||
[currentVideoRow.id]
|
[currentVideoRow.id]
|
||||||
);
|
);
|
||||||
@@ -2027,26 +2126,7 @@ async function register({ registerHook, getRouter, registerSetting, settingsMana
|
|||||||
let hasDirectLocalMatch = false;
|
let hasDirectLocalMatch = false;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const localRows = await dbQuery(
|
const localRows = await getCachedLocalLibraryRows();
|
||||||
`SELECT DISTINCT ON (v.id)
|
|
||||||
v.id, v.uuid, v.name, v.category, v.duration, v.views, v."createdAt",
|
|
||||||
t.filename AS "thumbFilename",
|
|
||||||
vi."targetUrl" AS "importUrl",
|
|
||||||
(
|
|
||||||
SELECT tg.name
|
|
||||||
FROM "videoTag" vt2
|
|
||||||
INNER JOIN "tag" tg ON tg.id = vt2."tagId"
|
|
||||||
WHERE vt2."videoId" = v.id
|
|
||||||
ORDER BY vt2.id ASC
|
|
||||||
LIMIT 1
|
|
||||||
) AS "primaryTag"
|
|
||||||
FROM "video" v
|
|
||||||
LEFT JOIN "thumbnail" t ON t."videoId" = v.id
|
|
||||||
LEFT JOIN "videoImport" vi ON vi."videoId" = v.id
|
|
||||||
WHERE v.remote = false AND v.state = 1
|
|
||||||
ORDER BY v.id DESC, t.type ASC
|
|
||||||
LIMIT 250`
|
|
||||||
);
|
|
||||||
|
|
||||||
for (const lv of localRows) {
|
for (const lv of localRows) {
|
||||||
if (!lv || !lv.name) continue;
|
if (!lv || !lv.name) continue;
|
||||||
@@ -2185,7 +2265,7 @@ async function register({ registerHook, getRouter, registerSetting, settingsMana
|
|||||||
// 1.5. Score Relevant Fediverse (Remote PeerTube) Videos when federatedRecommendationsMode !== 'disabled'
|
// 1.5. Score Relevant Fediverse (Remote PeerTube) Videos when federatedRecommendationsMode !== 'disabled'
|
||||||
if (federatedRecommendationsMode !== 'disabled') {
|
if (federatedRecommendationsMode !== 'disabled') {
|
||||||
try {
|
try {
|
||||||
const searchPatterns = Array.from(
|
const trgmPatterns = Array.from(
|
||||||
new Set(
|
new Set(
|
||||||
[
|
[
|
||||||
...(artistNorm && artistNorm.length >= 3 ? [artistNorm] : []),
|
...(artistNorm && artistNorm.length >= 3 ? [artistNorm] : []),
|
||||||
@@ -2193,27 +2273,35 @@ async function register({ registerHook, getRouter, registerSetting, settingsMana
|
|||||||
...currentKeywords,
|
...currentKeywords,
|
||||||
...historyKeywords
|
...historyKeywords
|
||||||
]
|
]
|
||||||
|
.map(k =>
|
||||||
|
String(k || '')
|
||||||
|
.toLowerCase()
|
||||||
|
.replace(/[ç]/g, 'c')
|
||||||
|
.replace(/[ğ]/g, 'g')
|
||||||
|
.replace(/[ıİ]/g, 'i')
|
||||||
|
.replace(/[ö]/g, 'o')
|
||||||
|
.replace(/[ş]/g, 's')
|
||||||
|
.replace(/[ü]/g, 'u')
|
||||||
|
.trim()
|
||||||
|
)
|
||||||
.filter(k => k && k.length >= 3)
|
.filter(k => k && k.length >= 3)
|
||||||
.slice(0, 8)
|
.slice(0, 6)
|
||||||
.map(k => `%${k}%`)
|
.map(k => `%${k}%`)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (searchPatterns.length > 0) {
|
if (trgmPatterns.length > 0) {
|
||||||
const fedRows = await dbQuery(
|
const fedRows = await dbQuery(
|
||||||
`SELECT DISTINCT ON (v.id)
|
`SELECT v.id, v.uuid, v.name, v.category, v.language, v.duration, v.views, v."isLive", v.nsfw,
|
||||||
v.id, v.uuid, v.name, v.category, v.language, v.duration, v.views, v."isLive", v.nsfw,
|
(SELECT t.filename FROM "thumbnail" t WHERE t."videoId" = v.id ORDER BY t.width ASC NULLS LAST LIMIT 1) AS "thumbFilename"
|
||||||
t.filename AS "thumbFilename"
|
|
||||||
FROM "video" v
|
FROM "video" v
|
||||||
LEFT JOIN "thumbnail" t ON t."videoId" = v.id
|
|
||||||
WHERE v.remote = true
|
WHERE v.remote = true
|
||||||
AND v.state = 1
|
AND v.state = 1
|
||||||
AND v.privacy = 1
|
AND v.privacy = 1
|
||||||
AND v.nsfw = false
|
AND v.nsfw = false
|
||||||
AND (v.name ILIKE ANY($1) OR v.language = 'tr')
|
AND lower(immutable_unaccent(v.name::text)) LIKE ANY($1)
|
||||||
ORDER BY v.id DESC, t.type ASC
|
LIMIT 40`,
|
||||||
LIMIT 80`,
|
[trgmPatterns]
|
||||||
[searchPatterns]
|
|
||||||
);
|
);
|
||||||
|
|
||||||
for (const fv of fedRows) {
|
for (const fv of fedRows) {
|
||||||
@@ -2785,6 +2873,9 @@ async function register({ registerHook, getRouter, registerSetting, settingsMana
|
|||||||
|
|
||||||
// 4. Video Import Status Polling Route
|
// 4. Video Import Status Polling Route
|
||||||
router.get('/status/:id', async (req, res) => {
|
router.get('/status/:id', async (req, res) => {
|
||||||
|
if (isCrawlerBotRequest(req)) {
|
||||||
|
return res.status(403).json({ error: 'Bot requests are not allowed on import status endpoint' });
|
||||||
|
}
|
||||||
const videoId = req.params.id;
|
const videoId = req.params.id;
|
||||||
const { hostname, port, hostHeader } = getLocalServerTarget();
|
const { hostname, port, hostHeader } = getLocalServerTarget();
|
||||||
const reqVideo = http.request(
|
const reqVideo = http.request(
|
||||||
@@ -2906,55 +2997,654 @@ async function register({ registerHook, getRouter, registerSetting, settingsMana
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const videoOriginCache = new Map();
|
||||||
|
const VIDEO_ORIGIN_CACHE_TTL_MS = 10 * 60 * 1000;
|
||||||
|
const transcriptMemoryCache = new Map();
|
||||||
|
const inFlightTranscriptRequests = new Map();
|
||||||
|
const TRANSCRIPT_OK_TTL_MS = 12 * 60 * 60 * 1000;
|
||||||
|
const TRANSCRIPT_EMPTY_TTL_MS = 10 * 60 * 1000;
|
||||||
|
|
||||||
|
function resolveTranscriptStorageRoot() {
|
||||||
|
try {
|
||||||
|
if (
|
||||||
|
peertubeHelpers &&
|
||||||
|
peertubeHelpers.plugin &&
|
||||||
|
typeof peertubeHelpers.plugin.getDataDirectoryPath === 'function'
|
||||||
|
) {
|
||||||
|
const dataDir = peertubeHelpers.plugin.getDataDirectoryPath();
|
||||||
|
const candidate = path.resolve(dataDir, '..', '..', '..');
|
||||||
|
if (fs.existsSync(candidate)) return candidate;
|
||||||
|
}
|
||||||
|
} catch (e) {}
|
||||||
|
if (fs.existsSync('D:\\yaktube_storage')) return 'D:\\yaktube_storage';
|
||||||
|
return process.cwd();
|
||||||
|
}
|
||||||
|
|
||||||
|
function extractYouTubeIdFromText(str) {
|
||||||
|
if (!str || typeof str !== 'string') return null;
|
||||||
|
const match =
|
||||||
|
str.match(/[?&]v=([a-zA-Z0-9_-]{11})/) ||
|
||||||
|
str.match(/youtu\.be\/([a-zA-Z0-9_-]{11})/) ||
|
||||||
|
str.match(/shorts\/([a-zA-Z0-9_-]{11})/) ||
|
||||||
|
str.match(/embed\/([a-zA-Z0-9_-]{11})/);
|
||||||
|
return match ? match[1] : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
function extractYouTubeIdFromRow(row) {
|
||||||
|
if (!row) return null;
|
||||||
|
return extractYouTubeIdFromText(row.targetUrl) || extractYouTubeIdFromText(row.description);
|
||||||
|
}
|
||||||
|
|
||||||
|
function fetchRemoteTextWithLimit(targetUrl, timeoutMs = 9000, maxRedirects = 4, maxBytes = 4 * 1024 * 1024) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
if (maxRedirects <= 0) return reject(new Error('Too many redirects'));
|
||||||
|
let parsed;
|
||||||
|
try {
|
||||||
|
parsed = new URL(targetUrl);
|
||||||
|
} catch (e) {
|
||||||
|
return reject(e);
|
||||||
|
}
|
||||||
|
if (parsed.protocol !== 'http:' && parsed.protocol !== 'https:') {
|
||||||
|
return reject(new Error('Unsupported protocol'));
|
||||||
|
}
|
||||||
|
const lib = parsed.protocol === 'https:' ? https : http;
|
||||||
|
const req = lib.get(
|
||||||
|
targetUrl,
|
||||||
|
{
|
||||||
|
timeout: timeoutMs,
|
||||||
|
headers: {
|
||||||
|
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 Chrome/131.0.0.0 Safari/537.36',
|
||||||
|
Accept: 'application/json, text/vtt, text/plain, */*'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
res => {
|
||||||
|
if ([301, 302, 307, 308].includes(res.statusCode) && res.headers.location) {
|
||||||
|
res.resume();
|
||||||
|
const nextUrl = new URL(res.headers.location, targetUrl).toString();
|
||||||
|
return resolve(fetchRemoteTextWithLimit(nextUrl, timeoutMs, maxRedirects - 1, maxBytes));
|
||||||
|
}
|
||||||
|
if (res.statusCode !== 200) {
|
||||||
|
res.resume();
|
||||||
|
return reject(new Error('HTTP ' + res.statusCode));
|
||||||
|
}
|
||||||
|
const chunks = [];
|
||||||
|
let received = 0;
|
||||||
|
res.on('data', chunk => {
|
||||||
|
received += chunk.length;
|
||||||
|
if (received > maxBytes) {
|
||||||
|
req.destroy(new Error('Response too large'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
chunks.push(chunk);
|
||||||
|
});
|
||||||
|
res.on('end', () => resolve(Buffer.concat(chunks).toString('utf8')));
|
||||||
|
res.on('error', reject);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
req.on('timeout', () => req.destroy(new Error('Timeout')));
|
||||||
|
req.on('error', reject);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function parseTimeTokenToSeconds(token) {
|
||||||
|
if (!token || typeof token !== 'string') return NaN;
|
||||||
|
const parts = token.trim().replace(',', '.').split(':');
|
||||||
|
if (parts.length === 2) {
|
||||||
|
const m = parseInt(parts[0], 10);
|
||||||
|
const s = parseFloat(parts[1]);
|
||||||
|
if (isNaN(m) || isNaN(s)) return NaN;
|
||||||
|
return m * 60 + s;
|
||||||
|
}
|
||||||
|
if (parts.length === 3) {
|
||||||
|
const h = parseInt(parts[0], 10);
|
||||||
|
const m = parseInt(parts[1], 10);
|
||||||
|
const s = parseFloat(parts[2]);
|
||||||
|
if (isNaN(h) || isNaN(m) || isNaN(s)) return NaN;
|
||||||
|
return h * 3600 + m * 60 + s;
|
||||||
|
}
|
||||||
|
return NaN;
|
||||||
|
}
|
||||||
|
|
||||||
|
function decodeSubtitleEntities(str) {
|
||||||
|
return String(str || '')
|
||||||
|
.replace(/<\d{2}:\d{2}(?::\d{2})?\.\d+>/g, '')
|
||||||
|
.replace(/<\/?[^>]+(>|$)/g, ' ')
|
||||||
|
.replace(/&/g, '&')
|
||||||
|
.replace(/</g, '<')
|
||||||
|
.replace(/>/g, '>')
|
||||||
|
.replace(/"/g, '"')
|
||||||
|
.replace(/'|'/g, "'")
|
||||||
|
.replace(/ /g, ' ')
|
||||||
|
.replace(/\s+/g, ' ')
|
||||||
|
.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
function parseChaptersFromDescription(description, maxDurationSec) {
|
||||||
|
if (!description || typeof description !== 'string') return [];
|
||||||
|
const lines = description.split(/\r?\n/);
|
||||||
|
const seenStarts = new Set();
|
||||||
|
const chapters = [];
|
||||||
|
for (const rawLine of lines) {
|
||||||
|
const line = rawLine.trim();
|
||||||
|
if (!line || line.length > 220) continue;
|
||||||
|
const mPrefix = line.match(/^[\[\(\*•\-–—\s]*((?:\d{1,2}:)?\d{1,2}:\d{2})[\]\)\*:\-\s–—]+(.+)$/);
|
||||||
|
const mSuffix = !mPrefix ? line.match(/^(.+?)[\s\-\–—:\(\[]+((?:\d{1,2}:)?\d{1,2}:\d{2})[\)\]\s]*$/) : null;
|
||||||
|
const timeStr = mPrefix ? mPrefix[1] : mSuffix ? mSuffix[2] : null;
|
||||||
|
let title = mPrefix ? mPrefix[2] : mSuffix ? mSuffix[1] : '';
|
||||||
|
if (!timeStr) continue;
|
||||||
|
const startSec = Math.floor(parseTimeTokenToSeconds(timeStr));
|
||||||
|
if (isNaN(startSec) || startSec < 0) continue;
|
||||||
|
if (maxDurationSec > 0 && startSec > maxDurationSec + 5) continue;
|
||||||
|
title = title.replace(/^[\-\–—:\s•]+|[\-\–—:\s•]+$/g, '').trim();
|
||||||
|
if (!title || title.length < 2) continue;
|
||||||
|
if (seenStarts.has(startSec)) continue;
|
||||||
|
seenStarts.add(startSec);
|
||||||
|
chapters.push({ title, start: startSec });
|
||||||
|
}
|
||||||
|
chapters.sort((a, b) => a.start - b.start);
|
||||||
|
return chapters.length >= 2 ? chapters : [];
|
||||||
|
}
|
||||||
|
|
||||||
|
function parseJson3Subtitles(rawText) {
|
||||||
|
const parsed = JSON.parse(rawText);
|
||||||
|
const events = Array.isArray(parsed && parsed.events) ? parsed.events : [];
|
||||||
|
const cues = [];
|
||||||
|
for (const ev of events) {
|
||||||
|
if (!ev || !Array.isArray(ev.segs)) continue;
|
||||||
|
const text = ev.segs
|
||||||
|
.map(s => (s && s.utf8 ? s.utf8 : ''))
|
||||||
|
.join('')
|
||||||
|
.replace(/\n+/g, ' ');
|
||||||
|
const clean = decodeSubtitleEntities(text);
|
||||||
|
if (!clean || clean === '[Müzik]' || clean === '[Music]') {
|
||||||
|
if (!clean) continue;
|
||||||
|
}
|
||||||
|
const start = Number(((ev.tStartMs || 0) / 1000).toFixed(2));
|
||||||
|
const dur = ev.dDurationMs ? ev.dDurationMs / 1000 : 3;
|
||||||
|
const end = Number((start + Math.max(0.5, dur)).toFixed(2));
|
||||||
|
if (
|
||||||
|
cues.length > 0 &&
|
||||||
|
cues[cues.length - 1].text === clean &&
|
||||||
|
Math.abs(start - cues[cues.length - 1].start) < 2
|
||||||
|
) {
|
||||||
|
cues[cues.length - 1].end = Math.max(cues[cues.length - 1].end, end);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
cues.push({ start, end, text: clean });
|
||||||
|
}
|
||||||
|
return cues;
|
||||||
|
}
|
||||||
|
|
||||||
|
function parseVttOrSrtSubtitles(rawText) {
|
||||||
|
const normalized = String(rawText || '')
|
||||||
|
.replace(/^\uFEFF/, '')
|
||||||
|
.replace(/\r\n/g, '\n')
|
||||||
|
.replace(/\r/g, '\n');
|
||||||
|
const blocks = normalized.split(/\n{2,}/);
|
||||||
|
const cues = [];
|
||||||
|
for (const block of blocks) {
|
||||||
|
const lines = block
|
||||||
|
.split('\n')
|
||||||
|
.map(l => l.trim())
|
||||||
|
.filter(Boolean);
|
||||||
|
if (!lines.length) continue;
|
||||||
|
if (/^(WEBVTT|Kind:|Language:|NOTE\b|STYLE\b)/i.test(lines[0])) continue;
|
||||||
|
const timeIdx = lines.findIndex(l => l.includes('-->'));
|
||||||
|
if (timeIdx === -1) continue;
|
||||||
|
const parts = lines[timeIdx].split('-->');
|
||||||
|
if (parts.length < 2) continue;
|
||||||
|
const start = parseTimeTokenToSeconds(parts[0].trim().split(/\s+/)[0]);
|
||||||
|
const end = parseTimeTokenToSeconds(parts[1].trim().split(/\s+/)[0]);
|
||||||
|
if (isNaN(start)) continue;
|
||||||
|
const rawBody = lines.slice(timeIdx + 1).join(' ');
|
||||||
|
const clean = decodeSubtitleEntities(rawBody);
|
||||||
|
if (!clean) continue;
|
||||||
|
const safeStart = Number(start.toFixed(2));
|
||||||
|
const safeEnd = Number((!isNaN(end) && end > start ? end : start + 3).toFixed(2));
|
||||||
|
if (cues.length > 0 && cues[cues.length - 1].text === clean) {
|
||||||
|
cues[cues.length - 1].end = Math.max(cues[cues.length - 1].end, safeEnd);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
cues.push({ start: safeStart, end: safeEnd, text: clean });
|
||||||
|
}
|
||||||
|
return cues;
|
||||||
|
}
|
||||||
|
|
||||||
|
function parseSubtitlePayload(rawText) {
|
||||||
|
if (!rawText || typeof rawText !== 'string') return [];
|
||||||
|
const trimmed = rawText.trim();
|
||||||
|
if (!trimmed) return [];
|
||||||
|
if (trimmed.startsWith('{')) {
|
||||||
|
try {
|
||||||
|
return parseJson3Subtitles(trimmed);
|
||||||
|
} catch (e) {}
|
||||||
|
}
|
||||||
|
return parseVttOrSrtSubtitles(trimmed);
|
||||||
|
}
|
||||||
|
|
||||||
|
function pickPreferredCaptionTrack(ytInfo, preferredLang, videoLang) {
|
||||||
|
const manual = ytInfo && ytInfo.subtitles && typeof ytInfo.subtitles === 'object' ? ytInfo.subtitles : {};
|
||||||
|
const auto =
|
||||||
|
ytInfo && ytInfo.automatic_captions && typeof ytInfo.automatic_captions === 'object'
|
||||||
|
? ytInfo.automatic_captions
|
||||||
|
: {};
|
||||||
|
|
||||||
|
const pickFormat = tracks => {
|
||||||
|
for (const ext of ['json3', 'vtt', 'srt']) {
|
||||||
|
const hit = tracks.find(t => t && t.ext === ext && t.url);
|
||||||
|
if (hit) return hit;
|
||||||
|
}
|
||||||
|
return tracks.find(t => t && t.url) || null;
|
||||||
|
};
|
||||||
|
|
||||||
|
const isTranslatedUrl = url => Boolean(url && String(url).includes('tlang='));
|
||||||
|
const hasNativeTrack = tracks => tracks.some(t => t && t.url && !isTranslatedUrl(t.url));
|
||||||
|
|
||||||
|
const availableLanguages = [];
|
||||||
|
const seenLangCodes = new Set();
|
||||||
|
const pushLang = (code, tracks, isAuto) => {
|
||||||
|
if (!code || code === 'live_chat' || seenLangCodes.has(code) || !Array.isArray(tracks) || !tracks.length) return;
|
||||||
|
seenLangCodes.add(code);
|
||||||
|
availableLanguages.push({
|
||||||
|
code,
|
||||||
|
name: tracks[0].name || code,
|
||||||
|
auto: isAuto
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// 1. Always surface manual subtitles & native (-orig / non-tlang) auto tracks first
|
||||||
|
for (const code of Object.keys(manual)) pushLang(code, manual[code], false);
|
||||||
|
for (const code of Object.keys(auto)) {
|
||||||
|
if (code.endsWith('-orig') || hasNativeTrack(auto[code] || [])) {
|
||||||
|
pushLang(code, auto[code], true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (const code of ['tr', 'en', 'de', 'fr', 'es', 'ar']) {
|
||||||
|
if (auto[code]) pushLang(code, auto[code], true);
|
||||||
|
}
|
||||||
|
|
||||||
|
const req = preferredLang ? String(preferredLang).trim().toLowerCase() : '';
|
||||||
|
const vLang = videoLang ? String(videoLang).trim().toLowerCase() : '';
|
||||||
|
const candidates = [];
|
||||||
|
const addedCandidateKeys = new Set();
|
||||||
|
const pushCandidate = (code, isAuto, tracks) => {
|
||||||
|
const track = pickFormat(tracks || []);
|
||||||
|
if (!track || !track.url) return;
|
||||||
|
const key = (isAuto ? 'a:' : 'm:') + code;
|
||||||
|
if (addedCandidateKeys.has(key)) return;
|
||||||
|
addedCandidateKeys.add(key);
|
||||||
|
candidates.push({ code, isAuto, track });
|
||||||
|
};
|
||||||
|
|
||||||
|
const matchKey = (keys, lang) =>
|
||||||
|
lang ? keys.find(k => k.toLowerCase() === lang) || keys.find(k => k.toLowerCase().startsWith(lang + '-')) : null;
|
||||||
|
|
||||||
|
const manualKeys = Object.keys(manual).filter(
|
||||||
|
k => k !== 'live_chat' && Array.isArray(manual[k]) && manual[k].length
|
||||||
|
);
|
||||||
|
const autoKeys = Object.keys(auto).filter(k => k !== 'live_chat' && Array.isArray(auto[k]) && auto[k].length);
|
||||||
|
|
||||||
|
// 2. Manual tracks in priority order
|
||||||
|
for (const p of [req, 'tr', vLang, 'en', 'en-US', 'en-GB']) {
|
||||||
|
const mk = matchKey(manualKeys, p);
|
||||||
|
if (mk) pushCandidate(mk, false, manual[mk]);
|
||||||
|
}
|
||||||
|
if (manualKeys.length > 0 && !req) {
|
||||||
|
pushCandidate(manualKeys[0], false, manual[manualKeys[0]]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3. If explicit language requested in auto, add it (non-tlang checked below first if same)
|
||||||
|
const nativeAutoKeys = autoKeys.filter(k => k.endsWith('-orig') || hasNativeTrack(auto[k]));
|
||||||
|
if (req) {
|
||||||
|
const akNative = matchKey(nativeAutoKeys, req);
|
||||||
|
if (akNative) pushCandidate(akNative, true, auto[akNative]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 4. Native ASR tracks WITHOUT tlang= (prevents YouTube HTTP 429 rate-limit!)
|
||||||
|
for (const p of ['tr', vLang, 'en']) {
|
||||||
|
const nk = matchKey(nativeAutoKeys, p);
|
||||||
|
if (nk) pushCandidate(nk, true, auto[nk]);
|
||||||
|
}
|
||||||
|
for (const nk of nativeAutoKeys) {
|
||||||
|
pushCandidate(nk, true, auto[nk]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 5. Fallback translated auto track only if explicitly requested or zero native candidates exist
|
||||||
|
if (req) {
|
||||||
|
const akReq = matchKey(autoKeys, req);
|
||||||
|
if (akReq) pushCandidate(akReq, true, auto[akReq]);
|
||||||
|
} else if (candidates.length === 0) {
|
||||||
|
for (const p of ['tr', vLang, 'en']) {
|
||||||
|
const ak = matchKey(autoKeys, p);
|
||||||
|
if (ak) pushCandidate(ak, true, auto[ak]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
chosen: candidates[0] || null,
|
||||||
|
candidates: candidates.slice(0, 4),
|
||||||
|
availableLanguages: availableLanguages.slice(0, 12)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
router.get('/video-origin/:uuid', async (req, res) => {
|
router.get('/video-origin/:uuid', async (req, res) => {
|
||||||
|
if (isCrawlerBotRequest(req)) {
|
||||||
|
return res.json({ ok: false, hasYouTubeOrigin: false, botIgnored: true });
|
||||||
|
}
|
||||||
const rawParam = (req.params.uuid || '').trim();
|
const rawParam = (req.params.uuid || '').trim();
|
||||||
if (!rawParam) return res.status(400).json({ error: 'UUID required' });
|
if (!rawParam) return res.status(400).json({ error: 'UUID required' });
|
||||||
const resolvedUuid = shortToUuid(rawParam);
|
const resolvedUuid = shortToUuid(rawParam);
|
||||||
|
|
||||||
|
const cacheHit = videoOriginCache.get(resolvedUuid);
|
||||||
|
if (cacheHit && Date.now() - cacheHit.time < VIDEO_ORIGIN_CACHE_TTL_MS) {
|
||||||
|
if (cacheHit.notFound) return res.status(404).json({ error: 'Video not found' });
|
||||||
|
return res.json(cacheHit.payload);
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const rows = await dbQuery(
|
let rows = [];
|
||||||
`SELECT v.id, v.uuid, v.name, v.description, vi."targetUrl"
|
if (/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(resolvedUuid)) {
|
||||||
FROM "video" v
|
rows = await dbQuery(
|
||||||
LEFT JOIN "videoImport" vi ON vi."videoId" = v.id
|
`SELECT v.id, v.uuid, v.name, v.description, vi."targetUrl"
|
||||||
WHERE v.uuid::text = $1 OR v.id::text = $2
|
FROM "video" v
|
||||||
LIMIT 1`,
|
LEFT JOIN "videoImport" vi ON vi."videoId" = v.id
|
||||||
[resolvedUuid, rawParam]
|
WHERE v.uuid = $1::uuid
|
||||||
);
|
LIMIT 1`,
|
||||||
|
[resolvedUuid]
|
||||||
|
);
|
||||||
|
} else if (/^\d+$/.test(rawParam)) {
|
||||||
|
rows = await dbQuery(
|
||||||
|
`SELECT v.id, v.uuid, v.name, v.description, vi."targetUrl"
|
||||||
|
FROM "video" v
|
||||||
|
LEFT JOIN "videoImport" vi ON vi."videoId" = v.id
|
||||||
|
WHERE v.id = $1::int
|
||||||
|
LIMIT 1`,
|
||||||
|
[parseInt(rawParam, 10)]
|
||||||
|
);
|
||||||
|
}
|
||||||
if (rows.length === 0) {
|
if (rows.length === 0) {
|
||||||
|
if (videoOriginCache.size > 2000) videoOriginCache.clear();
|
||||||
|
videoOriginCache.set(resolvedUuid, { time: Date.now(), notFound: true });
|
||||||
return res.status(404).json({ error: 'Video not found' });
|
return res.status(404).json({ error: 'Video not found' });
|
||||||
}
|
}
|
||||||
|
|
||||||
const row = rows[0];
|
const row = rows[0];
|
||||||
let youtubeId = null;
|
const youtubeId = extractYouTubeIdFromRow(row);
|
||||||
|
|
||||||
if (row.targetUrl) {
|
const payload = {
|
||||||
const match =
|
|
||||||
row.targetUrl.match(/[?&]v=([^&]+)/) ||
|
|
||||||
row.targetUrl.match(/youtu\.be\/([^?]+)/) ||
|
|
||||||
row.targetUrl.match(/shorts\/([^?]+)/);
|
|
||||||
if (match) youtubeId = match[1];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!youtubeId && row.description) {
|
|
||||||
const match =
|
|
||||||
row.description.match(/youtube\.com\/watch\?v=([a-zA-Z0-9_-]{11})/) ||
|
|
||||||
row.description.match(/youtu\.be\/([a-zA-Z0-9_-]{11})/) ||
|
|
||||||
row.description.match(/shorts\/([a-zA-Z0-9_-]{11})/);
|
|
||||||
if (match) youtubeId = match[1];
|
|
||||||
}
|
|
||||||
|
|
||||||
return res.json({
|
|
||||||
ok: true,
|
ok: true,
|
||||||
hasYouTubeOrigin: !!youtubeId,
|
hasYouTubeOrigin: !!youtubeId,
|
||||||
youtubeId: youtubeId || null,
|
youtubeId: youtubeId || null,
|
||||||
targetUrl: row.targetUrl || null,
|
targetUrl: row.targetUrl || null,
|
||||||
title: row.name
|
title: row.name
|
||||||
});
|
};
|
||||||
|
if (videoOriginCache.size > 2000) videoOriginCache.clear();
|
||||||
|
videoOriginCache.set(resolvedUuid, { time: Date.now(), notFound: false, payload });
|
||||||
|
|
||||||
|
return res.json(payload);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
return res.status(500).json({ error: err.message });
|
return res.status(500).json({ error: err.message });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 6b. Akıllı Transkript & Bölüm (Chapters) Çekici
|
||||||
|
router.get('/video-transcript/:uuid', async (req, res) => {
|
||||||
|
if (isCrawlerBotRequest(req)) {
|
||||||
|
return res.json({ ok: false, botIgnored: true, cues: [], chapters: [] });
|
||||||
|
}
|
||||||
|
const rawParam = (req.params.uuid || '').trim();
|
||||||
|
if (!rawParam) return res.status(400).json({ ok: false, error: 'UUID required' });
|
||||||
|
const resolvedUuid = shortToUuid(rawParam);
|
||||||
|
const reqLang = String(req.query.lang || '')
|
||||||
|
.trim()
|
||||||
|
.toLowerCase();
|
||||||
|
const forceRefresh = req.query.refresh === '1' || req.query.refresh === 'true';
|
||||||
|
const queryYtId =
|
||||||
|
req.query.youtubeId && /^[a-zA-Z0-9_-]{11}$/.test(String(req.query.youtubeId).trim())
|
||||||
|
? String(req.query.youtubeId).trim()
|
||||||
|
: null;
|
||||||
|
const cacheKey = `${resolvedUuid}__${reqLang || 'auto'}__${queryYtId || 'db'}`;
|
||||||
|
|
||||||
|
if (!forceRefresh) {
|
||||||
|
const memHit = transcriptMemoryCache.get(cacheKey);
|
||||||
|
if (memHit) {
|
||||||
|
const ttl = memHit.hasContent ? TRANSCRIPT_OK_TTL_MS : TRANSCRIPT_EMPTY_TTL_MS;
|
||||||
|
if (Date.now() - memHit.time < ttl) {
|
||||||
|
return res.json(memHit.payload);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const storageRoot = resolveTranscriptStorageRoot();
|
||||||
|
const transcriptCacheDir = path.join(storageRoot, 'cache', 'transcripts');
|
||||||
|
const diskCachePath = path.join(
|
||||||
|
transcriptCacheDir,
|
||||||
|
`${resolvedUuid.replace(/[^a-zA-Z0-9_-]/g, '_')}_${reqLang || 'auto'}.json`
|
||||||
|
);
|
||||||
|
|
||||||
|
if (!forceRefresh && fs.existsSync(diskCachePath)) {
|
||||||
|
try {
|
||||||
|
const st = await fs.promises.stat(diskCachePath);
|
||||||
|
if (Date.now() - st.mtimeMs < 7 * 24 * 60 * 60 * 1000) {
|
||||||
|
const diskPayload = JSON.parse(await fs.promises.readFile(diskCachePath, 'utf8'));
|
||||||
|
if (diskPayload && diskPayload.ok) {
|
||||||
|
transcriptMemoryCache.set(cacheKey, {
|
||||||
|
time: Date.now(),
|
||||||
|
hasContent:
|
||||||
|
(diskPayload.cues && diskPayload.cues.length > 0) ||
|
||||||
|
(diskPayload.chapters && diskPayload.chapters.length > 0),
|
||||||
|
payload: diskPayload
|
||||||
|
});
|
||||||
|
return res.json(diskPayload);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (e) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (inFlightTranscriptRequests.has(cacheKey)) {
|
||||||
|
try {
|
||||||
|
const shared = await inFlightTranscriptRequests.get(cacheKey);
|
||||||
|
return res.json(shared);
|
||||||
|
} catch (err) {
|
||||||
|
return res.status(500).json({ ok: false, error: err.message });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const workPromise = (async () => {
|
||||||
|
let row = null;
|
||||||
|
if (/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(resolvedUuid)) {
|
||||||
|
const rows = await dbQuery(
|
||||||
|
`SELECT v.id, v.uuid, v.name, v.description, v.duration, v.language, vi."targetUrl"
|
||||||
|
FROM "video" v
|
||||||
|
LEFT JOIN "videoImport" vi ON vi."videoId" = v.id
|
||||||
|
WHERE v.uuid = $1::uuid
|
||||||
|
LIMIT 1`,
|
||||||
|
[resolvedUuid]
|
||||||
|
);
|
||||||
|
if (rows[0]) row = rows[0];
|
||||||
|
} else if (/^\d+$/.test(rawParam)) {
|
||||||
|
const rows = await dbQuery(
|
||||||
|
`SELECT v.id, v.uuid, v.name, v.description, v.duration, v.language, vi."targetUrl"
|
||||||
|
FROM "video" v
|
||||||
|
LEFT JOIN "videoImport" vi ON vi."videoId" = v.id
|
||||||
|
WHERE v.id = $1::int
|
||||||
|
LIMIT 1`,
|
||||||
|
[parseInt(rawParam, 10)]
|
||||||
|
);
|
||||||
|
if (rows[0]) row = rows[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!row && !queryYtId) {
|
||||||
|
return { ok: false, error: 'Video not found', cues: [], chapters: [] };
|
||||||
|
}
|
||||||
|
|
||||||
|
let cues = [];
|
||||||
|
let chapters = row ? parseChaptersFromDescription(row.description, Number(row.duration || 0)) : [];
|
||||||
|
let language = row && row.language ? row.language : null;
|
||||||
|
let languageName = language || '';
|
||||||
|
let isAutoGenerated = false;
|
||||||
|
let source = chapters.length > 0 ? 'description' : 'none';
|
||||||
|
let availableLanguages = [];
|
||||||
|
const youtubeId = queryYtId || extractYouTubeIdFromRow(row);
|
||||||
|
|
||||||
|
// 1. Try local/remote PeerTube videoCaption rows if not requesting a different language
|
||||||
|
if (row && row.id) {
|
||||||
|
try {
|
||||||
|
const capRows = await dbQuery(
|
||||||
|
`SELECT id, language, filename, "fileUrl", "automaticallyGenerated"
|
||||||
|
FROM "videoCaption"
|
||||||
|
WHERE "videoId" = $1
|
||||||
|
ORDER BY CASE WHEN language = $2 THEN 0 WHEN language = 'tr' THEN 1 WHEN language = 'en' THEN 2 ELSE 3 END, "automaticallyGenerated" ASC, id ASC
|
||||||
|
LIMIT 6`,
|
||||||
|
[row.id, reqLang || 'tr']
|
||||||
|
);
|
||||||
|
for (const cap of capRows) {
|
||||||
|
availableLanguages.push({
|
||||||
|
code: cap.language,
|
||||||
|
name: cap.language,
|
||||||
|
auto: Boolean(cap.automaticallyGenerated)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const matchedCap = reqLang
|
||||||
|
? capRows.find(c => String(c.language || '').toLowerCase() === reqLang)
|
||||||
|
: capRows[0];
|
||||||
|
if (matchedCap) {
|
||||||
|
let capText = '';
|
||||||
|
const localCapPath = matchedCap.filename
|
||||||
|
? path.join(storageRoot, 'captions', path.basename(matchedCap.filename))
|
||||||
|
: '';
|
||||||
|
const cachedCapPath = matchedCap.filename
|
||||||
|
? path.join(storageRoot, 'cache', 'video-captions', path.basename(matchedCap.filename))
|
||||||
|
: '';
|
||||||
|
if (localCapPath && fs.existsSync(localCapPath)) {
|
||||||
|
capText = await fs.promises.readFile(localCapPath, 'utf8');
|
||||||
|
} else if (cachedCapPath && fs.existsSync(cachedCapPath)) {
|
||||||
|
capText = await fs.promises.readFile(cachedCapPath, 'utf8');
|
||||||
|
} else if (matchedCap.fileUrl) {
|
||||||
|
capText = await fetchRemoteTextWithLimit(matchedCap.fileUrl, 7000);
|
||||||
|
}
|
||||||
|
const parsedLocalCues = parseSubtitlePayload(capText);
|
||||||
|
if (parsedLocalCues.length > 0) {
|
||||||
|
cues = parsedLocalCues;
|
||||||
|
language = matchedCap.language;
|
||||||
|
languageName = matchedCap.language;
|
||||||
|
isAutoGenerated = Boolean(matchedCap.automaticallyGenerated);
|
||||||
|
source = 'peertube-caption';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (capErr) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. Fallback to live YouTube subtitle & chapter extraction via yt-dlp when cues or chapters are still needed
|
||||||
|
if (youtubeId && (cues.length === 0 || chapters.length === 0 || reqLang)) {
|
||||||
|
try {
|
||||||
|
const ytdlpPath = resolveYtDlpPath(logger, customYtDlpPath, peertubeHelpers);
|
||||||
|
const ytUrl = `https://www.youtube.com/watch?v=${youtubeId}`;
|
||||||
|
const rawJsonStr = await new Promise((resolve, reject) => {
|
||||||
|
execFile(
|
||||||
|
ytdlpPath,
|
||||||
|
['--dump-single-json', '--skip-download', '--no-warnings', '--socket-timeout', '8', ytUrl],
|
||||||
|
{ maxBuffer: 14 * 1024 * 1024, timeout: 15000 },
|
||||||
|
(err, stdout) => {
|
||||||
|
if (err || !stdout) return reject(err || new Error('Empty yt-dlp output'));
|
||||||
|
resolve(stdout);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
const startIdx = rawJsonStr.indexOf('{');
|
||||||
|
const endIdx = rawJsonStr.lastIndexOf('}');
|
||||||
|
if (startIdx !== -1 && endIdx !== -1) {
|
||||||
|
const ytInfo = JSON.parse(rawJsonStr.substring(startIdx, endIdx + 1));
|
||||||
|
if (Array.isArray(ytInfo.chapters) && ytInfo.chapters.length > 0) {
|
||||||
|
chapters = ytInfo.chapters
|
||||||
|
.filter(c => c && c.title && c.start_time !== undefined)
|
||||||
|
.map(c => ({
|
||||||
|
title: String(c.title).trim(),
|
||||||
|
start: Math.max(0, Math.floor(Number(c.start_time || 0))),
|
||||||
|
end: c.end_time !== undefined ? Math.floor(Number(c.end_time)) : null
|
||||||
|
}));
|
||||||
|
} else if (chapters.length === 0 && ytInfo.description) {
|
||||||
|
chapters = parseChaptersFromDescription(ytInfo.description, Number(ytInfo.duration || 0));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cues.length === 0 || reqLang) {
|
||||||
|
const picked = pickPreferredCaptionTrack(ytInfo, reqLang, row && row.language);
|
||||||
|
if (picked.availableLanguages.length > 0) {
|
||||||
|
availableLanguages = picked.availableLanguages;
|
||||||
|
}
|
||||||
|
const candList = Array.isArray(picked.candidates)
|
||||||
|
? picked.candidates
|
||||||
|
: picked.chosen
|
||||||
|
? [picked.chosen]
|
||||||
|
: [];
|
||||||
|
for (const cand of candList) {
|
||||||
|
if (!cand || !cand.track || !cand.track.url) continue;
|
||||||
|
try {
|
||||||
|
const subText = await fetchRemoteTextWithLimit(cand.track.url, 9000);
|
||||||
|
const ytCues = parseSubtitlePayload(subText);
|
||||||
|
if (ytCues.length > 0) {
|
||||||
|
cues = ytCues;
|
||||||
|
language = cand.code;
|
||||||
|
languageName = (cand.track && cand.track.name) || cand.code;
|
||||||
|
isAutoGenerated = cand.isAuto;
|
||||||
|
source = cand.isAuto ? 'youtube-auto' : 'youtube-manual';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} catch (subFetchErr) {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (ytErr) {
|
||||||
|
if (logger) {
|
||||||
|
logger.warn(`[YakTube Transcript] Extract warning for ${resolvedUuid}: ${ytErr.message}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const payload = {
|
||||||
|
ok: true,
|
||||||
|
uuid: (row && row.uuid) || resolvedUuid,
|
||||||
|
title: (row && row.name) || '',
|
||||||
|
youtubeId: youtubeId || null,
|
||||||
|
language,
|
||||||
|
languageName,
|
||||||
|
isAutoGenerated,
|
||||||
|
source,
|
||||||
|
cues,
|
||||||
|
chapters,
|
||||||
|
availableLanguages
|
||||||
|
};
|
||||||
|
|
||||||
|
const hasCues = cues.length > 0;
|
||||||
|
const hasContent = hasCues || (chapters.length > 0 && availableLanguages.length === 0);
|
||||||
|
if (transcriptMemoryCache.size > 400) transcriptMemoryCache.clear();
|
||||||
|
transcriptMemoryCache.set(cacheKey, {
|
||||||
|
time: Date.now(),
|
||||||
|
hasContent,
|
||||||
|
payload
|
||||||
|
});
|
||||||
|
|
||||||
|
if (hasCues || (chapters.length > 0 && availableLanguages.length === 0)) {
|
||||||
|
try {
|
||||||
|
await fs.promises.mkdir(transcriptCacheDir, { recursive: true });
|
||||||
|
await fs.promises.writeFile(diskCachePath, JSON.stringify(payload), 'utf8');
|
||||||
|
} catch (diskErr) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
return payload;
|
||||||
|
})().finally(() => {
|
||||||
|
inFlightTranscriptRequests.delete(cacheKey);
|
||||||
|
});
|
||||||
|
|
||||||
|
inFlightTranscriptRequests.set(cacheKey, workPromise);
|
||||||
|
try {
|
||||||
|
const result = await workPromise;
|
||||||
|
return res.json(result);
|
||||||
|
} catch (err) {
|
||||||
|
return res.status(500).json({ ok: false, error: err.message, cues: [], chapters: [] });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// 7. YouTube Original Comments Route
|
// 7. YouTube Original Comments Route
|
||||||
router.get('/youtube-comments', async (req, res) => {
|
router.get('/youtube-comments', async (req, res) => {
|
||||||
const videoId = (req.query.id || req.query.v || '').trim();
|
const videoId = (req.query.id || req.query.v || '').trim();
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "peertube-plugin-yaktube-ondemand",
|
"name": "peertube-plugin-yaktube-ondemand",
|
||||||
"version": "1.7.14",
|
"version": "1.8.0",
|
||||||
"description": "Accessible On-Demand YouTube Import, Live Streams, Smart Recommendations, Sleep Timer, Touch Gestures, Voice Assistant & A11y Engine for PeerTube",
|
"description": "Accessible On-Demand YouTube Import, Live Streams, Smart Recommendations, Sleep Timer, Touch Gestures, Voice Assistant & A11y Engine for PeerTube",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"library": "./main.js",
|
"library": "./main.js",
|
||||||
|
|||||||
@@ -75,13 +75,13 @@ a[href*='joinpeertube'] {
|
|||||||
.yaktube-ondemand-section {
|
.yaktube-ondemand-section {
|
||||||
margin: 24px 0;
|
margin: 24px 0;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
background: rgba(22, 22, 30, 0.92);
|
background: rgba(18, 20, 28, 0.96);
|
||||||
border: 1px solid rgba(255, 143, 55, 0.35);
|
border: 1px solid rgba(255, 143, 55, 0.35);
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
backdrop-filter: blur(10px);
|
|
||||||
box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
|
box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
|
overflow-anchor: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.yaktube-header {
|
.yaktube-header {
|
||||||
@@ -153,16 +153,14 @@ a[href*='joinpeertube'] {
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
transition:
|
transition:
|
||||||
transform 0.2s ease,
|
|
||||||
border-color 0.2s ease,
|
border-color 0.2s ease,
|
||||||
box-shadow 0.2s ease;
|
box-shadow 0.2s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.yaktube-card:hover,
|
.yaktube-card:hover,
|
||||||
.yaktube-card:focus-within {
|
.yaktube-card:focus-within {
|
||||||
transform: translateY(-4px);
|
border-color: rgba(255, 143, 55, 0.65);
|
||||||
border-color: rgba(255, 143, 55, 0.6);
|
box-shadow: 0 8px 20px rgba(255, 143, 55, 0.18);
|
||||||
box-shadow: 0 10px 22px rgba(255, 143, 55, 0.18);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.yaktube-thumb-wrap {
|
.yaktube-thumb-wrap {
|
||||||
@@ -180,11 +178,6 @@ a[href*='joinpeertube'] {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
transition: transform 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.yaktube-card:hover .yaktube-thumb-img {
|
|
||||||
transform: scale(1.05);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.yaktube-duration-badge {
|
.yaktube-duration-badge {
|
||||||
@@ -1953,3 +1946,739 @@ label[for='auto-play-video'],
|
|||||||
visibility: hidden !important;
|
visibility: hidden !important;
|
||||||
pointer-events: none !important;
|
pointer-events: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ============================================================================
|
||||||
|
5. Live Audio Studio, Spectrum & A-B Loop (v1.8.0)
|
||||||
|
============================================================================ */
|
||||||
|
.yaktube-studio-modal {
|
||||||
|
max-width: 520px !important;
|
||||||
|
width: 94vw !important;
|
||||||
|
background: #141824 !important;
|
||||||
|
color: #f8fafc !important;
|
||||||
|
border: 1px solid rgba(255, 143, 55, 0.35) !important;
|
||||||
|
border-radius: 16px !important;
|
||||||
|
padding: 20px !important;
|
||||||
|
box-shadow: 0 20px 50px rgba(0, 0, 0, 0.75) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-studio-spectrum {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
max-width: 100%;
|
||||||
|
height: 64px;
|
||||||
|
border-radius: 10px;
|
||||||
|
background: rgba(15, 23, 42, 0.85);
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.08);
|
||||||
|
margin: 10px 0 14px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-studio-warn {
|
||||||
|
background: rgba(59, 130, 246, 0.16);
|
||||||
|
border: 1px solid rgba(96, 165, 250, 0.45);
|
||||||
|
color: #bfdbfe;
|
||||||
|
border-radius: 10px;
|
||||||
|
padding: 10px 12px;
|
||||||
|
font-size: 13px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-studio-presets {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 8px;
|
||||||
|
margin-bottom: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-studio-preset-btn {
|
||||||
|
background: #1e293b;
|
||||||
|
color: #e2e8f0;
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.14);
|
||||||
|
border-radius: 999px;
|
||||||
|
padding: 6px 12px;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 600;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.15s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-studio-preset-btn:hover,
|
||||||
|
.yaktube-studio-preset-btn:focus-visible {
|
||||||
|
border-color: #ff8f37;
|
||||||
|
outline: 2px solid #ff8f37;
|
||||||
|
outline-offset: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-studio-preset-btn.active {
|
||||||
|
background: linear-gradient(135deg, #ff8f37 0%, #ea580c 100%);
|
||||||
|
color: #0b0f19;
|
||||||
|
font-weight: 800;
|
||||||
|
border-color: #ff8f37;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-studio-sliders {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 10px;
|
||||||
|
margin-bottom: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-studio-row {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 4px;
|
||||||
|
font-size: 13px;
|
||||||
|
color: #cbd5e1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-studio-row span {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-studio-row input[type='range'] {
|
||||||
|
width: 100%;
|
||||||
|
accent-color: #ff8f37;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-studio-footer {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
gap: 12px;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
border-top: 1px solid rgba(255, 255, 255, 0.1);
|
||||||
|
padding-top: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-studio-check {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
font-size: 13px;
|
||||||
|
color: #e2e8f0;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-ab-loop-pill {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 20px;
|
||||||
|
left: 20px;
|
||||||
|
z-index: 99990;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
background: rgba(15, 23, 42, 0.96);
|
||||||
|
color: #f8fafc;
|
||||||
|
border: 1.5px solid #ff8f37;
|
||||||
|
border-radius: 999px;
|
||||||
|
padding: 8px 14px;
|
||||||
|
font-size: 13px;
|
||||||
|
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-ab-clear-btn {
|
||||||
|
background: rgba(255, 143, 55, 0.18);
|
||||||
|
color: #ff8f37;
|
||||||
|
border: 1px solid rgba(255, 143, 55, 0.5);
|
||||||
|
border-radius: 999px;
|
||||||
|
padding: 3px 10px;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 700;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ============================================================================
|
||||||
|
6. Smart Transcript Chapters, Playback Queue & Background Import (v1.8.0)
|
||||||
|
============================================================================ */
|
||||||
|
.yaktube-transcript-langs,
|
||||||
|
.yaktube-transcript-chapters {
|
||||||
|
padding: 10px 14px;
|
||||||
|
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
|
||||||
|
background: rgba(15, 23, 42, 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-transcript-langs {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-transcript-lang-btn {
|
||||||
|
background: #1e293b;
|
||||||
|
color: #cbd5e1;
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.14);
|
||||||
|
border-radius: 999px;
|
||||||
|
padding: 4px 10px;
|
||||||
|
font-size: 12px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-transcript-lang-btn.active {
|
||||||
|
background: #ff8f37;
|
||||||
|
color: #0b0f19;
|
||||||
|
font-weight: 700;
|
||||||
|
border-color: #ff8f37;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-chapters-title {
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 700;
|
||||||
|
color: #ff8f37;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-chapters-row {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 8px;
|
||||||
|
max-height: 120px;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-chapter-chip {
|
||||||
|
background: rgba(30, 41, 59, 0.9);
|
||||||
|
color: #f1f5f9;
|
||||||
|
border: 1px solid rgba(255, 143, 55, 0.3);
|
||||||
|
border-radius: 8px;
|
||||||
|
padding: 5px 10px;
|
||||||
|
font-size: 12px;
|
||||||
|
cursor: pointer;
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-chapter-chip:hover,
|
||||||
|
.yaktube-chapter-chip:focus-visible {
|
||||||
|
background: rgba(255, 143, 55, 0.22);
|
||||||
|
border-color: #ff8f37;
|
||||||
|
outline: 2px solid #ff8f37;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-chapter-time {
|
||||||
|
font-family: monospace;
|
||||||
|
color: #ff8f37;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-transcript-loading {
|
||||||
|
padding: 10px 14px;
|
||||||
|
font-size: 13px;
|
||||||
|
color: #93c5fd;
|
||||||
|
background: rgba(59, 130, 246, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-card-actions {
|
||||||
|
display: flex;
|
||||||
|
align-items: stretch;
|
||||||
|
gap: 6px;
|
||||||
|
margin-top: 8px;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-card-actions > .yaktube-import-btn,
|
||||||
|
.yaktube-card-actions > .yaktube-play-btn {
|
||||||
|
flex: 1 1 auto;
|
||||||
|
margin-top: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-queue-add-btn {
|
||||||
|
background: rgba(30, 41, 59, 0.95);
|
||||||
|
color: #fde68a;
|
||||||
|
border: 1px solid rgba(255, 143, 55, 0.45);
|
||||||
|
border-radius: 8px;
|
||||||
|
padding: 6px 10px;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 700;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.15s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-queue-add-btn:hover,
|
||||||
|
.yaktube-queue-add-btn:focus-visible {
|
||||||
|
background: #ff8f37;
|
||||||
|
color: #0b0f19;
|
||||||
|
outline: 2px solid #ff8f37;
|
||||||
|
outline-offset: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-floating-queue-btn {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 20px;
|
||||||
|
right: 20px;
|
||||||
|
z-index: 99985;
|
||||||
|
background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
|
||||||
|
color: #ff8f37;
|
||||||
|
border: 1.5px solid #ff8f37;
|
||||||
|
border-radius: 999px;
|
||||||
|
padding: 10px 16px;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 800;
|
||||||
|
cursor: pointer;
|
||||||
|
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-floating-queue-btn:focus-visible {
|
||||||
|
outline: 3px solid #fff;
|
||||||
|
outline-offset: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-queue-modal {
|
||||||
|
max-width: 580px !important;
|
||||||
|
width: 95vw !important;
|
||||||
|
background: #141824 !important;
|
||||||
|
color: #f8fafc !important;
|
||||||
|
border: 1px solid rgba(255, 143, 55, 0.35) !important;
|
||||||
|
border-radius: 16px !important;
|
||||||
|
padding: 20px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-queue-scroll {
|
||||||
|
max-height: 55vh;
|
||||||
|
overflow-y: auto;
|
||||||
|
margin: 10px 0 14px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-queue-list {
|
||||||
|
list-style: none;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-queue-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
background: rgba(30, 41, 59, 0.72);
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.08);
|
||||||
|
border-radius: 10px;
|
||||||
|
padding: 8px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-queue-num {
|
||||||
|
width: 24px;
|
||||||
|
height: 24px;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: rgba(255, 143, 55, 0.2);
|
||||||
|
color: #ff8f37;
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-weight: 800;
|
||||||
|
font-size: 12px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-queue-thumb {
|
||||||
|
width: 68px;
|
||||||
|
height: 40px;
|
||||||
|
object-fit: cover;
|
||||||
|
border-radius: 6px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-queue-meta {
|
||||||
|
flex: 1 1 auto;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-queue-item-title {
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 700;
|
||||||
|
color: #f8fafc;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-queue-item-sub {
|
||||||
|
font-size: 11px;
|
||||||
|
color: #94a3b8;
|
||||||
|
margin-top: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-queue-item-actions {
|
||||||
|
display: flex;
|
||||||
|
gap: 4px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-queue-act-btn {
|
||||||
|
background: #0f172a;
|
||||||
|
color: #f8fafc;
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.14);
|
||||||
|
border-radius: 6px;
|
||||||
|
padding: 4px 7px;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-queue-act-btn:hover,
|
||||||
|
.yaktube-queue-act-btn:focus-visible {
|
||||||
|
border-color: #ff8f37;
|
||||||
|
outline: 2px solid #ff8f37;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-bg-import-pill {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 70px;
|
||||||
|
right: 20px;
|
||||||
|
z-index: 99992;
|
||||||
|
max-width: 360px;
|
||||||
|
background: rgba(15, 23, 42, 0.97);
|
||||||
|
color: #f8fafc;
|
||||||
|
border: 1.5px solid #38bdf8;
|
||||||
|
border-radius: 12px;
|
||||||
|
padding: 12px 14px;
|
||||||
|
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-bg-import-pill.ready {
|
||||||
|
border-color: #10b981;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-bg-import-text {
|
||||||
|
font-size: 13px;
|
||||||
|
line-height: 1.4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-bg-import-actions {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-bg-import-go-btn {
|
||||||
|
background: #10b981;
|
||||||
|
color: #052e16;
|
||||||
|
text-decoration: none;
|
||||||
|
padding: 5px 12px;
|
||||||
|
border-radius: 8px;
|
||||||
|
font-weight: 800;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-bg-import-sub-btn,
|
||||||
|
.yaktube-bg-import-close-btn {
|
||||||
|
background: #1e293b;
|
||||||
|
color: #e2e8f0;
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.16);
|
||||||
|
border-radius: 8px;
|
||||||
|
padding: 5px 10px;
|
||||||
|
font-size: 12px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ============================================================================
|
||||||
|
7. Continue Watching Shelf, Command Palette & Admin Server Cockpit (v1.8.0)
|
||||||
|
============================================================================ */
|
||||||
|
.yaktube-cmd-palette-trigger-btn {
|
||||||
|
width: 34px;
|
||||||
|
height: 34px;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: rgba(30, 41, 59, 0.9);
|
||||||
|
color: #ff8f37;
|
||||||
|
border: 1px solid rgba(255, 143, 55, 0.45);
|
||||||
|
font-weight: 800;
|
||||||
|
font-size: 14px;
|
||||||
|
cursor: pointer;
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
flex-shrink: 0;
|
||||||
|
margin-left: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-cmd-palette-trigger-btn:hover,
|
||||||
|
.yaktube-cmd-palette-trigger-btn:focus-visible {
|
||||||
|
background: #ff8f37;
|
||||||
|
color: #0b0f19;
|
||||||
|
outline: 2px solid #ff8f37;
|
||||||
|
outline-offset: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-continue-shelf {
|
||||||
|
margin: 14px 0 22px 0;
|
||||||
|
padding: 16px;
|
||||||
|
background: linear-gradient(135deg, rgba(15, 23, 42, 0.92) 0%, rgba(30, 41, 59, 0.85) 100%);
|
||||||
|
border: 1px solid rgba(255, 143, 55, 0.28);
|
||||||
|
border-radius: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-continue-header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-continue-header h3 {
|
||||||
|
margin: 0;
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 800;
|
||||||
|
color: #ff8f37;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-continue-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
|
||||||
|
gap: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-continue-card {
|
||||||
|
background: rgba(15, 23, 42, 0.85);
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.08);
|
||||||
|
border-radius: 12px;
|
||||||
|
overflow: hidden;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-continue-thumb-link {
|
||||||
|
position: relative;
|
||||||
|
display: block;
|
||||||
|
aspect-ratio: 16 / 9;
|
||||||
|
background: #020617;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-continue-thumb-link img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-continue-badge {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 8px;
|
||||||
|
right: 8px;
|
||||||
|
background: rgba(2, 6, 23, 0.88);
|
||||||
|
color: #fde68a;
|
||||||
|
font-size: 11px;
|
||||||
|
font-weight: 700;
|
||||||
|
padding: 2px 7px;
|
||||||
|
border-radius: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-continue-progress {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
height: 4px;
|
||||||
|
background: rgba(255, 255, 255, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-continue-progress > div {
|
||||||
|
height: 100%;
|
||||||
|
background: linear-gradient(90deg, #ff8f37, #ea580c);
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-continue-body {
|
||||||
|
padding: 10px 12px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 6px;
|
||||||
|
flex: 1 1 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-continue-title {
|
||||||
|
color: #f8fafc;
|
||||||
|
text-decoration: none;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 700;
|
||||||
|
line-height: 1.35;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-continue-sub {
|
||||||
|
font-size: 11px;
|
||||||
|
color: #94a3b8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-continue-actions {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 6px;
|
||||||
|
margin-top: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-continue-resume-btn {
|
||||||
|
flex: 1 1 auto;
|
||||||
|
text-align: center;
|
||||||
|
background: linear-gradient(135deg, #ff8f37 0%, #ea580c 100%);
|
||||||
|
color: #0b0f19 !important;
|
||||||
|
text-decoration: none !important;
|
||||||
|
font-weight: 800;
|
||||||
|
font-size: 12px;
|
||||||
|
padding: 6px 10px;
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-cw-remove-btn {
|
||||||
|
background: #1e293b;
|
||||||
|
color: #cbd5e1;
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.14);
|
||||||
|
border-radius: 8px;
|
||||||
|
padding: 6px 8px;
|
||||||
|
font-size: 12px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-cmd-modal {
|
||||||
|
max-width: 580px !important;
|
||||||
|
width: 95vw !important;
|
||||||
|
background: #0f172a !important;
|
||||||
|
color: #f8fafc !important;
|
||||||
|
border: 1.5px solid #ff8f37 !important;
|
||||||
|
border-radius: 16px !important;
|
||||||
|
padding: 18px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-cmd-input {
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin: 10px 0 12px 0;
|
||||||
|
padding: 10px 14px;
|
||||||
|
border-radius: 10px;
|
||||||
|
border: 1px solid rgba(255, 143, 55, 0.5);
|
||||||
|
background: #1e293b;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-cmd-input:focus {
|
||||||
|
outline: 2px solid #ff8f37;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-cmd-list {
|
||||||
|
list-style: none;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
max-height: 50vh;
|
||||||
|
overflow-y: auto;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-cmd-item {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
padding: 10px 12px;
|
||||||
|
border-radius: 10px;
|
||||||
|
background: rgba(30, 41, 59, 0.65);
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-cmd-item:hover,
|
||||||
|
.yaktube-cmd-item.selected {
|
||||||
|
background: rgba(255, 143, 55, 0.24);
|
||||||
|
outline: 2px solid #ff8f37;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-cmd-empty {
|
||||||
|
text-align: center;
|
||||||
|
padding: 20px;
|
||||||
|
color: #94a3b8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-cockpit-modal {
|
||||||
|
max-width: 720px !important;
|
||||||
|
width: 96vw !important;
|
||||||
|
background: #0f172a !important;
|
||||||
|
color: #f8fafc !important;
|
||||||
|
border: 1.5px solid rgba(56, 189, 248, 0.55) !important;
|
||||||
|
border-radius: 16px !important;
|
||||||
|
padding: 20px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-cockpit-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
|
||||||
|
gap: 10px;
|
||||||
|
text-align: left;
|
||||||
|
margin-bottom: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-cockpit-card {
|
||||||
|
background: rgba(30, 41, 59, 0.82);
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.08);
|
||||||
|
border-radius: 12px;
|
||||||
|
padding: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-cockpit-label {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #94a3b8;
|
||||||
|
margin-bottom: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-cockpit-val {
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 800;
|
||||||
|
color: #ff8f37;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-cockpit-sub {
|
||||||
|
font-size: 11px;
|
||||||
|
color: #cbd5e1;
|
||||||
|
margin-top: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-cockpit-section-title {
|
||||||
|
text-align: left;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 700;
|
||||||
|
color: #38bdf8;
|
||||||
|
margin: 8px 0 6px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-cockpit-issues {
|
||||||
|
list-style: none;
|
||||||
|
margin: 0 0 14px 0;
|
||||||
|
padding: 0;
|
||||||
|
max-height: 150px;
|
||||||
|
overflow-y: auto;
|
||||||
|
text-align: left;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-cockpit-issues li {
|
||||||
|
background: rgba(30, 41, 59, 0.6);
|
||||||
|
padding: 7px 10px;
|
||||||
|
border-radius: 8px;
|
||||||
|
font-size: 12px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-cockpit-actions {
|
||||||
|
display: flex;
|
||||||
|
gap: 10px;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: flex-end;
|
||||||
|
border-top: 1px solid rgba(255, 255, 255, 0.1);
|
||||||
|
padding-top: 12px;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user