{"action":"created","issue":{"url":"https://api.github.com/repos/kodi-pvr/pvr.hts/issues/72","labels_url":"https://api.github.com/repos/kodi-pvr/pvr.hts/issues/72/labels{/name}","comments_url":"https://api.github.com/repos/kodi-pvr/pvr.hts/issues/72/comments","events_url":"https://api.github.com/repos/kodi-pvr/pvr.hts/issues/72/events","html_url":"https://github.com/kodi-pvr/pvr.hts/pull/72","id":96795227,"number":72,"title":"Factor out a lot of stuff to separate files","user":{"login":"Jalle19","id":1106133,"avatar_url":"https://avatars.githubusercontent.com/u/1106133?v=3","gravatar_id":"","url":"https://api.github.com/users/Jalle19","html_url":"https://github.com/Jalle19","followers_url":"https://api.github.com/users/Jalle19/followers","following_url":"https://api.github.com/users/Jalle19/following{/other_user}","gists_url":"https://api.github.com/users/Jalle19/gists{/gist_id}","starred_url":"https://api.github.com/users/Jalle19/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jalle19/subscriptions","organizations_url":"https://api.github.com/users/Jalle19/orgs","repos_url":"https://api.github.com/users/Jalle19/repos","events_url":"https://api.github.com/users/Jalle19/events{/privacy}","received_events_url":"https://api.github.com/users/Jalle19/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kodi-pvr/pvr.hts/labels/Cleanup","name":"Cleanup","color":"fad8c7"},{"url":"https://api.github.com/repos/kodi-pvr/pvr.hts/labels/Improvement","name":"Improvement","color":"0052cc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-07-23T11:48:44Z","updated_at":"2015-07-25T12:58:05Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/kodi-pvr/pvr.hts/pulls/72","html_url":"https://github.com/kodi-pvr/pvr.hts/pull/72","diff_url":"https://github.com/kodi-pvr/pvr.hts/pull/72.diff","patch_url":"https://github.com/kodi-pvr/pvr.hts/pull/72.patch"},"body":"This is a step in completing the refactoring roadmap we laid out a while ago. Here's a summary of the changes:\r\n\r\n* channels, tags, recordings, timers, events and schedules have been factored out into classes living under the `tvheadend::entity` namespace. The naming here is up for debate. Basically an entity is something that can be marked as dirty, so all of these classes extend the base `Entity` class which provides that functionality.\r\n\r\n* the new `Schedule` class has a new concept, `Segment`. A segment is a part of the schedule. The class provides a `GetSegment(time_t, time_t)` method to extract events between a specific time interval.\r\n\r\n* a place for utilities have been added (`tvheadend::utilities`) which for now contains a file with just a single helper function. The helper provides `erase_if` support for maps, so all the code that loops through things and checks for dirtiness has been compacted into a simple `Utilities::erase_if(...)` call.\r\n\r\n* the first two commits are just stuff I found during the way\r\n\r\n@ksooo please review if you can, I've only build tested so far. It might help to use `?w=0` when looking at the diff since due to some loops being removed the indentation has changed."},"comment":{"url":"https://api.github.com/repos/kodi-pvr/pvr.hts/issues/comments/124844884","html_url":"https://github.com/kodi-pvr/pvr.hts/pull/72#issuecomment-124844884","issue_url":"https://api.github.com/repos/kodi-pvr/pvr.hts/issues/72","id":124844884,"user":{"login":"Jalle19","id":1106133,"avatar_url":"https://avatars.githubusercontent.com/u/1106133?v=3","gravatar_id":"","url":"https://api.github.com/users/Jalle19","html_url":"https://github.com/Jalle19","followers_url":"https://api.github.com/users/Jalle19/followers","following_url":"https://api.github.com/users/Jalle19/following{/other_user}","gists_url":"https://api.github.com/users/Jalle19/gists{/gist_id}","starred_url":"https://api.github.com/users/Jalle19/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jalle19/subscriptions","organizations_url":"https://api.github.com/users/Jalle19/orgs","repos_url":"https://api.github.com/users/Jalle19/repos","events_url":"https://api.github.com/users/Jalle19/events{/privacy}","received_events_url":"https://api.github.com/users/Jalle19/received_events","type":"User","site_admin":false},"created_at":"2015-07-25T12:58:05Z","updated_at":"2015-07-25T12:58:05Z","body":"@ksooo rebased and runtime tested extensively"}}