Skip to content

Commit

Permalink
ignore tracks with no artist
Browse files Browse the repository at this point in the history
  • Loading branch information
foxfirecodes committed Dec 23, 2024
1 parent 6079414 commit f910198
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/common
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ function get_active_player {
*) ;;
esac
fi

# sometimes players kinda break and wont respond to metadata requests. break gracefully if that happens <3
if playerctl -p "$player" metadata &>/dev/null; then
if playerctl -p "$player" metadata &>/dev/null && [ -n "$(playerctl -p "$player" metadata xesam:artist)" ]; then
echo "$player"
fi
}
Expand Down

0 comments on commit f910198

Please sign in to comment.