mirror of
https://github.com/Myxelium/Bridge-Multi.git
synced 2026-07-09 11:35:08 +00:00
Initial Browse UI and initial song search
This commit is contained in:
15
src/electron/shared/UtilFunctions.ts
Normal file
15
src/electron/shared/UtilFunctions.ts
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user