made the program read the library
This commit is contained in:
1 parent
a7bd278b4a
commit
8bd075b6d9
1 file changed
+7
-3
+7
-3
@@ -7,7 +7,7 @@ console.log('test');
|
|||||||
|
|
||||||
// const url = 'file://C:\\Users\\JISAUAY\\Documents\\misc\\sspm\\test.ogg';
|
// const url = 'file://C:\\Users\\JISAUAY\\Documents\\misc\\sspm\\test.ogg';
|
||||||
// const path = 'C:\\Users\\JISAUAY\\Documents\\misc\\sspm\\ChangelingForest.mp3';
|
// const path = 'C:\\Users\\JISAUAY\\Documents\\misc\\sspm\\ChangelingForest.mp3';
|
||||||
const libPath = 'C:\\Users\\JISAUAY\\Documents\\misc\\sspm\\test-library\\'
|
const libPath = './test-library/'
|
||||||
|
|
||||||
// const player = new Audio(url);
|
// const player = new Audio(url);
|
||||||
|
|
||||||
@@ -17,8 +17,7 @@ const libPath = 'C:\\Users\\JISAUAY\\Documents\\misc\\sspm\\test-library\\'
|
|||||||
// console.log(info);
|
// console.log(info);
|
||||||
// };
|
// };
|
||||||
async function getLibraryFiles() {
|
async function getLibraryFiles() {
|
||||||
const dirInfo = await window.api.readMusicLibrary(libPath);
|
return await window.api.readMusicLibrary(libPath);
|
||||||
console.log(dirInfo);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -26,6 +25,11 @@ document.addEventListener('DOMContentLoaded', async () => {
|
|||||||
const libContentDisplay = document.getElementById('libContents');
|
const libContentDisplay = document.getElementById('libContents');
|
||||||
|
|
||||||
let files = await getLibraryFiles();
|
let files = await getLibraryFiles();
|
||||||
|
console.log(files);
|
||||||
|
|
||||||
|
for (const file_i in files) {
|
||||||
|
libContentDisplay.innerHTML += `<div class="LibEntry">${files[file_i]}</div>`;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// fromUrl(url).then((tags) => {
|
// fromUrl(url).then((tags) => {
|
||||||
|
|||||||
Reference in new issue
Block a user