Que des bangers - retour accueil
git clone git://bebou.netlib.re/arthur-playlist
Log | Files | Refs |
commit b2a4fd64be211bf96698a1e239e3805bf3dcec36 parent 5b51b52d4a5eaa87886257db7a9a2ee22383b46e Auterice: Arthur Pons <arthur.pons@unistra.fr> Date: Thu, 23 May 2024 16:46:06 +0200 Ajout du script de synchro et d'un nouveau son Diffstat:
M | .gitignore | | | 1 | + |
M | playlist.m3u | | | 1 | + |
A | update | | | 35 | +++++++++++++++++++++++++++++++++++ |
3 files changed, 37 insertions(+), 0 deletions(-)
diff --git a/.gitignore b/.gitignore @@ -1,3 +1,4 @@ * !.gitignore !playlist.m3u +!update diff --git a/playlist.m3u b/playlist.m3u @@ -1,3 +1,4 @@ +Jasual Cazz Libellule mazpH9qaDW0 Doublezip MEGABOOM MEGABOOM Snoop Dogg Jamel Debbouze Mission Cleopatra Er7e7lxZ8tE Cousin Kula Hanging on your lips C3BEisyGKKU diff --git a/update b/update @@ -0,0 +1,35 @@ +#! /bin/sh -ue + +in=$(mktemp);files=$(mktemp);todl=$(mktemp);links=$(mktemp);torm=$(mktemp) + +while IFS= read -r track +do + id=$(echo "$track" | cut -f3) + title=$(echo "$track" | sed 's/ / - /' | cut -f1) + if ls -1 ./* | grep -qE ".+${id:-todl}.+" + then + echo "nothing to do for track $track" + else + echo "something to do for track $track" + if [ ${1:-notluck} = "-l" ] + then + id=$(ytgetvideos "$title" | head -n1 | cut -f1) + else + id=$(ytgetvideos "$title" | fzy | cut -f1) + fi + echo "$id" + yt-dlp -f bestaudio -- "$id" + escapedtrack=$(echo "$track" | sed -E 's/[]()+[]/\\&/g') + sed -Ei "/$escapedtrack/ s/^(.+ .+ ).*( .*)$/\1$id\2/" playlist.m3u + fi +done < playlist.m3u + +#for track in $(sed 's/ / - /' p | cut -f1) +#do +# echo "Searching $track" +# ytgetvideos "$track" | +# fzy | +# cut -f1 | +# tee -a ids | +# xargs yt-dlp -f bestaudio +#done