ok
This commit is contained in:
@@ -8,9 +8,10 @@ const db = new Database(dbName);
|
||||
export function getStreams() {
|
||||
const indexData = db.prepare('SELECT id, stream_date, title, tags, length_seconds ' +
|
||||
'FROM Stream ORDER BY id DESC').all();
|
||||
indexData.forEach(stream =>
|
||||
stream['stream_date'] = Date.parse(stream['stream_date'])
|
||||
);
|
||||
indexData.forEach(stream => {
|
||||
stream['stream_date'] = Date.parse(stream['stream_date']);
|
||||
stream['tags'] = JSON.parse(stream['tags']);
|
||||
});
|
||||
return indexData;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,33 @@ import { writable } from 'svelte/store';
|
||||
|
||||
export const currentStream = writable({});
|
||||
export const currentSongIndex = writable(0);
|
||||
export const tagList = [
|
||||
'acoustic',
|
||||
'electronic',
|
||||
'orchestral',
|
||||
'rock',
|
||||
'pop',
|
||||
'metal',
|
||||
'aggressive',
|
||||
'folk',
|
||||
'jazzy',
|
||||
'dance.music',
|
||||
'untz',
|
||||
'breakbeats',
|
||||
'electronica',
|
||||
'chiptune',
|
||||
'left.field',
|
||||
'denpa',
|
||||
'vocaloid',
|
||||
'funky',
|
||||
'lush',
|
||||
'noisy',
|
||||
'psychedelic',
|
||||
'dark',
|
||||
'calm',
|
||||
'moody',
|
||||
'uplifting'
|
||||
];
|
||||
|
||||
let timestampList;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user