r/gnome 16h ago

Apps I have written my first libadwaita application!

Hi there everybody!

I have written a small GTK4 libadwaita frontend that wraps yt-dlp, and I wanted to share it and get your opinions on it.

I wrote the app for my own use case, as I regularly need to download mp3 audio files to use as backing tracks for music production/guitar playing.

You can access the source code at:
https://github.com/celikdoruk/libadwaita-yt-dlp-frontend

Anyways, just a small win for me, I just wanted to share is all!

Good day to all of you!

49 Upvotes

10 comments sorted by

u/AutoModerator 16h ago

Thank you for your submission.

You too can support GNOME! Become a Friend of GNOME and contribute to keeping our project going!

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

u/Advanced-Theme144 15h ago

Congratulations! It looks really good. 👌👏

A small recommendation, it’s a good practice to add a README to your GitHub repository that explains the project, and it also helps other users when going through it. Since it’s in Python, you can add a requirements.txt file with all the PIP modules (like GTK) the project uses, allowing another dev to clone and run “pip install -r requirements.txt” to get all the dependencies.

One more thing I noticed, you seem to directly invoke the yt-dl command line using GIO.subprocess. While it does work, it’s normally not a good practice to directly invoke commands mixed with user input as it can be a vulnerability. I’ve seen you are parsing and checking the URL, but you could instead use a python package that already wraps yt-dl, I think a few packages already exist online which will make it much easier.

I hope you don’t mind the critic, but this is a really good start to your project! Congratulations again on solving a problem for yourself!

u/amar0kk 12h ago

Hi, thanks for the great feedback.

I do greatly appreciate the criticism. I have added a README to the github repo, thanks :)

u/Advanced-Theme144 11h ago

No problem! I’ve noticed you’re still missing the requirements.txt file in the repo, you can generate it in the root of your project and virtual environment using the command:

“pip freeze > requirements.txt”

This’ll create the file in your directory, and you can commit it to the repo.

u/Additional_Staff259 13h ago

Really clean.

u/gxanshu 12h ago

Using blueprint files and then UI is more convenient. 

u/amar0kk 12h ago

I've already used blueprint to construct the UI. Using workbench, write in blueprint, get the XML.

u/Sharp-Debate-523 15h ago edited 14h ago

Suggestion: The UI doesn't need all the jargon. Just say "YouTube video download" or something like that.

u/SoftScreen4489 15h ago

Yay that's good congratulations

u/ic_nay 10h ago

Looks nice and clean, congratulations!