{"action":"created","issue":{"url":"https://api.github.com/repos/Flexget/Flexget/issues/672","labels_url":"https://api.github.com/repos/Flexget/Flexget/issues/672/labels{/name}","comments_url":"https://api.github.com/repos/Flexget/Flexget/issues/672/comments","events_url":"https://api.github.com/repos/Flexget/Flexget/issues/672/events","html_url":"https://github.com/Flexget/Flexget/issues/672","id":120232233,"number":672,"title":"Magnet file added to Transmission as paused even with \"addpaused = no\"","user":{"login":"monchote","id":1186808,"avatar_url":"https://avatars.githubusercontent.com/u/1186808?v=3","gravatar_id":"","url":"https://api.github.com/users/monchote","html_url":"https://github.com/monchote","followers_url":"https://api.github.com/users/monchote/followers","following_url":"https://api.github.com/users/monchote/following{/other_user}","gists_url":"https://api.github.com/users/monchote/gists{/gist_id}","starred_url":"https://api.github.com/users/monchote/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/monchote/subscriptions","organizations_url":"https://api.github.com/users/monchote/orgs","repos_url":"https://api.github.com/users/monchote/repos","events_url":"https://api.github.com/users/monchote/events{/privacy}","received_events_url":"https://api.github.com/users/monchote/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-12-03T17:57:36Z","updated_at":"2016-01-18T14:54:53Z","closed_at":null,"body":"One of my flexget tasks uses `thetvdb_lookup` and `content_filename` to get the right path and filename for an Anime show. After the torrent magnetizes and the file gets renamed, the torrent stays as paused in Transmission. The other task I have doesn't use `thetvdb_lookup` or `content_filename` and starts downloading as soon as the torrent magnetizes.\r\n\r\nHere is my `config.yml` for the problematic task:\r\n\r\n```\r\ntemplates:\r\n  torrent:\r\n    transmission:\r\n      host: localhost\r\n      port: 9091\r\n      username: ******\r\n      password: ******\r\n      main_file_only: yes\r\n      include_subs: yes\r\n      magnetization_timeout: 90\r\n      addpaused: no\r\n  tv:\r\n    template: torrent\r\n    series:\r\n      settings:\r\n        all:\r\n          quality: 720p+\r\n          specials: no\r\ntasks:\r\n  sutorrents:\r\n    template: tv\r\n    thetvdb_lookup: yes\r\n    rss:\r\n      url: http://latorrent.com/anime/?rss=1\r\n      link: torrent:magnetURI\r\n    set:\r\n      path: /media/samsung/Shows/{{tvdb_series_name}}/Season {{tvdb_season}}/\r\n      content_filename: \"{{ tvdb_series_name }} - {{ tvdb_season }}x{{ tvdb_episode|pad(2) }}\"\r\n    series:\r\n      all:\r\n        - Naruto Shippuuden:\r\n            from_group: DeadFish\r\n```\r\n\r\nAnd here is what `flexget --debug execute` spits out for the task in question:\r\n\r\n```\r\n2015-12-03 13:12 DEBUG    series        sutorrents      adding release <SeriesParser(data=[DeadFish] Naruto Shippuuden - 440 [720p][AAC].mp4,name=Naruto Shippuuden,id=440,season=0,episode=440,quality=720p aac,proper=0,status=OK)> into episode\r\n2015-12-03 13:12 DEBUG    series        sutorrents      -> added <Release(id=None,quality=720p aac,downloaded=None,proper_count=0,title=[DeadFish] Naruto Shippuuden - 440 [720p][AAC].mp4)>\r\n2015-12-03 13:12 DEBUG    series        sutorrents      Naruto Shippuuden episode type totals: {u'sequence': 1}\r\n2015-12-03 13:12 VERBOSE  series        sutorrents      identified by is currently on `auto` for Naruto Shippuuden. Multiple id types may be accepted until it locks in on the appropriate type.\r\n2015-12-03 13:12 DEBUG    series        sutorrents      identified_by set to 'auto' based on series history\r\n2015-12-03 13:12 DEBUG    series        sutorrents      start with episodes: [u'[DeadFish] Naruto Shippuuden - 440 [720p][AAC].mp4']\r\n2015-12-03 13:12 DEBUG    series        sutorrents      current episodes: [u'[DeadFish] Naruto Shippuuden - 440 [720p][AAC].mp4']\r\n2015-12-03 13:12 DEBUG    series        sutorrents      quality req: 720p+\r\n2015-12-03 13:12 DEBUG    series        sutorrents      -------------------- process_propers -->\r\n2015-12-03 13:12 DEBUG    series        sutorrents      propers - downloaded qualities: {}\r\n2015-12-03 13:12 DEBUG    series        sutorrents      continuing w. episodes: [u'[DeadFish] Naruto Shippuuden - 440 [720p][AAC].mp4']\r\n2015-12-03 13:12 DEBUG    series        sutorrents      best episode is: [DeadFish] Naruto Shippuuden - 440 [720p][AAC].mp4\r\n2015-12-03 13:12 DEBUG    series        sutorrents      -------------------- episode tracking -->\r\n2015-12-03 13:12 DEBUG    series        sutorrents      get_latest_release returning None, no downloaded episodes found for: Naruto Shippuuden\r\n2015-12-03 13:12 DEBUG    series        sutorrents      latest download: None\r\n2015-12-03 13:12 DEBUG    series        sutorrents      current: <Episode(id=124,identifier=440,season=0,number=440)>\r\n2015-12-03 13:12 VERBOSE  task          sutorrents      ACCEPTED: `[DeadFish] Naruto Shippuuden - 440 [720p][AAC].mp4` by series plugin because matches quality\r\n2015-12-03 13:12 DEBUG    urlrewriter   sutorrents      Checking 1 entries\r\n2015-12-03 13:12 DEBUG    download      sutorrents      Accepting magnet url for [DeadFish] Naruto Shippuuden - 440 [720p][AAC].mp4\r\n2015-12-03 13:12 VERBOSE  details       sutorrents      Summary - Accepted: 1 (Rejected: 0 Undecided: 24 Failed: 0)\r\n2015-12-03 13:12 DEBUG    transmission  sutorrents      Successfully connected to transmission.\r\n2015-12-03 13:12 DEBUG    api_tvdb      sutorrents      Looking up tvdb information for {u'tvdb_id': None, u'name': u'Naruto Shippuuden'}\r\n2015-12-03 13:12 DEBUG    api_tvdb      sutorrents      Series <name=Naruto Shippuuden,tvdb_id=None> not found in cache, looking up from tvdb.\r\n2015-12-03 13:12 DEBUG    requests      sutorrents      Fetching http://www.thetvdb.com/api/GetSeries.php?seriesname=Naruto%20Shippuuden&language=en\r\n2015-12-03 13:12 DEBUG    requests      sutorrents      Fetching http://www.thetvdb.com/api/4D297D8CFDE0E105/mirrors.xml\r\n2015-12-03 13:12 DEBUG    requests      sutorrents      Fetching http://thetvdb.com/api/4D297D8CFDE0E105/series/79824/en.xml\r\n2015-12-03 13:12 DEBUG    api_tvdb      sutorrents      Looking up tvdb information for {u'tvdb_id': 79824, u'name': u'Naruto Shippuuden'}\r\n2015-12-03 13:12 DEBUG    api_tvdb      sutorrents      Series <name=Naruto Shippuuden,tvdb_id=79824> information restored from cache.\r\n2015-12-03 13:12 DEBUG    api_tvdb      sutorrents      Episode Naruto Shippuden.440 not found in cache, looking up from tvdb.\r\n2015-12-03 13:12 DEBUG    requests      sutorrents      Fetching http://thetvdb.com/api/4D297D8CFDE0E105/series/79824/absolute/440/en.xml\r\n2015-12-03 13:12 INFO     transmission  sutorrents      \"[DeadFish] Naruto Shippuuden - 440 [720p][AAC].mp4\" torrent added to transmission\r\n2015-12-03 13:12 DEBUG    transmission  sutorrents      Waiting 90 seconds for \"[DeadFish] Naruto Shippuuden - 440 [720p][AAC].mp4\" to magnetize\r\n2015-12-03 13:13 DEBUG    transmission  sutorrents      File [DeadFish] Naruto Shippuuden - 440 [720p][AAC].mp4 renamed to Naruto Shippuden - 17x79.mp4\r\n2015-12-03 13:13 DEBUG    transmission  sutorrents      Downloading 1 of 1 files in torrent.\r\n2015-12-03 13:13 DEBUG    series        sutorrents      on_task_learn\r\n2015-12-03 13:13 DEBUG    series        sutorrents      marking 1 releases as downloaded for <Entry(title=[DeadFish] Naruto Shippuuden - 440 [720p][AAC].mp4,state=accepted)>\r\n2015-12-03 13:13 DEBUG    seen          sutorrents      Learned '52BA27A861C974EDD5B96DCBB8E22BBBFA893318' (field: torrent_info_hash)\r\n2015-12-03 13:13 DEBUG    seen          sutorrents      Learned '[DeadFish] Naruto Shippuuden - 440 [720p][AAC].mp4' (field: title)\r\n2015-12-03 13:13 DEBUG    seen          sutorrents      Learned 'magnet:?xt=urn:btih:52BA27A861C974EDD5B96DCBB8E22BBBFA893318&dn=deadfish+naruto+shippuuden+440+720p+aac+mp4&tr=udp%3A%2F%2Ftracker.publicbt.com%2Fannounce&tr=udp%3A%2F%2Fglotorrents.pw%3A6969%2Fannounce' (field: url)\r\n2015-12-03 13:13 DEBUG    util.simple_persistence sutorrents      Flushing simple persistence for task sutorrents to db.\r\n2015-12-03 13:13 DEBUG    task_queue                    task queue shut down\r\n2015-12-03 13:13 INFO     ipc.rpyc                      server has terminated\r\n2015-12-03 13:13 INFO     ipc.rpyc                      listener closed\r\n2015-12-03 13:13 DEBUG    util.simple_persistence                 Flushing simple persistence for task None to db.\r\n2015-12-03 13:13 DEBUG    manager                       Shutting down\r\n```\r\n\r\nIs this a limitation or something I haven't setup properly?\r\n"},"comment":{"url":"https://api.github.com/repos/Flexget/Flexget/issues/comments/172551415","html_url":"https://github.com/Flexget/Flexget/issues/672#issuecomment-172551415","issue_url":"https://api.github.com/repos/Flexget/Flexget/issues/672","id":172551415,"user":{"login":"rarguello-twitter","id":2152294,"avatar_url":"https://avatars.githubusercontent.com/u/2152294?v=3","gravatar_id":"","url":"https://api.github.com/users/rarguello-twitter","html_url":"https://github.com/rarguello-twitter","followers_url":"https://api.github.com/users/rarguello-twitter/followers","following_url":"https://api.github.com/users/rarguello-twitter/following{/other_user}","gists_url":"https://api.github.com/users/rarguello-twitter/gists{/gist_id}","starred_url":"https://api.github.com/users/rarguello-twitter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rarguello-twitter/subscriptions","organizations_url":"https://api.github.com/users/rarguello-twitter/orgs","repos_url":"https://api.github.com/users/rarguello-twitter/repos","events_url":"https://api.github.com/users/rarguello-twitter/events{/privacy}","received_events_url":"https://api.github.com/users/rarguello-twitter/received_events","type":"User","site_admin":false},"created_at":"2016-01-18T14:54:53Z","updated_at":"2016-01-18T14:54:53Z","body":"I've been trying the `exec` plugin writing to a dummy file on `for_accepted` but I suspect that gets executed after the magnet link gets added so it doesn't help.\r\n\r\nI agree my test patch would add delay even when not needed (and so I stated in my previous comment). However I think this race condition should not happen in any hardware configuration and that's why I was asking for some leads from you guys.\r\n\r\n[`rename_torrent_path `](https://pythonhosted.org/transmissionrpc/reference/transmissionrpc.html#transmissionrpc.Client.rename_torrent_path) has a timeout param which defaults to `None`. Am I right in assuming that would always make it wait for renaming operation to finish?"}}