saving and displaying the configured library dir

This commit is contained in:
2025-03-22 17:00:21 -05:00
parent e3f47c602f
commit eba3187f39
5 changed files with 32 additions and 7 deletions
+6 -1
View File
@@ -40,7 +40,7 @@ func (a *App) startup(ctx context.Context) {
if err != nil {
panic(fmt.Errorf("could not initialize library: %w", err))
}
// config might have been updated, so lets propogate that to the app
// config might have been updated, so lets propagate that to the app
a.config.Library = musicLib.Conf
runtime.LogInfo(a.ctx, fmt.Sprintf("using library %s", logging.PrettyJSON(musicLib)))
@@ -66,3 +66,8 @@ func (a *App) DirectoryPicker() (string, error) {
a.config.WriteConfig()
return dir, nil
}
// trying to make a function
func (a *App) GetLibraryDir() (string, error) {
return a.config.Library.DirectoryPath, nil
}