엑셀 양식 2단계: 일반 퀴즈 파일을 제목·가수·정답·가수 정답으로 나눔(정답은 ;로 여러 개, 제목·가수는 늘 정답, 내보내기는 제목·가수를 정답 칸 맨 앞에), 길이·비고 열. 예전 양식(정답=제목·설명·다른 정답)은 '제목' 열이 없으면 그대로 읽음. 파일 제목도 괄호·feat.·버전 표시를 지우고 괄호 안 다른 이름은 정답으로. 정답·가수 정답 칸이 빈 곡은 서버가 채움(POST /api/admin/quizzes/answers — 제목 정리 별칭 + 같은 DB 곡 별칭, answers/index.ts). 재생목록으로 엑셀 만들기: 일반 퀴즈용(정답·가수 정답·힌트)과 이지선다용(빈 조회수 열 → 파일로 만들기가 이지선다로 고름) 두 양식, 플레이리스트 가져오기 결과에 정리된 제목과 정답. 단위·API 테스트, e2e quiz(두 양식 받기)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
EJClaw
2026-11-04 16:00:33 +09:00
parent 2e333dd3f7
commit 74eaeb85da
11 changed files with 331 additions and 117 deletions

View File

@@ -0,0 +1,52 @@
/**
* 정답 자동 생성 (docs/13): for a song's title and artist, the answers people may type besides the names shown.
* - the title without brackets / feat. / version marks (cleanTitle) and the other names that were in brackets
* - the aliases the server DB already has for that song and its artists
* The names shown (제목·가수) always count on their own, so they are never listed again.
*/
import type { Database } from 'bun:sqlite';
import { cleanTitle } from '@mq/shared';
export interface SongAnswers {
/** The title to show (cleaned). */
title: string;
titleAnswers: string[];
artistAnswers: string[];
}
const MAX = 30;
function uniq(list: string[], except: string): string[] {
const seen = new Set([except.trim().toLowerCase()]);
const out: string[] = [];
for (const raw of list) {
const a = raw.replace(/\s+/g, ' ').trim().slice(0, 200);
const k = a.toLowerCase();
if (!a || seen.has(k)) continue;
seen.add(k);
out.push(a);
}
return out.slice(0, MAX);
}
/** DB aliases of a song (its own and its artists'). */
export function dbAliases(db: Database, songId: number): { title: string[]; artist: string[] } {
const col = (sql: string) => db.query<{ v: string }, [number]>(sql).all(songId).map((r) => r.v);
return {
title: col("SELECT alias v FROM song_aliases WHERE song_id = ? AND part = 'title'"),
artist: [
...col("SELECT alias v FROM song_aliases WHERE song_id = ? AND part = 'artist'"),
...col('SELECT x.alias v FROM song_artists sa JOIN artist_aliases x ON x.artist_id = sa.artist_id WHERE sa.song_id = ?'),
],
};
}
export function songAnswers(db: Database | null, s: { title: string; artist: string; songId?: number | null }): SongAnswers {
const clean = cleanTitle(s.title);
const fromDb = db && s.songId ? dbAliases(db, s.songId) : { title: [], artist: [] };
return {
title: clean.title,
titleAnswers: uniq([...clean.aliases, ...fromDb.title], clean.title),
artistAnswers: uniq(fromDb.artist, s.artist),
};
}

View File

