Added player name into music post.

This commit is contained in:
stormdragon2976 2023-02-01 13:20:21 -05:00
parent fb97aab81f
commit 870cf0e4fd
1 changed files with 1 additions and 1 deletions

View File

@ -102,7 +102,7 @@ scrobble_music() {
# Post music with -M flag requires playerctl.
post_music() {
local text="$(playerctl metadata -f 'Now playing "{{title}}" by "{{artist}}" from "{{album}}"')"
local text="$(playerctl metadata -f 'Now playing "{{title}}" by "{{artist}}" from "{{album}}" via "{{playerName}}"')"
local link="$(playerctl metadata -f '{{xesam:url}}')"
if [[ "${link}" =~ ^file:// ]]; then
link="https://www.youtube.com/results?search_query=$(playerctl metadata -f '{{artist}} {{title}}' | urlencode -b)"