{"action":"created","issue":{"url":"https://api.github.com/repos/willprice/python-omxplayer-wrapper/issues/53","repository_url":"https://api.github.com/repos/willprice/python-omxplayer-wrapper","labels_url":"https://api.github.com/repos/willprice/python-omxplayer-wrapper/issues/53/labels{/name}","comments_url":"https://api.github.com/repos/willprice/python-omxplayer-wrapper/issues/53/comments","events_url":"https://api.github.com/repos/willprice/python-omxplayer-wrapper/issues/53/events","html_url":"https://github.com/willprice/python-omxplayer-wrapper/pull/53","id":175034563,"number":53,"title":"add some callback events to Player","user":{"login":"markkorput","id":205974,"avatar_url":"https://avatars.githubusercontent.com/u/205974?v=3","gravatar_id":"","url":"https://api.github.com/users/markkorput","html_url":"https://github.com/markkorput","followers_url":"https://api.github.com/users/markkorput/followers","following_url":"https://api.github.com/users/markkorput/following{/other_user}","gists_url":"https://api.github.com/users/markkorput/gists{/gist_id}","starred_url":"https://api.github.com/users/markkorput/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markkorput/subscriptions","organizations_url":"https://api.github.com/users/markkorput/orgs","repos_url":"https://api.github.com/users/markkorput/repos","events_url":"https://api.github.com/users/markkorput/events{/privacy}","received_events_url":"https://api.github.com/users/markkorput/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/willprice/python-omxplayer-wrapper/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-05T09:46:09Z","updated_at":"2016-09-12T21:01:49Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/willprice/python-omxplayer-wrapper/pulls/53","html_url":"https://github.com/willprice/python-omxplayer-wrapper/pull/53","diff_url":"https://github.com/willprice/python-omxplayer-wrapper/pull/53.diff","patch_url":"https://github.com/willprice/python-omxplayer-wrapper/pull/53.patch"},"body":"Implements feature request #49 "},"comment":{"url":"https://api.github.com/repos/willprice/python-omxplayer-wrapper/issues/comments/246492129","html_url":"https://github.com/willprice/python-omxplayer-wrapper/pull/53#issuecomment-246492129","issue_url":"https://api.github.com/repos/willprice/python-omxplayer-wrapper/issues/53","id":246492129,"user":{"login":"markkorput","id":205974,"avatar_url":"https://avatars.githubusercontent.com/u/205974?v=3","gravatar_id":"","url":"https://api.github.com/users/markkorput","html_url":"https://github.com/markkorput","followers_url":"https://api.github.com/users/markkorput/followers","following_url":"https://api.github.com/users/markkorput/following{/other_user}","gists_url":"https://api.github.com/users/markkorput/gists{/gist_id}","starred_url":"https://api.github.com/users/markkorput/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markkorput/subscriptions","organizations_url":"https://api.github.com/users/markkorput/orgs","repos_url":"https://api.github.com/users/markkorput/repos","events_url":"https://api.github.com/users/markkorput/events{/privacy}","received_events_url":"https://api.github.com/users/markkorput/received_events","type":"User","site_admin":false},"created_at":"2016-09-12T21:01:49Z","updated_at":"2016-09-12T21:01:49Z","body":"Thanks for the feedback, I'll write some tests and process your notes soon.\r\n\r\nAs for the 'why callbacks'; you're right it's not for asynchronous behaviour, but it allows for writing more modular code because it decouples whatever needs to happens after a specific action from whatever caused the action.\r\n\r\nFor example in my case I already had a python class that listened for incoming OSC message and another one that performed OMXPlayer actions based on the incoming message like play, pause, stop, etc. Now I wanted to add syncing behaviour to that, which means either some kind of master or slave logic (depending on the role of the current machine).\r\n\r\nI cóuld simply hack that code into the existing class (and thus calling for example \"sendPauseOperationToAllSlaves\" right after my existing call to OMXPlayer.pause in the translator class), but that makes the code messy and goes straight into coding paradigms like _single responsibility principle_ and who knows what other coding wisdom is out there.\r\n"}}
{"actor":{"display_login":"markkorput"}}