Improved metadata AI Assistant.
Build and Publish / Build and Publish Docker Image (push) Successful in 5m54s

This commit is contained in:
Aleksandr Bogomiakov committed 2026-11-16 00:32:33 +00:00
1 parent 4141562e33
commit 3d886d1acd
8 files changed
+1004 -208

No files matched your search

+98
View File
@@ -0,0 +1,98 @@
const assert = require('node:assert/strict');
const { readFileSync } = require('node:fs');
const { test } = require('node:test');
const vm = require('node:vm');
const template = readFileSync(`${__dirname}/../templates/admin/v2.html`, 'utf8');
const script = template.match(/<script>\s*(function adminV2\(\)[\s\S]*?)<\/script>/)[1];
function createApp() {
const context = vm.createContext({URLSearchParams});
vm.runInContext(script, context);
const app = context.adminV2();
app.showToast = message => { app.toastMessage = message; };
app.$nextTick = fn => fn();
app.$refs = {};
app.repairSelected = [{kind:'artists',id:1,title:'Artist'}];
app.repairExpanded = {snapshot:{artists:[{id:1,name:'Artist'}],releases:[{id:2,title:'#ИЗИРОК',year:2018}],tracks:[{id:3,title:'Actual song',release_id:2}]}};
return app;
}
const emptyPlan = () => ({artists:[],releases:[],tracks:[],questions:[],delete:{artists:[],releases:[],tracks:[]}});
test('deselect all retains related rows and allows selecting only the needed resources', async () => {
const app = createApp();
app.setAllRepairIncluded(false);
assert.equal(app.repairIncludedCount(),0);
assert.equal(app.repairRowsCount(),3);
app.setRepairIncluded('releases',2,true);
app.setRepairIncluded('tracks',3,true);
assert.equal(app.repairIncludedCount(),2);
app.repairDraft = 'Only these';
app.request = async (url,options) => {
assert.ok(url.endsWith('/plan'), 'must not re-expand exclusions');
const body = JSON.parse(options.body);
assert.deepEqual(body.selection,{artists:[],releases:[2],tracks:[3]});
return {plan:emptyPlan(),snapshot:app.repairExpanded.snapshot,message:'Done'};
};
await app.sendRepair();
assert.equal(app.repairChat.length,2);
app.setAllRepairIncluded(true);
assert.equal(app.repairIncludedCount(),3);
});
test('clarification replaces the single plan including removed changes and questions', async () => {
const app = createApp();
app.repairPlan = {...emptyPlan(),delete:{artists:[],releases:[],tracks:[3]},questions:['Which release?']};
app.repairChat = [{role:'user',content:'Delete song'},{role:'assistant',content:'Please review'}];
app.repairPlanOpen = true;
app.repairDraft = 'Keep song, cancel everything';
app.request = async (_url,options) => {
const body=JSON.parse(options.body);
assert.deepEqual(body.current_plan.delete.tracks,[3]);
assert.equal(body.conversation.length,2);
return {plan:emptyPlan(),snapshot:app.repairExpanded.snapshot,message:'Cancelled'};
};
await app.sendRepair();
assert.equal(app.repairChangeCount(),0);
assert.equal(app.repairPlan.questions.length,0);
assert.equal(app.repairPlanOpen,true);
assert.equal(app.repairChat.length,4);
});
test('failed revision preserves prior plan and retry avoids duplicate user messages', async () => {
const app = createApp();
const prior = {...emptyPlan(),delete:{artists:[],releases:[],tracks:[3]}};
app.repairPlan = prior;
app.repairDraft = 'Keep song';
app.request = async () => {throw Error('Offline');};
await app.sendRepair();
assert.equal(app.repairPlan,prior);
assert.equal(app.repairIncomplete,true);
assert.equal(app.repairChat.length,1);
app.request = async (_url,options) => {
assert.equal(JSON.parse(options.body).conversation.length,0);
return {plan:emptyPlan(),snapshot:app.repairExpanded.snapshot,message:'Kept'};
};
await app.sendRepair();
assert.equal(app.repairChat.length,2);
assert.equal(app.repairIncomplete,false);
});
test('incomplete plan cannot apply, deletion-only plan can apply and clears stale selection', async () => {
const app = createApp();
app.repairPlan = {...emptyPlan(),delete:{artists:[],releases:[],tracks:[3]}};
app.repairSnapshot = app.repairExpanded.snapshot;
app.repairIncomplete = true;
app.request = async () => assert.fail('must not apply incomplete plan');
await app.applyRepair();
app.repairIncomplete = false;
app.request = async (url,options) => {
assert.ok(url.endsWith('/apply'));
assert.deepEqual(JSON.parse(options.body).plan.delete.tracks,[3]);
return {history_id:7};
};
app.loadRepairHistory = async () => {};
app.loadLibrary = async () => {};
await app.applyRepair();
assert.equal(app.repairIncludedCount(),0);
assert.equal(app.repairPlan,null);
assert.equal(app.repairChat.at(-1).content.includes('#7'),true);
});
+134
View File
@@ -0,0 +1,134 @@
// Run against a fresh disposable instance with tests/metadata_repair_fixture.sql.
// FURU_REPAIR_TEST_PG must name its disposable PostgreSQL container.
const {chromium}=require(process.env.PLAYWRIGHT_MODULE || 'playwright');
const assert=require('node:assert/strict');
const {readFileSync}=require('node:fs');
const {spawnSync}=require('node:child_process');
const base=process.env.FURU_TEST_URL || 'http://127.0.0.1:3029';
const container=process.env.FURU_REPAIR_TEST_PG || 'furumi-repair-test-pg';
function sql(statement) {
const result=spawnSync('docker',['exec','-i',container,'psql','-U','postgres','-d','furumi_repair_test','-At','-v','ON_ERROR_STOP=1'],{input:statement,encoding:'utf8'});
assert.equal(result.status,0,result.stderr);
return result.stdout.trim();
}
const emptyPlan=()=>({artists:[],releases:[],tracks:[],questions:[],delete:{artists:[],releases:[],tracks:[]}});
(async()=>{
const browser=await chromium.launch({headless:true,executablePath:process.env.CHROME_PATH || '/run/current-system/sw/bin/chromium',args:['--no-sandbox']});
try {
const context=await browser.newContext({viewport:{width:1440,height:1000}});
if (process.env.FURU_TEST_ASSETS) {
for (const [url,file] of [['alpinejs@3/dist/cdn.min.js','alpine.js'],['lucide@latest/dist/umd/lucide.min.js','lucide.js']]) {
await context.route('https://cdn.jsdelivr.net/npm/'+url,route=>route.fulfill({path:process.env.FURU_TEST_ASSETS+'/'+file}));
}
}
const api=context.request;
assert.equal((await api.post(base+'/admin/v2/api/metadata-fix/apply',{data:{snapshot:{},plan:{},instruction:'test'}})).status()>=400,true);
const page=await context.newPage(); const errors=[]; page.on('pageerror',error=>errors.push(error.message));
await page.goto(base+'/admin/setup');
if (page.url().includes('/admin/setup')) {
await page.locator('[name=username]').fill('repair_admin');
await page.locator('[name=password]').fill('repair-test-password');
await page.locator('[name=confirm_password]').fill('repair-test-password');
await page.locator('button[type=submit]').click();
await page.waitForURL('**/admin/v2');
} else {
await page.goto(base+'/login');
await page.locator('[name=username]').fill('repair_admin');
await page.locator('[name=password]').fill('repair-test-password');
await page.locator('button[type=submit]').click();
await page.waitForURL(base+'/');
await page.goto(base+'/admin/v2');
}
if (!process.env.FURU_REPAIR_SKIP_SEED) sql(readFileSync(__dirname+'/metadata_repair_fixture.sql','utf8'));
const post=async(path,data,status=200)=>{
const response=await api.post(base+'/admin/v2/api/metadata-fix/'+path,{data});
assert.equal(response.status(),status,await response.text());
return response.json();
};
const expanded=await post('expand',{selection:{artists:[2719],releases:[],tracks:[]}});
const before=expanded.snapshot;
assert.equal(before.releases.length,4); assert.equal(before.tracks.length,10);
const artistIds=track=>before.track_artists.filter(link=>link.owner_id===track.id).map(link=>link.artist_id);
const merge={...emptyPlan(),releases:[{id:null,key:'collection',title:'#ИЗИРОК Сборник',release_type:'compilation',year:2021,artist_ids:[2719]}],tracks:before.tracks.map(track=>({id:track.id,title:track.title,target_release:'new:collection',track_number:track.track_number,disc_number:track.disc_number,year:track.year,artist_ids:artistIds(track)})),delete:{artists:[],releases:before.releases.map(release=>release.id),tracks:[]}};
await page.getByRole('button',{name:'Library Tools',exact:true}).click();
const tools=page.locator('.content').filter({has:page.getByText('Metadata assistant',{exact:true})});
await tools.locator('select').first().selectOption('artists');
await tools.getByPlaceholder('Search library…').fill('Radio Tapok');
await tools.locator('.repair-search-results button').first().click();
await tools.getByRole('button',{name:'Show related',exact:true}).click();
await page.waitForFunction(()=>Alpine.$data(document.querySelector('.admin-shell')).repairRowsCount()===15);
await tools.getByRole('button',{name:'Deselect all',exact:true}).click();
assert.equal(await tools.locator('.repair-entity input:checked').count(),0);
assert.equal(await tools.locator('.repair-entity input[type=checkbox]').count(),15);
await tools.getByRole('button',{name:'Select all',exact:true}).click();
let calls=0;
await page.route('**/metadata-fix/plan',async route=>{
const body=route.request().postDataJSON(); calls++;
assert.deepEqual(body.selection,expanded.selection);
if (calls===1) await route.fulfill({json:{snapshot:before,plan:merge,message:'Объединю все 10 треков в сборник 2021 года.'}});
else {
assert.equal(body.current_plan.releases[0].year,2021);
assert.equal(body.conversation.length,2);
await route.fulfill({json:{snapshot:before,plan:{...merge,releases:[{...merge.releases[0],year:2022}]},message:'Год сборника изменён на 2022.'}});
}
});
const composer=tools.getByRole('textbox',{name:'Message to metadata assistant'});
await composer.fill('Объедини #ИЗИРОК в #ИЗИРОК Сборник, год 2021');
await tools.getByRole('button',{name:'Send',exact:true}).click();
await tools.getByText('Объединю все 10 треков в сборник 2021 года.',{exact:true}).waitFor();
const plan=tools.locator('details.repair-plan');
assert.equal(await plan.getAttribute('open'),null);
await plan.locator(':scope > summary').click();
await plan.getByText('Edit fields manually',{exact:true}).click();
assert.equal(await plan.locator('.repair-diff').nth(1).locator('input[type=number]').inputValue(),'2021');
await composer.fill('Сделай год 2022');
await tools.getByRole('button',{name:'Send',exact:true}).click();
await tools.getByText('Год сборника изменён на 2022.',{exact:true}).waitFor();
assert.equal(await tools.locator('details.repair-plan').count(),1);
assert.equal(await plan.locator('.repair-diff').nth(1).locator('input[type=number]').inputValue(),'2022');
await plan.getByText('Edit fields manually',{exact:true}).click();
await plan.locator(':scope > summary').scrollIntoViewIfNeeded();
await page.screenshot({path:'/tmp/furumi-repair-desktop.png'});
await page.setViewportSize({width:390,height:844});
assert.equal(await page.evaluate(()=>document.documentElement.scrollWidth<=innerWidth),true);
await page.screenshot({path:'/tmp/furumi-repair-mobile.png'});
await page.setViewportSize({width:1440,height:1000});
// Apply the 2021 plan against the original snapshot, then undo it.
const applied=await post('apply',{snapshot:before,plan:merge,instruction:'Merge #ИЗИРОК'});
assert.equal(sql("SELECT title || '|' || year || '|' || total_tracks FROM furumusic__release"),'#ИЗИРОК Сборник|2021|10');
assert.equal(sql('SELECT count(*) FROM furumusic__track'),'10');
assert.equal(sql('SELECT count(*) FROM furumusic__media_file'),'10');
assert.equal(sql('SELECT count(*) FROM furumusic__playlist_track'),'2');
await post('undo',{history_id:applied.history_id});
assert.deepEqual((await post('expand',{selection:expanded.selection})).snapshot,before);
const deletion={...emptyPlan(),delete:{artists:[],releases:[],tracks:[33683,33684]}};
const removed=await post('apply',{snapshot:before,plan:deletion,instruction:'Delete two tracks'});
assert.equal(sql('SELECT count(*) FROM furumusic__track'),'8');
assert.equal(sql('SELECT count(*) FROM furumusic__playlist_track'),'0');
assert.equal(sql('SELECT count(*) FROM furumusic__track_ref WHERE local_track_id IS NULL'),'2');
assert.equal(sql('SELECT queue_json FROM furumusic__playback_state'),'[33685]');
await post('undo',{history_id:removed.history_id});
assert.equal(sql('SELECT count(*) FROM furumusic__playlist_track'),'2');
assert.equal(sql('SELECT local_track_id FROM furumusic__track_ref ORDER BY content_id'),'33683\n33684');
assert.equal(sql('SELECT current_track_id || \'|\' || position_ms || \'|\' || queue_json FROM furumusic__playback_state'),'33683|1234|[33683,33684,33685]');
assert.deepEqual((await post('expand',{selection:expanded.selection})).snapshot,before);
const artistRemoval=await post('apply',{snapshot:before,plan:{...emptyPlan(),delete:{artists:[2719],releases:[],tracks:[]}},instruction:'Delete artist'});
assert.equal(sql('SELECT count(*) FROM furumusic__artist'),'0');
assert.equal(sql('SELECT count(*) FROM furumusic__track'),'10');
assert.equal(sql('SELECT count(*) FROM furumusic__track_artist'),'0');
await post('undo',{history_id:artistRemoval.history_id});
assert.deepEqual((await post('expand',{selection:expanded.selection})).snapshot,before);
const invalid={...emptyPlan(),delete:{artists:[],releases:[4256],tracks:[]}};
await post('apply',{snapshot:before,plan:invalid,instruction:'Invalid deletion'},400);
// A changed detached reference must block undo atomically.
const conflict=await post('apply',{snapshot:before,plan:deletion,instruction:'Delete before playback changes'});
sql("UPDATE furumusic__playback_state SET position_ms=9876");
await post('undo',{history_id:conflict.history_id},409);
assert.equal(sql('SELECT count(*) FROM furumusic__track'),'8');
sql('UPDATE furumusic__playback_state SET position_ms=0');
await post('undo',{history_id:conflict.history_id});
assert.equal(sql('SELECT count(*) FROM furumusic__track'),'10');
assert.deepEqual(errors,[]);
console.log('Metadata Repair browser, merge, deletion, undo and conflict checks passed.');
} finally { await browser.close(); }
})().catch(error=>{console.error(error);process.exit(1);});
+45
View File
@@ -0,0 +1,45 @@
INSERT INTO furumusic__artist (id,name,is_hidden,name_sort,model_name,updated_at,created_at) VALUES (2719,'Radio Tapok',false,'radio tapok','unsloth/Qwen3.6-35B-A3B-GGUF:UD-Q6_K','2026-11-15T23:13:56Z','2026-01-01T00:00:00Z');
INSERT INTO furumusic__release (id,year,title,is_hidden,model_name,title_sort,updated_at,total_discs,release_type,total_tracks,cover_file_id,created_at) VALUES (4256,2018,'#ИЗИРОК',false,'unsloth/Qwen3.6-35B-A3B-GGUF:UD-Q6_K','#изирок','2026-11-15T23:25:33Z',NULL,'album',NULL,NULL,'2026-01-01T00:00:00Z');
INSERT INTO furumusic__release (id,year,title,is_hidden,model_name,title_sort,updated_at,total_discs,release_type,total_tracks,cover_file_id,created_at) VALUES (4257,2019,'#ИЗИРОК',false,'unsloth/Qwen3.6-35B-A3B-GGUF:UD-Q6_K','#изирок','2026-11-15T23:25:34Z',NULL,'album',NULL,NULL,'2026-01-01T00:00:00Z');
INSERT INTO furumusic__release (id,year,title,is_hidden,model_name,title_sort,updated_at,total_discs,release_type,total_tracks,cover_file_id,created_at) VALUES (4258,2020,'#ИЗИРОК',false,'unsloth/Qwen3.6-35B-A3B-GGUF:UD-Q6_K','#изирок','2026-11-15T23:25:46Z',NULL,'ep',NULL,NULL,'2026-01-01T00:00:00Z');
INSERT INTO furumusic__release (id,year,title,is_hidden,model_name,title_sort,updated_at,total_discs,release_type,total_tracks,cover_file_id,created_at) VALUES (4259,2021,'#ИЗИРОК',false,'unsloth/Qwen3.6-35B-A3B-GGUF:UD-Q6_K','#изирок','2026-11-15T23:25:47Z',NULL,'ep',NULL,NULL,'2026-01-01T00:00:00Z');
INSERT INTO furumusic__media_file (id,file_type,file_path,original_filename,mime_type,file_size_bytes,sha256_hash,created_at) VALUES (33683,'audio','/tmp/test-33683.mp3','test.mp3','audio/mpeg',1,'0000000000000000000000000000000000000000000000000000000000033683','2026-01-01T00:00:00Z');
INSERT INTO furumusic__track (id,year,title,is_hidden,model_name,release_id,title_sort,updated_at,disc_number,track_number,lastfm_rating,lastfm_listeners,lastfm_playcount,lastfm_checked_at,lastfm_updated_at,lastfm_lookup_title,lastfm_lookup_artist,duration_seconds,audio_file_id,cover_file_id,created_at) VALUES (33683,2018,'Старик и братья',false,'unsloth/Qwen3.6-35B-A3B-GGUF:UD-Q6_K',4256,'старик и братья','2026-11-15T23:25:32Z',NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,180,33683,NULL,'2026-01-01T00:00:00Z');
INSERT INTO furumusic__media_file (id,file_type,file_path,original_filename,mime_type,file_size_bytes,sha256_hash,created_at) VALUES (33684,'audio','/tmp/test-33684.mp3','test.mp3','audio/mpeg',1,'0000000000000000000000000000000000000000000000000000000000033684','2026-01-01T00:00:00Z');
INSERT INTO furumusic__track (id,year,title,is_hidden,model_name,release_id,title_sort,updated_at,disc_number,track_number,lastfm_rating,lastfm_listeners,lastfm_playcount,lastfm_checked_at,lastfm_updated_at,lastfm_lookup_title,lastfm_lookup_artist,duration_seconds,audio_file_id,cover_file_id,created_at) VALUES (33684,2018,'Потрошитель',false,'unsloth/Qwen3.6-35B-A3B-GGUF:UD-Q6_K',4256,'потрошитель','2026-11-15T23:25:33Z',NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,180,33684,NULL,'2026-01-01T00:00:00Z');
INSERT INTO furumusic__media_file (id,file_type,file_path,original_filename,mime_type,file_size_bytes,sha256_hash,created_at) VALUES (33685,'audio','/tmp/test-33685.mp3','test.mp3','audio/mpeg',1,'0000000000000000000000000000000000000000000000000000000000033685','2026-01-01T00:00:00Z');
INSERT INTO furumusic__track (id,year,title,is_hidden,model_name,release_id,title_sort,updated_at,disc_number,track_number,lastfm_rating,lastfm_listeners,lastfm_playcount,lastfm_checked_at,lastfm_updated_at,lastfm_lookup_title,lastfm_lookup_artist,duration_seconds,audio_file_id,cover_file_id,created_at) VALUES (33685,2018,'Последняя песня',false,'unsloth/Qwen3.6-35B-A3B-GGUF:UD-Q6_K',4256,'последняя песня','2026-11-15T23:25:33Z',NULL,3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,180,33685,NULL,'2026-01-01T00:00:00Z');
INSERT INTO furumusic__media_file (id,file_type,file_path,original_filename,mime_type,file_size_bytes,sha256_hash,created_at) VALUES (33686,'audio','/tmp/test-33686.mp3','test.mp3','audio/mpeg',1,'0000000000000000000000000000000000000000000000000000000000033686','2026-01-01T00:00:00Z');
INSERT INTO furumusic__track (id,year,title,is_hidden,model_name,release_id,title_sort,updated_at,disc_number,track_number,lastfm_rating,lastfm_listeners,lastfm_playcount,lastfm_checked_at,lastfm_updated_at,lastfm_lookup_title,lastfm_lookup_artist,duration_seconds,audio_file_id,cover_file_id,created_at) VALUES (33686,2018,'Песня для твоей подруги',false,'unsloth/Qwen3.6-35B-A3B-GGUF:UD-Q6_K',4256,'песня для твоей подруги','2026-11-15T23:25:33Z',NULL,4,NULL,NULL,NULL,NULL,NULL,NULL,NULL,180,33686,NULL,'2026-01-01T00:00:00Z');
INSERT INTO furumusic__media_file (id,file_type,file_path,original_filename,mime_type,file_size_bytes,sha256_hash,created_at) VALUES (33687,'audio','/tmp/test-33687.mp3','test.mp3','audio/mpeg',1,'0000000000000000000000000000000000000000000000000000000000033687','2026-01-01T00:00:00Z');
INSERT INTO furumusic__track (id,year,title,is_hidden,model_name,release_id,title_sort,updated_at,disc_number,track_number,lastfm_rating,lastfm_listeners,lastfm_playcount,lastfm_checked_at,lastfm_updated_at,lastfm_lookup_title,lastfm_lookup_artist,duration_seconds,audio_file_id,cover_file_id,created_at) VALUES (33687,2018,'Просто я сегодня...',false,'unsloth/Qwen3.6-35B-A3B-GGUF:UD-Q6_K',4256,'просто я сегодня...','2026-11-15T23:25:33Z',NULL,5,NULL,NULL,NULL,NULL,NULL,NULL,NULL,180,33687,NULL,'2026-01-01T00:00:00Z');
INSERT INTO furumusic__media_file (id,file_type,file_path,original_filename,mime_type,file_size_bytes,sha256_hash,created_at) VALUES (33688,'audio','/tmp/test-33688.mp3','test.mp3','audio/mpeg',1,'0000000000000000000000000000000000000000000000000000000000033688','2026-01-01T00:00:00Z');
INSERT INTO furumusic__track (id,year,title,is_hidden,model_name,release_id,title_sort,updated_at,disc_number,track_number,lastfm_rating,lastfm_listeners,lastfm_playcount,lastfm_checked_at,lastfm_updated_at,lastfm_lookup_title,lastfm_lookup_artist,duration_seconds,audio_file_id,cover_file_id,created_at) VALUES (33688,2019,'Отзвуки тьмы',false,'unsloth/Qwen3.6-35B-A3B-GGUF:UD-Q6_K',4257,'отзвуки тьмы','2026-11-15T23:25:34Z',NULL,6,NULL,NULL,NULL,NULL,NULL,NULL,NULL,180,33688,NULL,'2026-01-01T00:00:00Z');
INSERT INTO furumusic__media_file (id,file_type,file_path,original_filename,mime_type,file_size_bytes,sha256_hash,created_at) VALUES (33689,'audio','/tmp/test-33689.mp3','test.mp3','audio/mpeg',1,'0000000000000000000000000000000000000000000000000000000000033689','2026-01-01T00:00:00Z');
INSERT INTO furumusic__track (id,year,title,is_hidden,model_name,release_id,title_sort,updated_at,disc_number,track_number,lastfm_rating,lastfm_listeners,lastfm_playcount,lastfm_checked_at,lastfm_updated_at,lastfm_lookup_title,lastfm_lookup_artist,duration_seconds,audio_file_id,cover_file_id,created_at) VALUES (33689,2019,'Битва за Москву',false,'unsloth/Qwen3.6-35B-A3B-GGUF:UD-Q6_K',4257,'битва за москву','2026-11-15T23:25:34Z',NULL,7,NULL,NULL,NULL,NULL,NULL,NULL,NULL,180,33689,NULL,'2026-01-01T00:00:00Z');
INSERT INTO furumusic__media_file (id,file_type,file_path,original_filename,mime_type,file_size_bytes,sha256_hash,created_at) VALUES (33690,'audio','/tmp/test-33690.mp3','test.mp3','audio/mpeg',1,'0000000000000000000000000000000000000000000000000000000000033690','2026-01-01T00:00:00Z');
INSERT INTO furumusic__track (id,year,title,is_hidden,model_name,release_id,title_sort,updated_at,disc_number,track_number,lastfm_rating,lastfm_listeners,lastfm_playcount,lastfm_checked_at,lastfm_updated_at,lastfm_lookup_title,lastfm_lookup_artist,duration_seconds,audio_file_id,cover_file_id,created_at) VALUES (33690,2020,'Настроение лето',false,'unsloth/Qwen3.6-35B-A3B-GGUF:UD-Q6_K',4258,'настроение лето','2026-11-15T23:25:46Z',NULL,8,NULL,NULL,NULL,NULL,NULL,NULL,NULL,180,33690,NULL,'2026-01-01T00:00:00Z');
INSERT INTO furumusic__media_file (id,file_type,file_path,original_filename,mime_type,file_size_bytes,sha256_hash,created_at) VALUES (33691,'audio','/tmp/test-33691.mp3','test.mp3','audio/mpeg',1,'0000000000000000000000000000000000000000000000000000000000033691','2026-01-01T00:00:00Z');
INSERT INTO furumusic__track (id,year,title,is_hidden,model_name,release_id,title_sort,updated_at,disc_number,track_number,lastfm_rating,lastfm_listeners,lastfm_playcount,lastfm_checked_at,lastfm_updated_at,lastfm_lookup_title,lastfm_lookup_artist,duration_seconds,audio_file_id,cover_file_id,created_at) VALUES (33691,2020,'Пробил час',false,'unsloth/Qwen3.6-35B-A3B-GGUF:UD-Q6_K',4258,'пробил час','2026-11-15T23:25:47Z',NULL,9,NULL,NULL,NULL,NULL,NULL,NULL,NULL,180,33691,NULL,'2026-01-01T00:00:00Z');
INSERT INTO furumusic__media_file (id,file_type,file_path,original_filename,mime_type,file_size_bytes,sha256_hash,created_at) VALUES (33692,'audio','/tmp/test-33692.mp3','test.mp3','audio/mpeg',1,'0000000000000000000000000000000000000000000000000000000000033692','2026-01-01T00:00:00Z');
INSERT INTO furumusic__track (id,year,title,is_hidden,model_name,release_id,title_sort,updated_at,disc_number,track_number,lastfm_rating,lastfm_listeners,lastfm_playcount,lastfm_checked_at,lastfm_updated_at,lastfm_lookup_title,lastfm_lookup_artist,duration_seconds,audio_file_id,cover_file_id,created_at) VALUES (33692,2021,'Цусима',false,'unsloth/Qwen3.6-35B-A3B-GGUF:UD-Q6_K',4259,'цусима','2026-11-15T23:25:47Z',NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,180,33692,NULL,'2026-01-01T00:00:00Z');
INSERT INTO furumusic__release_artist (release_id,artist_id,position) VALUES (4256,2719,0);
INSERT INTO furumusic__release_artist (release_id,artist_id,position) VALUES (4257,2719,0);
INSERT INTO furumusic__release_artist (release_id,artist_id,position) VALUES (4258,2719,0);
INSERT INTO furumusic__release_artist (release_id,artist_id,position) VALUES (4259,2719,0);
INSERT INTO furumusic__track_artist (track_id,artist_id,role,position) VALUES (33683,2719,'main',0);
INSERT INTO furumusic__track_artist (track_id,artist_id,role,position) VALUES (33684,2719,'main',0);
INSERT INTO furumusic__track_artist (track_id,artist_id,role,position) VALUES (33685,2719,'main',0);
INSERT INTO furumusic__track_artist (track_id,artist_id,role,position) VALUES (33686,2719,'main',0);
INSERT INTO furumusic__track_artist (track_id,artist_id,role,position) VALUES (33687,2719,'main',0);
INSERT INTO furumusic__track_artist (track_id,artist_id,role,position) VALUES (33688,2719,'main',0);
INSERT INTO furumusic__track_artist (track_id,artist_id,role,position) VALUES (33689,2719,'main',0);
INSERT INTO furumusic__track_artist (track_id,artist_id,role,position) VALUES (33690,2719,'main',0);
INSERT INTO furumusic__track_artist (track_id,artist_id,role,position) VALUES (33691,2719,'main',0);
INSERT INTO furumusic__track_artist (track_id,artist_id,role,position) VALUES (33692,2719,'main',0);
INSERT INTO furumusic__playlist (id,owner_id,title,is_public,created_at,updated_at) VALUES (1,1,'Repair test',false,'2026-01-01T00:00:00Z','2026-01-01T00:00:00Z');
INSERT INTO furumusic__playlist_track (playlist_id,track_id,position,added_at,added_by_user_id) VALUES (1,33683,0,'2026-01-01T00:00:00Z',1);
INSERT INTO furumusic__track_ref (content_id,local_track_id,title,created_at,updated_at) VALUES ('content-33683',33683,'Старик и братья','2026-01-01T00:00:00Z','2026-01-01T00:00:00Z');
INSERT INTO furumusic__playlist_track (playlist_id,track_id,position,added_at,added_by_user_id) VALUES (1,33684,1,'2026-01-01T00:00:00Z',1);
INSERT INTO furumusic__track_ref (content_id,local_track_id,title,created_at,updated_at) VALUES ('content-33684',33684,'Потрошитель','2026-01-01T00:00:00Z','2026-01-01T00:00:00Z');
INSERT INTO furumusic__playback_state (user_id,current_track_id,position_ms,queue_json,queue_position,shuffle,repeat_mode,volume,updated_at) VALUES (1,33683,1234,'[33683,33684,33685]',0,false,'off',1.0,'2026-01-01T00:00:00Z');