]> littlesong.place Git - littlesongplace.git/commitdiff
Re-enable youtube importer, add logging
authorChris Fulljames <christianfulljames@gmail.com>
Sat, 29 Mar 2025 12:34:55 +0000 (08:34 -0400)
committerChris Fulljames <christianfulljames@gmail.com>
Sat, 29 Mar 2025 12:34:55 +0000 (08:34 -0400)
main.py
templates/edit-song.html

diff --git a/main.py b/main.py
index 291694ecf7dac70860ae0d35e6a131d47e454e00..b154ccc2bdfe0b7d4ddce3ba853b5ee57e5e62dd 100644 (file)
--- a/main.py
+++ b/main.py
@@ -510,6 +510,7 @@ def yt_import(tmp_file, yt_url):
     ydl_opts = {
         'format': 'm4a/bestaudio/best',
         'outtmpl': tmp_file.name,
+        'logger': app.logger,
     }
     with YoutubeDL(ydl_opts) as ydl:
         ydl.download([yt_url])
index cf8b6a57389413597a383c58b53015db298fc742..552c1cf9877b7219d83b270b3f098926526b36a0 100644 (file)
@@ -22,9 +22,8 @@ Most standard audio/video formats are supported - .wav, .mp3, .ogg, .mp4, etc.
         <label for="file">Upload a song from my device</label><br/>
     </div>
     <div class="upload-form">
-        <input type="radio" id="yt" name="upload-type" value="yt" onchange="selectUploadMethod()" hidden/>
-        <label for="yt" hidden>Import a song from YouTube</label>
-        <small>(Looking for the YouTube importer?  Unfortunately it's currently broken - hopefully it will be back soon!)</small>
+        <input type="radio" id="yt" name="upload-type" value="yt" onchange="selectUploadMethod()"/>
+        <label for="yt">Import a song from YouTube</label>
     </div>
     <div class="upload-form" id="audio-file">
         <label for="song-file">{% if song %}Replace {% endif %}Audio File</label><br>