saving and displaying the configured library dir
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user