refactor: improve readability of ignored_sources array in update_cache.sh

This commit is contained in:
2024-08-28 06:36:33 -04:00
parent a7949a96fe
commit 1653a9f1e5
+2 -1
View File
@@ -10,6 +10,7 @@ ignored_players=(
"kdeconnect" "kdeconnect"
"haruna" "haruna"
"plasma-browser-integration" "plasma-browser-integration"
"plasma-browser-integration-76042"
) )
# Convert array to a comma-separated string with no spaces # Convert array to a comma-separated string with no spaces
@@ -38,7 +39,7 @@ trap cleanup EXIT
# Update the music cache file every second # Update the music cache file every second
while true; do while true; do
playerctl --ignore-player ${ignored_sources} metadata --format "{{ artist }}${separator}{{ title }}${separator}{{ album }}${separator}{{ status }}${separator}{{ volume }}${separator}{{ loop }}${separator}{{ shuffle }}" >~/.cache/music_cache.txt playerctl --ignore-player "${ignored_sources}" metadata --format "{{ artist }}${separator}{{ title }}${separator}{{ album }}${separator}{{ status }}${separator}{{ volume }}${separator}{{ loop }}${separator}{{ shuffle }}" >~/.cache/music_cache.txt
sleep 1 sleep 1
done & # Run this loop in the background done & # Run this loop in the background