<h1><u>Song List</u></h1>
<input id="songFilterInput"></input>
+ <input id="songFilterArtist"></input>
+ <button id="" onclick="getSongList()">Update Songs</button>
<div id="innerSongList">
</div>
let songList = []
+let innerSongList = document.getElementById("innerSongList")
+
/**
- * Get all the songs
+ * MAIN SONG ELEMENT
**/
-async function getSongList() {
+/*
+<div songId="[ID OF SONG (just number)]" id="SONG:XX" class="songElement">
+ <p>✅</p> // or false
+ <p>SONG NAME</p> BY
+ <p>ARTIST NAME</p>
+ <img></img> // HERE WOULD GO THE IMAGE
+ <button>EDIT</button>
+ <p>ID: []</p>
+</div>
+*/
+function NewSongElement(exists, songName, artistName, imageUrl, id) {
-
}
/**
- * MAIN SONG ELEMENT
+ * Get all the songs
**/
+async function getSongList() {
+ // Empty the List
+ innerSongList.innerHTML = ""
+
+ fetch("/api/songs/get", {'Accept': 'application/json', 'Content-type': 'application/json'}).then(async (response) => {
+ body = await response.json()
+ console.log(body)
+
+ for (let i = 0; i < body.length; i++) {
+ }
+
+ // using the elements in the body, create all the new songs in the list
+ })
+}
+
/**
// ==============================================================
+/*
let AllSongs = null
let AllFilenames = null
let currentEditSong = null
editArtworkUrl100.addEventListener("focusout", closeIfNotInEditor)
editDisplayArtistNames.addEventListener("focusout", closeIfNotInEditor)
+*/