8단계 관리자: 노래 추가·초성 검색·일괄 작업·휴지통·가져오기/내보내기·중복 병합·하이라이트 지정, 가수 별칭, 장르, 통계와 난이도 제안, 방 강제 종료, 수집 실행/멈추기, 새 방 기본 설정·잠금 + 출제 기록(song_plays)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
EJClaw
2026-10-18 22:27:21 +09:00
parent 7266fc8d25
commit 4165712fac
23 changed files with 2367 additions and 105 deletions

View File

@@ -13,6 +13,7 @@ import { importSta } from './sta';
import { matchYoutube } from './match-youtube';
import { pickSearcher } from './ytmusic';
import { catalogStats } from '../songs/store';
import { currentJob } from './catalog';
const [cmd, ...rest] = process.argv.slice(2);
const flag = (name: string) => {
@@ -22,6 +23,13 @@ const flag = (name: string) => {
const dbPath = process.env.DB_PATH ?? './data/app.db';
const rawDir = process.env.RAW_DIR ?? join(dbPath, '..', 'raw');
const db = openDb(dbPath);
// 멈추기 from the admin page (or docker stop): record it and leave.
process.on('SIGTERM', () => {
currentJob?.log('stopped by admin');
currentJob?.finish('stopped');
db.close();
process.exit(0);
});
switch (cmd) {
case 'import-norabose':