Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add monitor for music play #120

Merged
merged 1 commit into from
Jul 22, 2016
Merged

Add monitor for music play #120

merged 1 commit into from
Jul 22, 2016

Conversation

gavin-lin
Copy link
Collaborator

  1. Done by monitoring setMedia() in write events.
  2. The function name 'write' is really misleading, but since we are going to make output more readable, we can deal with this that time.
  3. Because of item 2, I don't want too many write events show up in other apps, but I have not found good way to sort them yet, so I just filter them out except the one with setMedia().

@gavin-lin
Copy link
Collaborator Author

This will fix issue #92

@@ -107,6 +113,20 @@
item)
break
# For file access, put it here to ignore sendmsg
# For music file being set to play
elif 'setMedia()' in output:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can move this part to group with line 68

First check if it's a write event,
Check if it's the desired event setMedia()
Yes -> call printer
No -> continue the loop

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking to separate supressor from other codes, so if we need more write events, we can modify the supressor easily.

@Cypresslin Cypresslin merged commit 960e9dd into master Jul 22, 2016
@Cypresslin
Copy link
Owner

Make sense, thank you.

@gavin-lin gavin-lin deleted the music-app-file branch July 28, 2016 02:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants