From 3d8242920834bab4d7db8bf68344c8f83ccd8179 Mon Sep 17 00:00:00 2001 From: itec78 Date: Thu, 18 Nov 2021 17:02:53 +0100 Subject: [PATCH] yt-dpl and fixes --- playlistalo.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/playlistalo.py b/playlistalo.py index d934ad0..e29dc5f 100755 --- a/playlistalo.py +++ b/playlistalo.py @@ -2,8 +2,8 @@ #Playlistalo - simpatico script che legge le cartelle e genera la playlist #Requirements: youtube_dl Mastodon.py python-telegram-bot validators python-musicpd -#import youtube_dlc as youtube_dl -import youtube_dl +#import youtube_dl +import yt_dlp as youtube_dl import shutil import sys import re @@ -37,7 +37,7 @@ ARCHIVE = True TELEGRAM_TOKEN = "" MASTODON_TOKEN = "" MASTODON_URL = "" -ANNOUNCEREPEAT = 3 +ANNOUNCEREPEAT = 5 #Scrivi la prima configurazione configfile = 'playlistalo.conf' @@ -657,7 +657,7 @@ def trimaudio(fin, fout): fade = 10 audio = AudioSegment.from_file(fin, "m4a") - print(audio.duration_seconds) + #print(audio.duration_seconds) @@ -668,12 +668,12 @@ def trimaudio(fin, fout): #trim audio = split_on_silence(audio, min_silence_len=3000, silence_thresh=-70.0, seek_step=100)[0] - print(audio.duration_seconds) + #print(audio.duration_seconds) #fade if (audio.duration_seconds > maxlen + tolerance): audio = audio[:maxlen*1000].fade_out(fade*1000) - print(audio.duration_seconds) + #print(audio.duration_seconds) #normalize audio = match_target_amplitude(audio, -20.0)