{"action":"created","issue":{"url":"https://api.github.com/repos/Tribler/tribler/issues/2071","repository_url":"https://api.github.com/repos/Tribler/tribler","labels_url":"https://api.github.com/repos/Tribler/tribler/issues/2071/labels{/name}","comments_url":"https://api.github.com/repos/Tribler/tribler/issues/2071/comments","events_url":"https://api.github.com/repos/Tribler/tribler/issues/2071/events","html_url":"https://github.com/Tribler/tribler/pull/2071","id":145697172,"number":2071,"title":"Fixed wrong status when downloading","user":{"login":"lfdversluis","id":3618917,"avatar_url":"https://avatars.githubusercontent.com/u/3618917?v=3","gravatar_id":"","url":"https://api.github.com/users/lfdversluis","html_url":"https://github.com/lfdversluis","followers_url":"https://api.github.com/users/lfdversluis/followers","following_url":"https://api.github.com/users/lfdversluis/following{/other_user}","gists_url":"https://api.github.com/users/lfdversluis/gists{/gist_id}","starred_url":"https://api.github.com/users/lfdversluis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lfdversluis/subscriptions","organizations_url":"https://api.github.com/users/lfdversluis/orgs","repos_url":"https://api.github.com/users/lfdversluis/repos","events_url":"https://api.github.com/users/lfdversluis/events{/privacy}","received_events_url":"https://api.github.com/users/lfdversluis/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Tribler/tribler/labels/WIP","name":"WIP","color":"ab6420"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/Tribler/tribler/milestones/13","html_url":"https://github.com/Tribler/tribler/milestones/V6.6%20WX3","labels_url":"https://api.github.com/repos/Tribler/tribler/milestones/13/labels","id":851033,"number":13,"title":"V6.6 WX3","description":"","creator":{"login":"synctext","id":325224,"avatar_url":"https://avatars.githubusercontent.com/u/325224?v=3","gravatar_id":"","url":"https://api.github.com/users/synctext","html_url":"https://github.com/synctext","followers_url":"https://api.github.com/users/synctext/followers","following_url":"https://api.github.com/users/synctext/following{/other_user}","gists_url":"https://api.github.com/users/synctext/gists{/gist_id}","starred_url":"https://api.github.com/users/synctext/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/synctext/subscriptions","organizations_url":"https://api.github.com/users/synctext/orgs","repos_url":"https://api.github.com/users/synctext/repos","events_url":"https://api.github.com/users/synctext/events{/privacy}","received_events_url":"https://api.github.com/users/synctext/received_events","type":"User","site_admin":false},"open_issues":30,"closed_issues":65,"state":"open","created_at":"2014-11-03T11:16:42Z","updated_at":"2016-04-18T11:49:26Z","due_on":null,"closed_at":null},"comments":17,"created_at":"2016-04-04T14:18:32Z","updated_at":"2016-04-18T12:35:23Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Tribler/tribler/pulls/2071","html_url":"https://github.com/Tribler/tribler/pull/2071","diff_url":"https://github.com/Tribler/tribler/pull/2071.diff","patch_url":"https://github.com/Tribler/tribler/pull/2071.patch"},"body":"The problem is that `self.torrent.magnetstatus` will always be **not** None when adding from a magnet link, even when the .torrent has been downloaded. This will trigger the first if statement and set the status wrong. So now the DL status takes priority over the magnetstatus.\r\n\r\nI also tried removing the `if self.torrent.magnetstatus` check which seems to work, but as I do not understand the logic behind [this undocumented function](https://github.com/Tribler/tribler/blob/devel/Tribler/Main/Utility/GuiDBTuples.py#L215) I decided to go with the current approach. Confirmed by removing + data and readding. Now changes immediately.\r\n\r\n# edit\r\nThinking about it, it makes no sense. It switched to seeding just fine but it should not if that magnetstatus list is not None. I'll delete this magnetstatus object from the if statement as I observed no issue with removing it.\r\n\r\nFixes #1702, Fixes #2089 \r\nFixes **2** bugs\r\nRemoved some duplicate code and unused variables (enhancement)"},"comment":{"url":"https://api.github.com/repos/Tribler/tribler/issues/comments/211359676","html_url":"https://github.com/Tribler/tribler/pull/2071#issuecomment-211359676","issue_url":"https://api.github.com/repos/Tribler/tribler/issues/2071","id":211359676,"user":{"login":"lfdversluis","id":3618917,"avatar_url":"https://avatars.githubusercontent.com/u/3618917?v=3","gravatar_id":"","url":"https://api.github.com/users/lfdversluis","html_url":"https://github.com/lfdversluis","followers_url":"https://api.github.com/users/lfdversluis/followers","following_url":"https://api.github.com/users/lfdversluis/following{/other_user}","gists_url":"https://api.github.com/users/lfdversluis/gists{/gist_id}","starred_url":"https://api.github.com/users/lfdversluis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lfdversluis/subscriptions","organizations_url":"https://api.github.com/users/lfdversluis/orgs","repos_url":"https://api.github.com/users/lfdversluis/repos","events_url":"https://api.github.com/users/lfdversluis/events{/privacy}","received_events_url":"https://api.github.com/users/lfdversluis/received_events","type":"User","site_admin":false},"created_at":"2016-04-18T12:35:23Z","updated_at":"2016-04-18T12:35:23Z","body":"Also `Exception: Test raised 1 unhandled exceptions, last one was: AssertionError('no channels matching de',)`"}}