{"action":"created","issue":{"url":"https://api.github.com/repos/pculture/unisubs/issues/2387","labels_url":"https://api.github.com/repos/pculture/unisubs/issues/2387/labels{/name}","comments_url":"https://api.github.com/repos/pculture/unisubs/issues/2387/comments","events_url":"https://api.github.com/repos/pculture/unisubs/issues/2387/events","html_url":"https://github.com/pculture/unisubs/issues/2387","id":112418379,"number":2387,"title":"Handle different video durations from the video API and external APIs","user":{"login":"bendk","id":1012809,"avatar_url":"https://avatars.githubusercontent.com/u/1012809?v=3","gravatar_id":"","url":"https://api.github.com/users/bendk","html_url":"https://github.com/bendk","followers_url":"https://api.github.com/users/bendk/followers","following_url":"https://api.github.com/users/bendk/following{/other_user}","gists_url":"https://api.github.com/users/bendk/gists{/gist_id}","starred_url":"https://api.github.com/users/bendk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bendk/subscriptions","organizations_url":"https://api.github.com/users/bendk/orgs","repos_url":"https://api.github.com/users/bendk/repos","events_url":"https://api.github.com/users/bendk/events{/privacy}","received_events_url":"https://api.github.com/users/bendk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/pculture/unisubs/milestones/14","html_url":"https://github.com/pculture/unisubs/milestones/Durations","labels_url":"https://api.github.com/repos/pculture/unisubs/milestones/14/labels","id":1364366,"number":14,"title":"Durations","description":"","creator":{"login":"bendk","id":1012809,"avatar_url":"https://avatars.githubusercontent.com/u/1012809?v=3","gravatar_id":"","url":"https://api.github.com/users/bendk","html_url":"https://github.com/bendk","followers_url":"https://api.github.com/users/bendk/followers","following_url":"https://api.github.com/users/bendk/following{/other_user}","gists_url":"https://api.github.com/users/bendk/gists{/gist_id}","starred_url":"https://api.github.com/users/bendk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bendk/subscriptions","organizations_url":"https://api.github.com/users/bendk/orgs","repos_url":"https://api.github.com/users/bendk/repos","events_url":"https://api.github.com/users/bendk/events{/privacy}","received_events_url":"https://api.github.com/users/bendk/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":0,"state":"open","created_at":"2015-10-19T16:41:43Z","updated_at":"2015-10-20T17:22:35Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2015-10-20T17:22:35Z","updated_at":"2015-10-30T17:06:37Z","closed_at":null,"body":"We should decide what to do in the following corner case:  Someone creates a video via the API and specifies a duration then when we query the duration from the video site (or mp4 header) we get a different value.\r\n\r\nI think the best policy would be to ignore the value from the API client in this case.\r\n  - We should make this clear in the API documentation\r\n  - I believe this already happens, but we should include the new duration in the return data for the request."},"comment":{"url":"https://api.github.com/repos/pculture/unisubs/issues/comments/152588357","html_url":"https://github.com/pculture/unisubs/issues/2387#issuecomment-152588357","issue_url":"https://api.github.com/repos/pculture/unisubs/issues/2387","id":152588357,"user":{"login":"syl22-00","id":875066,"avatar_url":"https://avatars.githubusercontent.com/u/875066?v=3","gravatar_id":"","url":"https://api.github.com/users/syl22-00","html_url":"https://github.com/syl22-00","followers_url":"https://api.github.com/users/syl22-00/followers","following_url":"https://api.github.com/users/syl22-00/following{/other_user}","gists_url":"https://api.github.com/users/syl22-00/gists{/gist_id}","starred_url":"https://api.github.com/users/syl22-00/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/syl22-00/subscriptions","organizations_url":"https://api.github.com/users/syl22-00/orgs","repos_url":"https://api.github.com/users/syl22-00/repos","events_url":"https://api.github.com/users/syl22-00/events{/privacy}","received_events_url":"https://api.github.com/users/syl22-00/received_events","type":"User","site_admin":false},"created_at":"2015-10-30T17:06:37Z","updated_at":"2015-10-30T17:06:37Z","body":"This was done in branch gh-1113 so that it can be tested. \r\n\r\n* Video duration specified in API while creating videos is only used if video duration is not determined by provider or file header.\r\n* Video duration specified in API while updating videos is only used if video duration is not already specified. In particular, if duration was previously set through the API, it can not be changed.\r\n* Made sure the actually used duration is returned by the API call\r\n* Documented the policy."}}