From da8345eca6fe95ba9c30193ffef6ed067a1c4e5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=A9munaire?= Date: Wed, 31 Oct 2012 21:09:35 +0100 Subject: [PATCH] Fix size detection of >10M files and add a toggle link to show/hide already download sings --- dl.sh | 3 ++- htdocs/index.php | 12 +++++++++++- htdocs/style.css | 4 ++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/dl.sh b/dl.sh index 7b4492f..b06f458 100755 --- a/dl.sh +++ b/dl.sh @@ -23,8 +23,9 @@ if [ ! -e /tmp/dlEnCours ]; then echo "-- " >> $f.done transmission-remote -AS else + $pwd/youtube-dl --skip-download "$lign" size=`$pwd/youtube-dl --skip-download "$lign" | grep "File size"` - if echo $size | grep -E " [1234]?[0-9]{2}\.[0-9]+M " + if echo $size | grep -E " [1234]?[0-9]{1,2}\.[0-9]+M " then echo "$lign" >> $pwd/database diff --git a/htdocs/index.php b/htdocs/index.php index 6830ba7..70956e5 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -16,6 +16,14 @@ require(MAIN_DIR."/common.php"); +

Chansons prêtes à être téléchargées

"; $last = $ths; - echo "

".strftime("%a. %d %b %G - %H:%M", $m["dled"])."

"; + echo "

".strftime("%a. %d %b %G - %H:%M", $m["dled"]).' Afficher…