Compare commits

...

15 Commits

Author SHA1 Message Date
b34439cc9a revert back to youtube-dl 2021-02-22 17:27:58 +00:00
f851cdbc30 revert back to youtube-dl 2021-02-20 16:18:07 +00:00
6d4c5f92dc rename repo 2020-11-11 12:49:49 +00:00
09d9204ea5 name change; use youtube-dlc fork 2020-11-11 12:48:47 +00:00
3a7cb6c6a3 bump 2020-09-13 16:16:01 +01:00
c4424b806f apparently this is needed for windows support (although I have not managed to cross-compile to windows yet) 2020-09-13 16:15:40 +01:00
90155796c6 set input purpose 2020-09-13 16:14:52 +01:00
66f06461a1 readme 2020-09-13 16:14:14 +01:00
8736644435 bump 2020-09-11 11:23:23 +01:00
ab77d59e29 don't set spacing twice 2020-09-11 11:23:12 +01:00
6ebce96d96 bump 2020-09-11 11:20:28 +01:00
f600ee3692 use SPACING const 2020-09-11 11:19:54 +01:00
30167d0eee description 2020-09-11 11:07:32 +01:00
8e3e04791b ignore IDE dir 2020-09-11 11:03:53 +01:00
c7c23dc815 repo/license 2020-09-11 11:03:23 +01:00
4 changed files with 42 additions and 7 deletions

1
.gitignore vendored
View File

@@ -1,2 +1,3 @@
/target
/Cargo.lock
/.idea/

View File

@@ -1,7 +1,10 @@
[package]
name = "youtube-dl-gtk"
version = "0.1.0"
name = "media-downloader-gtk"
description = "a simple frontend for youtube-dlc"
version = "0.1.5"
authors = ["Max Bradbury <max@tinybird.info>"]
repository = "https://tinybird.dev/max/media-downloader"
license = "MIT"
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

29
README.md Normal file
View File

@@ -0,0 +1,29 @@
# media-downloader
a simple graphical frontend for the `youtube-dl` media downloader.
`youtube-dl` must be installed and in your PATH.
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
no validation for URL bar
no user feedback
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.
TODO: investigate using https://crates.io/crates/gtk-future-executor
would it be possible to add progress bars for in-progress downloads somehow?
notifications for when downloads finish?

View File

@@ -1,6 +1,8 @@
#![windows_subsystem = "windows"]
use gio::prelude::*;
use gtk::prelude::*;
use gtk::Orientation;
use gtk::{Orientation, InputPurpose};
use std::env::args;
use std::process::Command;
@@ -9,8 +11,8 @@ const SPACING: i32 = 16;
fn build_ui(application: &gtk::Application) {
let window = gtk::ApplicationWindow::new(application);
window.set_title("youtube-dl");
window.set_border_width(10);
window.set_title("media downloader");
window.set_border_width(SPACING as u32);
window.set_position(gtk::WindowPosition::Center);
window.set_default_size(400, 100);
@@ -21,8 +23,8 @@ fn build_ui(application: &gtk::Application) {
let button = gtk::Button::with_label("Go!");
input_url.set_placeholder_text(Some("Enter URL here"));
input_url.set_input_purpose(InputPurpose::Url);
horizontal.set_spacing(SPACING);
horizontal.set_homogeneous(true);
window.add(&vertical);
@@ -58,7 +60,7 @@ fn build_ui(application: &gtk::Application) {
fn main() {
let application = gtk::Application::new(
Some("dev.tinybird.max.youtube-dl-gtk"),
Some("dev.tinybird.max.media-downloader"),
Default::default()
).expect("Initialization failed...");