New backup 2025-07-18 13:15:02

This commit is contained in:
Penelope Gwen 2025-07-18 13:15:02 -07:00
parent 1c5224b3c7
commit 0ed1ca1ae1
3 changed files with 5 additions and 3 deletions

View file

@ -296,6 +296,7 @@ $home-widget-border-color: rgba($color5,1);
}
.nowplayingart,
.rat {
background-position: center;
background-size: cover;
background-repeat: no-repeat;
}

View file

@ -6,5 +6,6 @@
:orientation "h"
:width 300
:height 300
; :style "background-image: url('/run/user/1000/album_art_cache/getCoverArt.view?id=952&u=pogmommy&p=mG%232001068485&v=1.13.0&c=Feishin&size=300');"))
:style "background-image: url('${nowplaying_img_path}');"))
; :style "background-image: url('${rat_image}');"))

View file

@ -2,7 +2,7 @@
playerctl metadata --format "{{mpris:artUrl}}" --follow | while IFS= read -r line; do
if [[ $line == *"http"* ]]; then
cache_dir="$XDG_RUNTIME_DIR/album_art_cache"
cache_dir="${HOME}/.cache/album_art_cache"
mkdir -p "$cache_dir"
file_name=$(basename "$line")
file_path="$cache_dir/$file_name"
@ -10,10 +10,10 @@ playerctl metadata --format "{{mpris:artUrl}}" --follow | while IFS= read -r lin
# Check if file exists
if [ -e "$file_path" ]; then
# File exists, return path immediately
echo "file://$file_path"
echo "$file_path"
else
curl --output "$file_path" "$line" > /dev/null 2>&1
echo "file://$file_path"
echo "$file_path"
fi
else
# artUrl doesn't have a link, nothing to do