5–8 minutes
1,191 words

Fixing Gapless with free LLM

Don’t Vibecode Another App. Improve Those We Have.

I’ve seen plenty of hyped-up publications describing how an amateur Robin Hood vibecoded an app to fight greedy corporations.

Leaving aside the fact that, in most cases, these projects haven’t progressed beyond the MVP stage, I’ve always wondered: why? Why create yet another buggy version of Microsoft Word or Photoshop when the community already has LibreOffice and Krita? To me, the obvious use case for LLMs is to improve all the diverse open-source software that already exists, which is exactly what I’ve been working on. Let me tell you how I (almost) solved the problem of listening to music. No, I didn’t “record” an album using AI.

Over the last couple of years, some of you may have noticed a movement towards ditching streaming services. Some people care about music quality, while others want to actually own the music they pay for, especially when distributors withdraw it from streaming, which happens surprisingly often.

I’ve started building my own offline library as well. For me, the main motivation was the availability of songs. Many independent or pre-web-era artists simply aren’t available on streaming services. Buying tracks directly from independent artists is also a great way to support them, especially compared to the revenue they might earn from streaming giants, even with thousands of listeners, not to mention beginners with just a few hundred fans.

The first question when setting up an offline listening experience was: what’s the go-to music player nowadays?

Does Winamp still exist? Since I’m a Linux user, my research ended with two apps. Lollypop Player has great functionality and excellent metadata support, but its UI is relatively heavy and it isn’t localized.

I found Gapless to be not only prettier and simpler but also available in Belarusian, which I appreciate. Gapless is also well optimized, as its RPM package weighs just 348 KB. That’s right, less than 1 MB, because it relies on system dependencies to function.

I was leaning towards Gapless, but then I found one critical issue: it couldn’t handle multiple artists on a single track. Choosing an app turned into an aesthetics-versus-functionality dilemma.

So what’s the problem with artists? Let me give you an example. In 2023, Viačasłaŭ Kmit and Daniił Vaškievič recorded a compilation album called «Chmaračosy ŭ Maich Krozach». It has eight songs in total. Viačasłaŭ appears on six of them, while Daniił appears on five. Three out of the eight tracks are duets. After that, they also made solo recordings.

Lollypop gives me three options: listen to the whole album, listen only to Viačasłaŭ’s songs, or listen only to Daniił’s songs. Gapless, on the other hand, lets beside sorting tracks by album, propose the following artists: Daniił Vaškievič, Viačasłaŭ Kmit and an artist listed as «Viačasłaŭ Kmit; Daniił Vaškievič».

Why does this happen? Modern media formats support various metadata standards, but handling multiple artists isn’t always straightforward. Some formats allow several values for the same ARTIST field, while others or certain applications store all performers as a single text string. There’s also no universally consistent convention for separating artists in such strings, so you might encounter separators such as “feat”, “ft.”, “ft”, or, in my case, simply “;”. As a result, music players may interpret a collaboration as a completely separate artist rather than recognizing the individual performers.

Now imagine a track featuring not just two, but three, four, or even five artists. This is quite common in some genres. In the end, your library becomes a mess, and you’re no longer able to listen to your favourite artists across all their collaborations with other musicians.

Since my powerful corporate laptop and fancy Claude subscription were no longer available, what initially seemed like a one-prompt problem turned into a small experiment.

At first, I decided to take the easiest route and connect my Git repository to Google’s AI Studio. Once the code was imported, Gemini started crunching away and initially told me: “Your application failed to start. There was an error during the build process. Give us a moment to try and fix it…”

The problem was that the previously fully functional code was now broken. Styles changed randomly, as did the behaviour of some elements.

What’s even funnier is that Studio not only randomly changes styles but also fails to re-upload the same app a second time. I’m not surprised, as the tool was designed for web-based apps rather than native Linux applications.

New AI features and capabilities emerge every week, so instead of repeating my old workflow with VSCode and Claude, I asked a professional developer for advice. He pointed me towards Orca, an Agent Development Environment. We also browsed openrouter.ai for some free LLM models, as I was curious about what’s possible today beyond the conventional market leaders.

I had two vibe-coding approaches in mind:
• Simply ask the model to add the missing feature.
• Show it how the feature works in Lollypop and ask it to implement the same functionality in Gapless.

I started with the first approach. In my initial prompt, I asked the model to configure a container with all the dependencies required for this native GNOME app. The container launched, the app built, and everything worked. After a short discussion with the model, I understood how the app builds a database based on track metadata, so I asked it to add support for several common types of separators.

A few additional questions later, I had a new build… and no success. The ARTIST property in each track was still being treated as a separate, unique artist. I gave it a second prompt to debug the issue. This time, everything worked properly, using a completely free model and spending zero dollars.

The harder part turned out to be delivering this update to the actual app. I tried to commit my changes to the original Git repository, but discovered that only approved users could do that. So I checked the list of contributors and chose the most active ones, along with the main author, seven people in total. No one has answered me yet.

Commercial software usually has a product owner who decides which features to prioritize. Companies can also track user activity, retire outdated features, and adapt to changing habits. Open-source projects are often more decentralized: contributors may introduce too many features or create yet another fork instead of improving the original project.

Of course, I could create my own fork, build a Flatpak or AppImage, and use it locally. But what I’d really like is to have professional developers review my AI-generated code and potentially integrate the new functionality without compromising quality or stability.

And this brings me to an open question: how should AI-generated contributions find their way into existing open-source projects? AI can already solve real problems and implement missing features, even with free models. But generating working code is only half the job. We still need experienced developers to review it and decide whether it deserves a place in the project.

© Eugene Sidorov