feat: add music library page with search, edit and delete

Add a Library page reachable from the navigation. It lists all songs
from the SQLite database, filters them by title or artist, edits title,
artist, license and attribution in a dialog, and deletes a song after a
confirmation prompt. File path, duration and source stay read-only.

LibraryController wraps SongRepository so the view only forwards user
actions. Changes are written to the database immediately, and the list
reloads every time the page is shown.

Refs #3

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
fraujulianandClaude Opus 5.5 committed 2026-11-23 10:24:12 +01:00
1 parent 89b7959404
commit faa1dc19cc
7 files changed
+357

No files matched your search

@@ -0,0 +1,34 @@
using System.Windows;
using Radiosender.Models;
using Wpf.Ui.Controls;
namespace Radiosender.Views;
/// <summary>Dialog for the editable song metadata. Only collects input; saving is done by the caller.</summary>
public partial class SongEditWindow : FluentWindow
{
public SongEditWindow(Song song)
{
InitializeComponent();
TitleBox.Text = song.Title;
ArtistBox.Text = song.Artist;
LicenseBox.Text = song.License;
AttributionBox.Text = song.Attribution;
}
public string SongTitle => TitleBox.Text;
public string Artist => ArtistBox.Text;
public string License => LicenseBox.Text;
public string Attribution => AttributionBox.Text;
private void OnSave(object sender, RoutedEventArgs e)
{
if (string.IsNullOrWhiteSpace(SongTitle) || string.IsNullOrWhiteSpace(Artist))
{
ErrorText.Visibility = Visibility.Visible;
return;
}
DialogResult = true;
}
}