Optimisation de music-convert

This commit is contained in:
Breizh 2023-07-29 02:29:42 +02:00
parent a900bd2a2d
commit 55f1a1657f
3 changed files with 15 additions and 11 deletions

View file

@ -40,6 +40,8 @@ warnaboutpackageupdates =
sudoloopinterval = 30 sudoloopinterval = 30
pacmanpath = pacman pacmanpath = pacman
privilegeescalationtool = sudo privilegeescalationtool = sudo
privilegeescalationtarget = pikaur
userid = 0
[network] [network]
aururl = https://aur.archlinux.org aururl = https://aur.archlinux.org

View file

@ -321,6 +321,7 @@ set nested_ranger_warning true
# setlocal path=~/downloads sort mtime # setlocal path=~/downloads sort mtime
# setlocal path=~/mnt preview_max_size 52428800 # setlocal path=~/mnt preview_max_size 52428800
setlocal path=~/mnt preview_directories false setlocal path=~/mnt preview_directories false
setlocal path=~/mnt/seedbox sort_directories_first false
setlocal path=~/cache/ranger use_preview_script false setlocal path=~/cache/ranger use_preview_script false
setlocal path=~/cache/ranger preview_images false setlocal path=~/cache/ranger preview_images false
@ -368,7 +369,8 @@ map <A-k> scroll_preview -1
map ? help map ? help
map W display_log map W display_log
map w taskview_open map w taskview_open
map S shell $SHELL #map S shell $SHELL
map S shell fish
map : console map : console
map ; console map ; console

View file

@ -44,19 +44,19 @@ do
continue continue
fi fi
# Définition du fichier de destination
dstfile="${file%.*}.opus"
# Passe les fichiers déjà traités
if [[ "${dstdir}${dstfile}" -nt "${file}" ]]
then
echo "[${blue}SKIP${reset}] ${dir#./}$file"
continue
fi
# Converti uniquement les vidéos # Converti uniquement les vidéos
if [[ "$(file --mime-type -b -e ascii -e compress -e tar -e cdf "$file")" =~ video/ ]] if [[ "$(file --mime-type -b -e ascii -e compress -e tar -e cdf "$file")" =~ video/ ]]
then then
# Définition du fichier de destination
dstfile="${file%.*}.opus"
# Passe les fichiers déjà traités
if [[ "${dstdir}${dstfile}" -nt "${file}" ]]
then
echo "[${blue}SKIP${reset}] ${dir#./}$file"
continue
fi
# Parallélisation des conversions # Parallélisation des conversions
declare -a running declare -a running