Added player name into music post.
This commit is contained in:
parent
fb97aab81f
commit
870cf0e4fd
@ -102,7 +102,7 @@ scrobble_music() {
|
|||||||
|
|
||||||
# Post music with -M flag requires playerctl.
|
# Post music with -M flag requires playerctl.
|
||||||
post_music() {
|
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}}')"
|
local link="$(playerctl metadata -f '{{xesam:url}}')"
|
||||||
if [[ "${link}" =~ ^file:// ]]; then
|
if [[ "${link}" =~ ^file:// ]]; then
|
||||||
link="https://www.youtube.com/results?search_query=$(playerctl metadata -f '{{artist}} {{title}}' | urlencode -b)"
|
link="https://www.youtube.com/results?search_query=$(playerctl metadata -f '{{artist}} {{title}}' | urlencode -b)"
|
||||||
|
Loading…
Reference in New Issue
Block a user