{"action":"created","issue":{"url":"https://api.github.com/repos/Flexget/Flexget/issues/627","labels_url":"https://api.github.com/repos/Flexget/Flexget/issues/627/labels{/name}","comments_url":"https://api.github.com/repos/Flexget/Flexget/issues/627/comments","events_url":"https://api.github.com/repos/Flexget/Flexget/issues/627/events","html_url":"https://github.com/Flexget/Flexget/pull/627","id":114688427,"number":627,"title":"[WIP] Trakt lookup v2","user":{"login":"cvium","id":675118,"avatar_url":"https://avatars.githubusercontent.com/u/675118?v=3","gravatar_id":"","url":"https://api.github.com/users/cvium","html_url":"https://github.com/cvium","followers_url":"https://api.github.com/users/cvium/followers","following_url":"https://api.github.com/users/cvium/following{/other_user}","gists_url":"https://api.github.com/users/cvium/gists{/gist_id}","starred_url":"https://api.github.com/users/cvium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cvium/subscriptions","organizations_url":"https://api.github.com/users/cvium/orgs","repos_url":"https://api.github.com/users/cvium/repos","events_url":"https://api.github.com/users/cvium/events{/privacy}","received_events_url":"https://api.github.com/users/cvium/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-11-02T21:30:46Z","updated_at":"2015-11-09T02:10:25Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Flexget/Flexget/pulls/627","html_url":"https://github.com/Flexget/Flexget/pull/627","diff_url":"https://github.com/Flexget/Flexget/pull/627.diff","patch_url":"https://github.com/Flexget/Flexget/pull/627.patch"},"body":"Currently made it possible to get `access_token` etc. User calls `flexget trakt auth --account <name> --pin <pin>` to authorize Flexget and saves the information it retrieves to the chosen account name.\r\n\r\nStatus:\r\n- [x] Token exchange\r\n- [x] Token-less session (when oauth is optional)\r\n- [x] Cache expiration for shows\r\n- [x] Cache expiration for movies\r\n- [x] Cache expiration for episodes (expires when its show has expired)\r\n- [x] Movie actors\r\n- [x] Show actors\r\n- [x] Movie lookup\r\n- [x] Series and episode lookup\r\n- [ ] More tests\r\n- [x] Update trakt_list\r\n- [x] Update trakt_emit\r\n- [x] Update trakt_submit\r\n- [x] Update trakt_{collected, watched}_lookup\r\n- [x] Clear out old db\r\n- [ ] Final refactoring (making it all look better and remove some stupid code)\r\n\r\nComments\r\n- Actors are dicts of dicts ie. `{<trakt_id>: {'name': <name>, 'imdb_id': <imdb>, 'tmdb_id': <tmdb>}}`.\r\n- CLI tools: \r\n - `flexget trakt auth --account <name> --pin` authorizes flexget on trakt\r\n - `flexget trakt show --account <name>` shows the expiration date for the current access_token for account <name>\r\n - `flexget trakt refresh --account <name` manually refreshes the access_token -- this function is not required by the end user. `get_access_token()` will refresh the access_token once it expires."},"comment":{"url":"https://api.github.com/repos/Flexget/Flexget/issues/comments/154902838","html_url":"https://github.com/Flexget/Flexget/pull/627#issuecomment-154902838","issue_url":"https://api.github.com/repos/Flexget/Flexget/issues/627","id":154902838,"user":{"login":"gazpachoking","id":187133,"avatar_url":"https://avatars.githubusercontent.com/u/187133?v=3","gravatar_id":"","url":"https://api.github.com/users/gazpachoking","html_url":"https://github.com/gazpachoking","followers_url":"https://api.github.com/users/gazpachoking/followers","following_url":"https://api.github.com/users/gazpachoking/following{/other_user}","gists_url":"https://api.github.com/users/gazpachoking/gists{/gist_id}","starred_url":"https://api.github.com/users/gazpachoking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gazpachoking/subscriptions","organizations_url":"https://api.github.com/users/gazpachoking/orgs","repos_url":"https://api.github.com/users/gazpachoking/repos","events_url":"https://api.github.com/users/gazpachoking/events{/privacy}","received_events_url":"https://api.github.com/users/gazpachoking/received_events","type":"User","site_admin":false},"created_at":"2015-11-09T02:10:25Z","updated_at":"2015-11-09T02:10:25Z","body":"Another thing to think about with trakt_lookup: currently trakt_list and trakt_emit append year to all series names, not certain if trakt_lookup should also do that."}}