misc changes and documentation
This commit is contained in:
parent
4882cef4f6
commit
5fbc1a0ea1
|
@ -215,7 +215,6 @@ export async function generate(path, template) {
|
||||||
* @return {Object} Table Object with Body Completely parsed.
|
* @return {Object} Table Object with Body Completely parsed.
|
||||||
* @async
|
* @async
|
||||||
*/
|
*/
|
||||||
|
|
||||||
async function generateBody(tableArg, arr, start, end) {
|
async function generateBody(tableArg, arr, start, end) {
|
||||||
let table = tableArg;
|
let table = tableArg;
|
||||||
const t1 = performance.now();
|
const t1 = performance.now();
|
||||||
|
@ -245,6 +244,12 @@ export async function generate(path, template) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a unique ID that is not UUID compliant.
|
||||||
|
* - used to distinguish table objects from one another.
|
||||||
|
* @param {Number} length
|
||||||
|
* @return {String}
|
||||||
|
*/
|
||||||
function createID(length) {
|
function createID(length) {
|
||||||
const chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
|
const chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
|
||||||
let id;
|
let id;
|
||||||
|
@ -263,7 +268,11 @@ export async function generate(path, template) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Writes JSON to disk usnig ElectronSettings.
|
||||||
|
* - TODO: Switch to a Database for scalibility.
|
||||||
|
* @param {JSON} tableJSON
|
||||||
|
*/
|
||||||
export function saveTable(tableJSON) {
|
export function saveTable(tableJSON) {
|
||||||
const stamp = Date.now();
|
const stamp = Date.now();
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@ export default class Modal extends React.Component {
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
// Probably should remove once done with debugging
|
// Probably should remove once done with debugging
|
||||||
if (this.state.style.display === "flex") console.log("Modal Show")
|
if (this.state.style.display === "flex") console.log("Modal Show")
|
||||||
|
|
|
@ -52,7 +52,7 @@ export default class MusicPlayer {
|
||||||
try {
|
try {
|
||||||
this.element.src = this.getURICompatible(path);
|
this.element.src = this.getURICompatible(path);
|
||||||
this.element.load();
|
this.element.load();
|
||||||
console.log(path + " was succesfully loaded");
|
console.log("'" + path + "'" + " was succesfully loaded");
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(path + " failed to load: " + e.name);
|
console.error(path + " failed to load: " + e.name);
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,7 @@ export default class Song {
|
||||||
Emitter.emit('updateAlbumArt', noalbumart);
|
Emitter.emit('updateAlbumArt', noalbumart);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
console.warn(metadata.common.title + ' des not have Album Art');
|
console.warn(metadata.common.title + ' does not have Album Art');
|
||||||
Emitter.emit('updateAlbumArt', noalbumart);
|
Emitter.emit('updateAlbumArt', noalbumart);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,10 +2,10 @@ import Song from './Song';
|
||||||
import Playlist from './Playlist';
|
import Playlist from './Playlist';
|
||||||
|
|
||||||
/** @type {Array<Song>} */
|
/** @type {Array<Song>} */
|
||||||
var archive = [];
|
const archive = [];
|
||||||
|
|
||||||
/** @type {Array<Playlist>} */
|
/** @type {Array<Playlist>} */
|
||||||
let playlists = [];
|
const playlists = [];
|
||||||
|
|
||||||
/** @type {Song} */
|
/** @type {Song} */
|
||||||
let currentSong;
|
let currentSong;
|
||||||
|
|
Reference in New Issue