Initial Browse UI and initial song search

This commit is contained in:
Geomitron
2020-02-06 13:21:35 -05:00
parent 8f20311f68
commit e5fd303c91
30 changed files with 616 additions and 44 deletions

View File

@@ -0,0 +1,15 @@
import { basename } from 'path'
import { Settings } from './Settings'
const settings = Settings.getInstance()
/**
* @param absoluteFilepath The absolute filepath to a folder
* @returns The relative filepath from the scanned folder to <absoluteFilepath>
*/
export function getRelativeFilepath(absoluteFilepath: string) {
// TODO: figure out how these functions should use <settings> (like an async initialization script that
// loads everything and connects to the database, etc...)
// return basename(scanSettings.songsFolderPath) + absoluteFilepath.substring(scanSettings.songsFolderPath.length)
return absoluteFilepath
}