Skip to content

Commit dd4bd96

Browse files
committed
Pass entire payload generated by the os-specific window implementation
This allows the url to be passed through
1 parent b868629 commit dd4bd96

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

aw_watcher_window/main.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,10 @@ def heartbeat_loop(client, bucket_id, poll_time, exclude_title=False):
7676
if current_window is None:
7777
logger.debug('Unable to fetch window, trying again on next poll')
7878
else:
79-
# Create current_window event
80-
data = {
81-
"app": current_window["appname"],
82-
"title": current_window["title"] if not exclude_title else "excluded"
83-
}
84-
current_window_event = Event(timestamp=now, data=data)
79+
if exclude_title:
80+
current_window["title"] = "excluded"
81+
82+
current_window_event = Event(timestamp=now, data=current_window)
8583

8684
# Set pulsetime to 1 second more than the poll_time
8785
# This since the loop takes more time than poll_time

0 commit comments

Comments
 (0)