@@ -7,6 +7,7 @@ import { Client, TEST_SUPERADMINS, api, boot, discordLogin, guest, sleep } from
type Msg<T extends ServerMessage['t']> = Extract<ServerMessage, { t: T }>;
const TIMING = { countdownMs: 40, revealMs: 80, resumeLeadMs: 30, clipGraceMs: 150, lateMs: 150, tickMs: 20 };
const addAliases = (song: number) => s.db.query("INSERT INTO song_aliases (song_id, part, alias) VALUES (?, 'title', 'Good Day'), (?, 'artist', 'IU')").run(song, song);
const fakeDiscord = async (code: string) => ({ id: code, username: 'u', global_name: `회원${code.slice(-2)}`, avatar: null });
let s: ReturnType<typeof boot>;
@@ -198,6 +199,7 @@ test('a quiz game plays every song in order from its own 처음 position and acc
test('플레이리스트 가져오기: DB songs by video, cleaned YouTube titles, Spotify tracks found on YouTube Music, misses marked', async () => {
const song = start();
addAliases(song);
const sa = await adminCookie(TEST_SUPERADMINS[0]);
const r = await api(s.base, '/api/admin/quizzes/pick/playlist', { method: 'POST', cookie: sa, body: JSON.stringify({ url: 'https://open.spotify.com/playlist/x' }) });
expect(r.res.status).toBe(200);
@@ -212,11 +214,30 @@ test('플레이리스트 가져오기: DB songs by video, cleaned YouTube titles
expect(rows[1]).toMatchObject({ status: 'video', title: 'LOVE DIVE', artist: 'IVE 아이브', videoId: 'lovedive001', note: '' });
expect(rows[2]).toMatchObject({ status: 'found', videoId: 'hypeboy0001' });
expect(rows[3]).toMatchObject({ status: 'missing', videoId: null });
// answers besides the shown names (docs/13): the DB song's aliases come along
expect(rows[0]).toMatchObject({ titleAnswers: ['Good Day'], artistAnswers: ['IU'] });
// someone else's job is not visible
const g = await guest(s.base, '손님');
expect((await api(s.base, `/api/admin/quizzes/pick/playlist/${job.id}`, { cookie: g.cookie })).res.status).toBe(403);
});
test('정답 자동 채우기 (docs/13): cleaned-title names and the aliases of the same DB song', async () => {
addAliases(start());
const sa = await adminCookie(TEST_SUPERADMINS[0]);
const r = await api(s.base, '/api/admin/quizzes/answers', {
method: 'POST',
cookie: sa,
body: JSON.stringify({ songs: [{ title: '좋은 날', artist: '아이유' }, { title: '사랑을 했다(LOVE SCENARIO)', artist: '아이콘' }, { title: '모르는 곡' }] }),
});
expect(r.body.answers).toEqual([
{ titleAnswers: ['Good Day'], artistAnswers: ['IU'] },
{ titleAnswers: ['LOVE SCENARIO', '사랑을 했다 LOVE SCENARIO'], artistAnswers: [] },
{ titleAnswers: [], artistAnswers: [] },
]);
const g = await guest(s.base, '손님');
expect((await api(s.base, '/api/admin/quizzes/answers', { method: 'POST', cookie: g.cookie, body: JSON.stringify({ songs: [] }) })).res.status).toBe(403);
});
test('검토 대기: a 전체공개 quiz sends new songs and differences to admins; applied or rejected ones are not asked again', async () => {
const song = start();
const sa = await adminCookie(TEST_SUPERADMINS[0]);

View File

@@ -16,6 +16,7 @@ import { getImportJob, startImport, type Lavalink } from '../quizzes/playlist';
import { applyReview, listReviews, pendingCount, rejectReview, syncReviews } from '../quizzes/review';
import { checkEmbed, type EmbedState } from '../collector/oembed';
import { DuelViewsJob, type ViewsSource } from '../quizzes/duel-views';
import { songAnswers } from '../answers';
type Env = { Variables: { userId: string | null; role: Role } };
@@ -246,6 +247,24 @@ export function mountQuizAdmin(app: Hono<Env>, d: QuizAdminDeps, h: { actor: (c:
return job ? c.json({ job }) : c.json({ error: '가져오기 작업을 찾을 수 없어요.' }, 404);
});
/**
* 정답 자동 채우기 (파일로 만들기·파일에서 가져오기, docs/13): answers for songs whose 정답 / 가수 정답 cells were empty.
* A song the server DB has (same title + artist) lends its aliases too.
*/
app.post('/quizzes/answers', async (c) => {
const p = z
.object({ songs: z.array(z.object({ title: z.string().max(200), artist: z.string().max(200).default('') })).max(1000) })
.safeParse(await h.body(c));
if (!p.success) return c.json({ error: '입력 값이 올바르지 않아요.' }, 400);
const byKey = d.db.query<{ id: number }, [string]>('SELECT id FROM songs WHERE match_key = ? AND deleted_at IS NULL ORDER BY id LIMIT 1');
const answers = p.data.songs.map((s) => {
const songId = s.artist ? (byKey.get(songMatchKey(s.title, s.artist))?.id ?? null) : null;
const a = songAnswers(d.db, { ...s, songId });
return { titleAnswers: a.titleAnswers, artistAnswers: a.artistAnswers };
});
return c.json({ answers });
});
/** DB facts of songs just added in the editor (before saving): aliases and the DB highlight for 자동. */
app.get('/quizzes/pick/songs', (c) => {
const ids = (c.req.query('ids') ?? '').split(',').map(Number).filter((x) => Number.isInteger(x) && x > 0).slice(0, 500);

View File

@@ -13,6 +13,7 @@ import { isConfident, scoreResult } from '../collector/score';
import type { YtmSong } from '../collector/ytmusic';
import type { EmbedState } from '../collector/oembed';
import { aliasesOf } from '../songs/youtube-review';
import { songAnswers } from '../answers';
export interface LavalinkTrack {
identifier: string;
@@ -67,6 +68,9 @@ export interface ImportRow {
source: { title: string; artist: string };
title: string;
artist: string;
/** Accepted answers besides 제목·가수 (docs/13): other names, DB aliases, 한글 발음 … */
titleAnswers: string[];
artistAnswers: string[];
durationSec: number | null;
videoId: string | null;
songId: number | null;
@@ -132,7 +136,7 @@ async function runImport(d: ImportDeps, job: ImportJob, tracks: LavalinkTrack[])
const dur = t.length ? Math.round(t.length / 1000) : null;
const yt = t.sourceName === 'youtube';
const named = yt ? cleanVideoTitle(t.title, t.author) : { title: t.title, artist: t.author, guessed: false };
const row: ImportRow = { n: i + 1, source: { title: t.title, artist: t.author }, title: named.title, artist: named.artist, durationSec: dur, videoId: null, songId: null, status: 'missing', note: '' };
const row: ImportRow = { n: i + 1, source: { title: t.title, artist: t.author }, title: named.title, artist: named.artist, titleAnswers: [], artistAnswers: [], durationSec: dur, videoId: null, songId: null, status: 'missing', note: '' };
const dbSong = (yt ? byVideo.get(t.identifier) : null) ?? byKey.get(songMatchKey(named.title, named.artist));
// the video must play on other sites, the DB song's own video too (the DB state may be old)
const playable = async (videoId: string) => {
@@ -166,6 +170,9 @@ async function runImport(d: ImportDeps, job: ImportJob, tracks: LavalinkTrack[])
} else if (!row.note) row.note = '유튜브에서 못 찾았어요';
if (i < tracks.length - 1) await Bun.sleep(d.delayMs ?? 700);
}
// shown title without brackets / feat. / version marks, plus the answers worked out for it (docs/13)
const a = songAnswers(d.db, row);
Object.assign(row, { title: a.title, titleAnswers: a.titleAnswers, artistAnswers: a.artistAnswers });
job.rows.push(row);
job.done = i + 1;
}

View File

@@ -1,7 +1,8 @@
/**
* 재생목록으로 엑셀 만들기 (관리자 → 퀴즈): a playlist address → the server checks every song (플레이리스트 가져오기의 같은
* 작업: 서버 DB 곡, 영상 제목 정리, 스포티파이는 유튜브 뮤직에서 찾기, 다른 사이트 재생 확인) → a quiz file to fill in
* 시작·하이라이트 and upload with 파일로 만들기 (일반 or 이지선다). Songs that would not play go to the sheet 빠진 곡.
* 시작·하이라이트 and upload with 파일로 만들기. Two forms (docs/13): 일반 퀴즈 (제목·가수·정답·가수 정답·힌트) and
* 이지선다 (제목·가수·an empty 조회수 column). Songs that would not play go to the sheet 빠진 곡.
*/
import { useEffect, useMemo, useState } from 'react';
import { playlistSheets, writeXlsxSheets, type PlaylistSheetRow } from '@mq/shared/lite';
@@ -57,9 +58,10 @@ export function PlaylistSheet({ onClose }: { onClose: () => void }) {
}
};
const sheets = useMemo(() => (job?.status === 'done' ? playlistSheets(job.rows) : null), [job]);
const duelSheets = useMemo(() => (job?.status === 'done' ? playlistSheets(job.rows, 'duel') : null), [job]);
const kept = sheets ? sheets[0]!.rows.slice(1) : [];
const left = sheets ? sheets[1]!.rows.slice(1) : [];
const toCheck = kept.filter((r) => String(r[7] ?? '').includes('확인 필요')).length;
const toCheck = kept.filter((r) => String(r[r.length - 1] ?? '').includes('확인 필요')).length;
const fileName = job?.name.trim() || '재생목록 퀴즈';
return (
<div className="card stack" style={{ gap: 10 }}>
@@ -82,9 +84,13 @@ export function PlaylistSheet({ onClose }: { onClose: () => void }) {
</button>
</form>
<p className="muted small" style={{ margin: 0 }}>
곡마다 서버 노래 DB, 영상 제목, 다른 사이트 재생 여부를 확인해서 <b>순번 · 유튜브 영상 링크 · 제목 · 가수 · 시작(초) · 하이라이트(초) · 길이(초) · 비고</b> 엑셀을
만들어요. 시작·하이라이트를 채우고(비워 두면 올릴 때 자동 / 처음부터 중에 골라요) <b>파일로 만들기</b>에 그대로 올리면 돼요. 일반 퀴즈는 제목이 정답, 가수가 정답 공개 때
같이 보이는 설명이 되고, 이지선다는 조회수를 서버가 불러와요. 재생이 막혔거나 없는 영상, 같은 영상은 <b>빠진 곡</b> 시트로 옮겨요.
곡마다 서버 노래 DB, 영상 제목, 다른 사이트 재생 여부를 확인해서 엑셀을 만들어요. 제목의 괄호·feat.·버전 표시는 지우고, 정답으로 인정할 다른 표기는{' '}
<b>정답 · 가수 정답</b> 열에 ;로 나눠 적어 둬요(제목·가수는 적지 않아도 늘 정답이에요). 양식은 두 가지예요.
<br />· <b>일반 퀴즈용</b>: 순번 · 링크 · 제목 · 가수 · 정답 · 가수 정답 · 힌트 · 시작(초) · 하이라이트(초) · 길이(초) · 비고
<br />· <b>이지선다용</b>: 순번 · 링크 · 제목 · 가수 · 조회수 · 시작(초) · 하이라이트(초) · 길이(초) · 비고 — 조회수는 비워 두면 서버가 불러와요
<br />
시작·하이라이트를 채우고(비워 두면 올릴 때 자동 / 처음부터 중에 골라요) <b>파일로 만들기</b>에 그대로 올리면 돼요. 재생이 막혔거나 없는 영상, 같은 영상은{' '}
<b>빠진 곡</b> 시트로 옮겨요.
</p>
{job && (
<div className="stack" style={{ gap: 4 }}>
@@ -129,7 +135,10 @@ export function PlaylistSheet({ onClose }: { onClose: () => void }) {
)}
<div className="row">
<button type="button" className="btn btn-primary" disabled={!kept.length && !left.length} onClick={() => download(fileName, writeXlsxSheets(sheets))}>
📥 엑셀 받기 ({kept.length}곡)
📥 일반 퀴즈용 엑셀 ({kept.length}곡)
</button>
<button type="button" className="btn" disabled={!kept.length && !left.length} onClick={() => download(`${fileName} (이지선다)`, writeXlsxSheets(duelSheets!))}>
📥 이지선다용 엑셀 ({kept.length}곡)
</button>
{toCheck > 0 && <span className="muted small">비고에 "확인 필요"라고 적힌 곡은 영상을 보고 제목·가수를 고쳐 주세요.</span>}
</div>

View File

@@ -1,9 +1,10 @@
/**
* 퀴즈 파일 (관리자 → 퀴즈): 파일로 만들기 (a new quiz from .xlsx / .csv), 파일에서 가져오기 (into the open quiz),
* 엑셀로 내보내기 and 빈 양식. The browser reads the file; columns are recognised by their headers and can be changed.
* Values are used as written — bad links and repeated videos are listed and left out.
* Values are used as written — bad links and repeated videos are listed and left out. 일반 퀴즈 songs whose 정답 /
* 가수 정답 cells are empty get answers worked out by the server (docs/13).
*/
import { useMemo, useState } from 'react';
import { useEffect, useMemo, useState } from 'react';
import {
DUEL_COLUMN_LABEL,
QUIZ_COLUMN_LABEL,
@@ -23,6 +24,7 @@ import {
type Sheet,
} from '@mq/shared/lite';
import { toast } from '../../store/toast';
import { apiCall } from '../../net/api';
import { ConfirmSheet } from '../../components/ui';
import { Seg } from '../../components/RoomSettings';
@@ -112,7 +114,38 @@ export function QuizFileImport({
const missing = (['link', 'answer'] as const).filter((c) => !columns.includes(c));
const duel = kind === 'duel';
const bad = parsed?.rows.filter((r) => r.problem) ?? [];
const items = parsed?.items ?? [];
// 정답 자동 채우기: the songs whose 정답 / 가수 정답 cells were empty, answered by the server
const toFill = useMemo(() => (duel ? [] : (parsed?.rows ?? []).filter((r) => r.item && (r.fill.title || r.fill.artist))), [parsed, duel]);
const fillKey = (it: { title: string; artist: string }) => `${it.title}\u0000${it.artist}`;
const [filled, setFilled] = useState<Record<string, { titleAnswers: string[]; artistAnswers: string[] }>>({});
const [filling, setFilling] = useState(false);
useEffect(() => {
const want = [...new Map(toFill.map((r) => [fillKey(r.item!), { title: r.item!.title, artist: r.item!.artist }])).values()].filter((x) => !filled[fillKey(x)]);
if (!want.length) return;
let live = true;
setFilling(true);
apiCall<{ answers: { titleAnswers: string[]; artistAnswers: string[] }[] }>('POST', '/api/admin/quizzes/answers', { songs: want.slice(0, 1000) })
.then((r) => live && setFilled((cur) => ({ ...cur, ...Object.fromEntries(want.map((x, i) => [fillKey(x), r.answers[i] ?? { titleAnswers: [], artistAnswers: [] }])) })))
.catch((e: Error) => live && toast(`정답 자동 채우기를 못 했어요(적힌 정답만 써요): ${e.message}`, 'error'))
.finally(() => live && setFilling(false));
return () => {
live = false;
};
}, [toFill]); // eslint-disable-line react-hooks/exhaustive-deps
const items = useMemo(() => {
const fill = new Map(toFill.map((r) => [r.item!, r.fill]));
return (parsed?.items ?? []).map((it) => {
const f = fill.get(it);
const got = f && filled[fillKey(it)];
if (!f || !got) return it;
const merge = (a: string[], b: string[], except: string) => [...new Set([...a, ...b])].filter((x) => x !== except).slice(0, 30);
return {
...it,
titleAnswers: f.title ? merge(it.titleAnswers, got.titleAnswers, it.title) : it.titleAnswers,
artistAnswers: f.artist ? merge(it.artistAnswers, got.artistAnswers, it.artist) : it.artistAnswers,
};
});
}, [parsed, toFill, filled]);
const inList = new Set(existing.map((x) => x.videoId));
const appendable = items.filter((x) => !inList.has(x.videoId));
const width = Math.max(header.length, ...(sheet?.rows.slice(headerAt, headerAt + 20).map((r) => r.length) ?? [0]));
@@ -189,8 +222,10 @@ export function QuizFileImport({
)}
{!file && !duel && (
<p className="muted small" style={{ margin: 0 }}>
한 줄에 한 곡씩, 첫 줄은 열 이름이에요. <b>유튜브 영상 링크</b>와 <b>정답</b>(예: 게임 제목)은 꼭 있어야 하고, <b>설명</b>(예: 노래 제목)은 정답을 공개할 때 같이
보여요. <b>힌트</b> 열은 문제마다 먼저 나오고, 그다음 힌트로 초성이 나와요. <b>순번</b> 열이 있으면 그 순서대로 넣어요. 적힌 값은 고치지 않고 그대로 써요.
한 줄에 한 곡씩, 첫 줄은 열 이름이에요. <b>유튜브 영상 링크</b>와 <b>제목</b>은 꼭 있어야 하고, <b>가수</b>는 정답을 공개할 때 같이 보여요. 제목·가수는 늘
정답이고, <b>정답 · 가수 정답</b> 열에 다른 표기를 ;로 나눠 적으면(예: 라일락; LILAC) 그것도 정답이 돼요. 이 칸이 비어 있으면 서버가 다른 표기(괄호 안 이름, 한글
발음 등)를 자동으로 채워요. 제목의 괄호·feat.·버전 표시는 지워서 보여 줘요. <b>힌트</b> 열은 문제마다 먼저 나오고, 그다음 힌트로 초성이 나와요. <b>순번</b> 열이
있으면 그 순서대로 넣어요. 예전 양식(정답 · 설명 · 다른 정답)도 그대로 읽어요.
</p>
)}
{file && sheet && (
@@ -235,6 +270,7 @@ export function QuizFileImport({
<b>{items.length}곡</b>
{bad.length > 0 && <span className="warn-text"> · 빠지는 줄 {bad.length}개</span>}
{mode === 'into' && items.length > appendable.length && <span className="muted"> · 이미 목록에 있는 영상 {items.length - appendable.length}곡</span>}
{toFill.length > 0 && <span className="muted"> · 정답 칸이 빈 곡 {toFill.length}곡{filling ? ' (자동으로 채우는 중…)' : ' (자동으로 채웠어요)'}</span>}
</div>
{blankCount > 0 && (
<div className="stack" style={{ gap: 4 }}>
@@ -288,8 +324,8 @@ export function QuizFileImport({
<thead>
<tr>
<th style={{ width: 44 }}>#</th>
<th>{duel ? '제목' : '정답'}</th>
<th>{duel ? '가수' : '설명'}</th>
<th>제목</th>
<th>가수</th>
<th>{duel ? '조회수' : '힌트'}</th>
<th>영상</th>
</tr>
@@ -302,7 +338,10 @@ export function QuizFileImport({
<b>{it.title}</b>
{it.titleAnswers.length > 0 && <div className="muted small">또는 {it.titleAnswers.join(', ')}</div>}
</td>
<td className="small">{it.artist || <span className="muted">-</span>}</td>
<td className="small">
{it.artist || <span className="muted">-</span>}
{it.artistAnswers.length > 0 && <div className="muted small">또는 {it.artistAnswers.join(', ')}</div>}
</td>
{duel ? (
<td className="small mono" title={it.views !== null ? `${it.views.toLocaleString('ko-KR')}회 (파일에 적힌 값)` : '올린 뒤 토픽 + MV 조회수를 불러와요'}>
{it.views !== null ? `${viewsLabel(it.views)}회` : <span className="muted">자동</span>}
@@ -333,16 +372,16 @@ export function QuizFileImport({
퀴즈 이름
<input className="input grow" value={name} maxLength={60} onChange={(e) => setName(e.target.value)} aria-label="퀴즈 이름" />
</label>
<button className="btn btn-primary" disabled={busy || !name.trim() || items.length < (duel ? 2 : 1)}>
<button className="btn btn-primary" disabled={busy || filling || !name.trim() || items.length < (duel ? 2 : 1)}>
{busy ? '만드는 중…' : `${items.length}곡으로 ${duel ? '이지선다 ' : ''}만들기`}
</button>
</form>
) : (
<div className="row">
<button type="button" className="btn btn-primary" disabled={!appendable.length} onClick={() => onApply?.(appendable, false)}>
<button type="button" className="btn btn-primary" disabled={filling || !appendable.length} onClick={() => onApply?.(appendable, false)}>
{appendable.length}곡 목록 뒤에 추가
</button>
<button type="button" className="btn btn-danger" disabled={!items.length} onClick={() => setConfirmReplace(true)}>
<button type="button" className="btn btn-danger" disabled={filling || !items.length} onClick={() => setConfirmReplace(true)}>
지금 목록을 지우고 바꾸기
</button>
</div>

View File

@@ -612,7 +612,9 @@ function SongsTab({
if (seen.has(r.videoId!) || (r.songId && seen.has(`s${r.songId}`))) continue;
seen.add(r.videoId!);
if (r.songId) seen.add(`s${r.songId}`);
added.push({ ...fresh({ songId: r.songId, videoId: r.videoId!, title: r.title, artist: r.artist, durationSec: r.durationSec }), key: newKey() });
// answers worked out by the server (other names, 한글 발음 …, docs/13)
const it = fresh({ songId: r.songId, videoId: r.videoId!, title: r.title, artist: r.artist, durationSec: r.durationSec });
added.push({ ...it, titleAnswers: r.titleAnswers ?? [], artistAnswers: r.artistAnswers ?? [], key: newKey() });
}
onItems([...base, ...added]);
setSel(null);
@@ -898,6 +900,8 @@ interface ImportRow {
source: { title: string; artist: string };
title: string;
artist: string;
titleAnswers: string[];
artistAnswers: string[];
durationSec: number | null;
videoId: string | null;
songId: number | null;