eww: refactor and improved experience with media widgets
This commit is contained in:
@@ -103,7 +103,7 @@ class PlayerManager:
|
||||
else:
|
||||
self.clear_output()
|
||||
|
||||
de on_metadata_changed(self, player, metadata, _=None):
|
||||
def on_metadata_changed(self, player, metadata, _=None):
|
||||
logger.debug(f"Metadata changed for player {player.props.player_name}")
|
||||
player_name = player.props.player_name
|
||||
artist = player.get_artist()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# initial notification history
|
||||
json_initial_history=$(makoctl history | jq -c '.data[]' | sed 's/\\[n]/\\n/g')
|
||||
json_initial_history=$(makoctl history | jq -c '.data[]' | sed -e 's/\\[n]/\\n/g' -e 's/&/&/g')
|
||||
echo $json_initial_history
|
||||
|
||||
while true; do
|
||||
@@ -9,7 +9,7 @@ while true; do
|
||||
sleep .2
|
||||
|
||||
# frequently updated history variable
|
||||
json_history=$(makoctl history | jq -c '.data[]' | sed 's/\\[n]/\\n/g')
|
||||
json_history=$(makoctl history | jq -c '.data[]' | sed -e 's/\\[n]/\\n/g' -e 's/&/&/g')
|
||||
|
||||
if ! [[ "$json_initial_history" == "$json_history" ]]; then
|
||||
json_initial_history="$json_history"
|
||||
|
||||
Reference in New Issue
Block a user