playlists now save to files, can be restored from files

This commit is contained in:
2026-02-19 23:10:20 -05:00
parent 56cf92a44c
commit 560ab3a3b5
18 changed files with 2454 additions and 113 deletions
+32 -1
View File
@@ -31,8 +31,39 @@ func (fe *FrontendUtil) DirectoryPicker() (string, error) {
fe.ctx,
runtime.OpenDialogOptions{})
if err != nil {
return "", fmt.Errorf("could not open directory dialog\n%w", err)
return "", fmt.Errorf(
"could not open directory dialog\n%w", err,
)
}
return dir, nil
}
// PlaylistFilePicker opens a file selection dialog filtered
// to M3U/M3U8 playlist files.
func (fe *FrontendUtil) PlaylistFilePicker() (
string,
error,
) {
runtime.LogInfo(fe.ctx, "selecting a playlist file")
file, err := runtime.OpenFileDialog(
fe.ctx,
runtime.OpenDialogOptions{
Title: "Import Playlist",
Filters: []runtime.FileFilter{
{
DisplayName: "Playlist Files (*.m3u, *.m3u8)",
Pattern: "*.m3u;*.m3u8",
},
},
},
)
if err != nil {
return "", fmt.Errorf(
"could not open file dialog: %w", err,
)
}
return file, nil
}