diff --git a/.config/mpv/mpv.conf b/.config/mpv/mpv.conf
index ea587eb..273fe54 100644
--- a/.config/mpv/mpv.conf
+++ b/.config/mpv/mpv.conf
@@ -1,6 +1,5 @@
# Vidéo
profile=gpu-hq
-gpu-context=x11vk
scale=ewa_lanczossharp
cscale=ewa_lanczossharp
#video-sync=display-resample
diff --git a/.config/pikaur.conf b/.config/pikaur.conf
index d07a938..b07cc09 100644
--- a/.config/pikaur.conf
+++ b/.config/pikaur.conf
@@ -42,6 +42,8 @@ privilegeescalationtool = sudo
privilegeescalationtarget = pikaur
userid = 0
preserveenv = PKGDEST,VISUAL,EDITOR,http_proxy,https_proxy,ftp_proxy,HTTP_PROXY,HTTPS_PROXY,FTP_PROXY,ALL_PROXY
+cachepath = /home/breizh/.cache
+datapath = /home/breizh/.local/share
[network]
aururl = https://aur.archlinux.org
diff --git a/.local/bin/mpd-notif b/.local/bin/mpd-notif
index a4419a6..c7affaf 100755
--- a/.local/bin/mpd-notif
+++ b/.local/bin/mpd-notif
@@ -13,17 +13,16 @@ do
# Toutes les 5 secondes, ou dès que le morceau se termine
timeout 5 mpc -w current
- prevfile="${infos[3]}"
mapfile -t infos < <(mpc -f '[%artist%|%name%]\n%title%\n%album%\n%file%\n%time%' current)
# Si le morceau a changé depuis la dernière vérification
- if [[ "${infos[3]}" != "$prevfile" && "$title" != "Arrêt" ]]
+ if [[ "${infos[1]:-${infos[3]}}" != "$title" && "$title" != "Arrêt" ]]
then
artist="${infos[0]}"
title="${infos[1]:-${infos[3]}}"
album="${infos[2]}"
- length="$(( ${infos[4]%%:*} * 60 + ${infos[4]##*:} ))"
+ [[ -n "${infos[4]}" ]] && length="$(( ${infos[4]%%:*} * 60 + ${infos[4]##*:} ))"
# Si on obtiens un chemin absolu, on n’affiche que le nom, pas
# le chemin.
@@ -45,7 +44,7 @@ do
--data-urlencode "title=${title}" \
--data-urlencode "artist=${artist}" \
--data-urlencode "album=${album}" \
- --data-urlencode "length=${length}" \
+ ${length:+--data-urlencode "length=${length}"} \
https://pleroma.breizh.pm/api/v1/pleroma/scrobble &>/dev/null
fi
done