Compare commits

..

3 Commits

2 changed files with 23 additions and 2 deletions

18
README.md Normal file
View File

@ -0,0 +1,18 @@
# youtube-dl-gtk
a simple graphical frontend for the `youtube-dl` media downloader.
really just an experiment in creating my first desktop program, so don't expect too much.
uses `gtk-rs`. released under the MIT license.
## features
download from any media source that `youtube-dl` supports (e.g. soundcloud, mixcloud, etc.)
extract audio and convert to mp3
## known problems
will hang after clicking "go!" due to `youtube-dl` being executed in the same thread.
there is no user feedback so this basically looks like the program crashing.

View File

@ -1,6 +1,8 @@
#![windows_subsystem = "windows"]
use gio::prelude::*; use gio::prelude::*;
use gtk::prelude::*; use gtk::prelude::*;
use gtk::Orientation; use gtk::{Orientation, InputPurpose};
use std::env::args; use std::env::args;
use std::process::Command; use std::process::Command;
@ -21,7 +23,8 @@ fn build_ui(application: &gtk::Application) {
let button = gtk::Button::with_label("Go!"); let button = gtk::Button::with_label("Go!");
input_url.set_placeholder_text(Some("Enter URL here")); input_url.set_placeholder_text(Some("Enter URL here"));
input_url.set_input_purpose(InputPurpose::Url);
horizontal.set_homogeneous(true); horizontal.set_homogeneous(true);
window.add(&vertical); window.add(&vertical);