Amélioration de la requête Pleroma scrobble

This commit is contained in:
Breizh 2024-05-29 01:16:25 +02:00
parent a57cebca97
commit 92133d8471
3 changed files with 4 additions and 3 deletions

View file

@ -1,6 +1,5 @@
# Vidéo
profile=gpu-hq
gpu-context=x11vk
scale=ewa_lanczossharp
cscale=ewa_lanczossharp
#video-sync=display-resample

View file

@ -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

View file

@ -23,7 +23,7 @@ do
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 naffiche que le nom, pas
# le chemin.
@ -45,7 +45,7 @@ do
--data-urlencode "title=${title}" \
--data-urlencode "artist=${artist}" \
--data-urlencode "album=${album}" \
--data-urlencode "length=${length}" \
${length:+--data-urlencode "length=${length:-null}"} \
https://pleroma.breizh.pm/api/v1/pleroma/scrobble &>/dev/null
fi
done