diff --git a/deezer_downloader/web/app.py b/deezer_downloader/web/app.py index 7d7d24e..9fcca6a 100644 --- a/deezer_downloader/web/app.py +++ b/deezer_downloader/web/app.py @@ -86,14 +86,6 @@ def index(): static_root=config["http"]["static_root"], use_mpd=str(config['mpd'].getboolean('use_mpd')).lower()) -@app.route("/save_config", methods=['POST']) -@validate_schema("login", "password", "dirPath") -def parameters(): - user_input = request.get_json(force=True) - dir = user_input['dirPath'] - - #return jsonify({'error': 'Champs requis manquants'}), 400 - return jsonify() @app.route("/debug") def show_debug(): diff --git a/deezer_downloader/web/static/css/custom.css b/deezer_downloader/web/static/css/custom.css index e72e2e3..8044b0a 100644 --- a/deezer_downloader/web/static/css/custom.css +++ b/deezer_downloader/web/static/css/custom.css @@ -2,6 +2,7 @@ display: flex; height: 38px; border: 1px solid #ced4da; + background-color: white; border-radius: 7px; padding: 0 8px; } @@ -13,12 +14,12 @@ input.search { border: none; outline: none; background-color: transparent; - color: white !important; + color: black !important; } button.search { height: 100%; - color: white; + color: #6c757d; font-size: 14px; border: none; background-color: transparent; diff --git a/deezer_downloader/web/static/js/custom.js b/deezer_downloader/web/static/js/custom.js index aa19ac2..56a74b1 100644 --- a/deezer_downloader/web/static/js/custom.js +++ b/deezer_downloader/web/static/js/custom.js @@ -306,25 +306,6 @@ $(document).ready(function() { }); // END DEEZER FAVORITE SONGS - $('#paramters').on('submit', function(e) { - e.preventDefault(); - $.ajax({ - url: deezer_downloader_api_root + '/save_config', - type: 'POST', - contentType: 'application/json', // essentiel pour Flask.get_json() - data: JSON.stringify({ dirPath: $('#param-directry-path').val(), - login: $('#param-login').val(), - password: $('#param-password').val()}), - success: function(response) { - $.jGrowl("Sauvegarder avec succès", { life: 4000 }); - }, - error: function(xhr) { - const err = xhr.responseJSON?.error || 'Erreur inconnue'; - $('#result').css('color', 'red').text(err); - } - }); - }); - function show_tab(id_nav, id_content) { // nav @@ -338,6 +319,14 @@ $(document).ready(function() { $("#" + id_content).addClass("active show") } + $('#youtubedl-query-video').on('keypress', function(e) { + if (e.which === 13) { + e.preventDefault(); + $('#yt_download_video').click(); + } + }); + + var bbody = document.getElementById('body'); bbody.onkeydown = function (event) { diff --git a/deezer_downloader/web/templates/index.html b/deezer_downloader/web/templates/index.html index 6c8de6a..33aedb8 100644 --- a/deezer_downloader/web/templates/index.html +++ b/deezer_downloader/web/templates/index.html @@ -57,9 +57,6 @@ - @@ -108,28 +105,38 @@

Download audio files via youtube-dl

- -   -
+ +
- - - + + +

Download video files via youtube-dl

-
- -   -
+ +
+ +

- - + + - + +

@@ -143,10 +150,18 @@
- - - - + + + +
@@ -161,10 +176,18 @@
- - - - + + + +
@@ -177,10 +200,18 @@
- - - - + + + +
@@ -203,30 +234,6 @@ -
-
-

Configuration

- -
-
- - -
- -
- - -
- -
- - -
- - -
- -