Cross-Platform Music Downloader



This content originally appeared on DEV Community and was authored by Andreas Nilsen

Building Symphex: A Modern Music Downloader with C# & Avalonia

After getting frustrated with clunky, ad-filled music downloaders, I decided to build my own. Meet Symphex – a clean, cross-platform music downloader that respects your privacy and delivers high-quality audio with beautiful metadata.

🎯 The Problem I Wanted to Solve
Most music downloaders are either:

Filled with ads and malware
Platform-specific (Windows only)
Missing proper metadata and album artwork
Require technical knowledge to use

I wanted something that “just works” – beautiful, fast, and respectful of user privacy.

🛠 Tech Stack Choices

Framework: Avalonia UI 11.x
Cross-platform from day one
Modern XAML-based UI
Great performance on all platforms

Language: C# with .NET 8

Strong typing and excellent tooling
Great async/await support for downloads
Familiar ecosystem

Architecture: MVVM with CommunityToolkit.Mvvm

Clean separation of concerns
Reactive UI updates
Easy testing and maintenance

🎨 Design Philosophy

I focused on creating a dark, modern interface that feels native on each platform:

xml<Style Selector="Button.download">
    <Setter Property="Background" Value="#1e40af"/>
    <Setter Property="Foreground" Value="White"/>
    <Setter Property="CornerRadius" Value="12"/>
    <Setter Property="Effect">
        <DropShadowEffect Color="#1e40af" Opacity="0.3" BlurRadius="15"/>
    </Setter>
</Style>

The UI features:

Glassmorphism effects with subtle shadows

Smooth animations for user feedback

Responsive design that works on different screen sizes

Toast notifications for user feedback

🔧 Technical Challenges & Solutions

1. Cross-Platform File Operations

Getting folder opening to work across platforms was tricky:

private void OpenFolder()
{
    if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
    {
        Process.Start("explorer.exe", DownloadFolder);
    }
    else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
    {
        Process.Start("open", Path.GetFullPath(DownloadFolder));
    }
    else // Linux
    {
        Process.Start("xdg-open", DownloadFolder);
    }
}

2. Intelligent Metadata Detection
The app automatically detects artist and song titles from YouTube video titles:

public class MetadataExtractor
{
    public TrackInfo ExtractFromTitle(string title)
    {
        // Smart parsing patterns
        var patterns = new[]
        {
            @"(.+?)\s*-\s*(.+?)(?:\s*\(.*\))?$",
            @"(.+?)\s*–\s*(.+?)(?:\s*\[.*\])?$",
            // More patterns...
        };

        // Extract and clean metadata
        return new TrackInfo(artist, title);
    }
}

3. Album Artwork Integration

I integrated with iTunes and Deezer APIs for authentic album artwork:

public async Task<string> GetAlbumArtwork(string artist, string title)
{
    // Try iTunes API first
    var iTunesUrl = await SearchITunes(artist, title);
    if (iTunesUrl != null) return iTunesUrl;

    // Fallback to Deezer
    var deezerUrl = await SearchDeezer(artist, title);
    if (deezerUrl != null) return deezerUrl;

    // Last resort: use video thumbnail
    return videoThumbnail;
}

🚀 Key Features That Make It Special

Privacy First

No telemetry or data collection
Works offline after initial setup
No ads or premium upsells

Smart Automation

Automatic dependency management (yt-dlp, FFmpeg)
Intelligent file naming
Metadata embedding with proper ID3 tags

User Experience

Batch downloads with individual progress tracking
Real-time preview of detected metadata
Toast notifications for completed downloads

📈 Performance Optimizations
Async/Await Throughout:

public async Task DownloadAsync(string url, IProgress<double> progress)
{
    await foreach (var chunk in downloader.DownloadChunksAsync(url))
    {
        await ProcessChunk(chunk);
        progress.Report(GetProgressPercentage());
    }
}

Efficient UI Updates:

Reactive properties with ObservableProperty
Throttled progress updates to prevent UI lag
Background processing with UI marshaling

🌟 What I Learned

Avalonia is amazing for cross-platform desktop apps
MVVM architecture scales really well for complex UIs
Platform differences require careful abstraction
User feedback through UI animations makes a huge difference
Open source community provides incredible support

🎯 Future Plans

Playlist support for batch downloading entire YouTube playlists
System tray integration for background downloads
Browser extension for one-click downloading
Download history and favorites management

🔗 Try It Out!
Symphex is 100% free and open source:

GitHub: CyberNilsen/Symphex
Download: Latest releases
Platforms: Windows, macOS, Linux

💭 Final Thoughts
Building Symphex taught me that sometimes the best solution is the one you build yourself. By focusing on user experience, privacy, and cross-platform compatibility, I created something that solves real problems.
The combination of C#, Avalonia UI, and modern design principles made it possible to build a professional-grade application that competes with commercial alternatives.

What features would you want in a music downloader? Let me know in the comments! 👇
If you found this interesting, consider ⭐ starring the repo on GitHub!
Github link: https://github.com/CyberNilsen/Symphex


This content originally appeared on DEV Community and was authored by Andreas Nilsen