Fix size detection of >10M files and add a toggle link to show/hide already download sings
This commit is contained in:
parent
5210a4d188
commit
da8345eca6
3
dl.sh
3
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
|
||||
|
||||
|
@ -16,6 +16,14 @@ require(MAIN_DIR."/common.php");
|
||||
<meta http-equiv="refresh" content="42">
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript">
|
||||
function toggleDiv(divname) {
|
||||
if (document.getElementById(divname).className=="")
|
||||
document.getElementById(divname).className="hidden";
|
||||
else
|
||||
document.getElementById(divname).className="";
|
||||
}
|
||||
</script>
|
||||
<div class="blk">
|
||||
<h2>Chansons prêtes à être téléchargées</h2>
|
||||
<div class="dled"><?php
|
||||
@ -75,8 +83,10 @@ if (count($list_archives))
|
||||
$ths = intval($m["dled"] / 21600);
|
||||
if ($last < $ths)
|
||||
{
|
||||
if ($last != 0)
|
||||
echo "</div>";
|
||||
$last = $ths;
|
||||
echo "<h4>".strftime("%a. %d %b %G - %H:%M", $m["dled"])."</h4>";
|
||||
echo "<h4>".strftime("%a. %d %b %G - %H:%M", $m["dled"]).' <a href="javascript:toggleDiv(\'mus'.$m["dled"].'\')">Afficher…</a></h4><div class="hidden" id="mus'.$m["dled"].'">';
|
||||
}
|
||||
format_clip($user, $m);
|
||||
}
|
||||
|
@ -194,3 +194,7 @@ div.clip:hover a.tp
|
||||
{
|
||||
display: block;
|
||||
}
|
||||
|
||||
div.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
Reference in New Issue
Block a user