Opened 12 years ago

Closed 12 years ago

Last modified 8 years ago

#2027 closed bug (Invalid)

[Execute] plugin fires twice for all downloads

Reported by: lazybones Owned by:
Priority: minor Milestone:
Component: Plugin Version: 1.3.3
Keywords: Cc:

Description

I believe Execute is firing both when the torrent completes and when it movies using the move completed field (wiki states OR). However on each call it is passing the same ID, name and path so there is no way to filter this in the script.

For notifications this is really annoying and for other tasks it really breaks things.

I have a default directory set for both download and move, I have tried unchecking move completed on an active torrent however my script still fires twice.

Change History (8)

comment:1 Changed 12 years ago by Cas

  • Milestone changed from Future to 1.3.x
  • Summary changed from Execute plugin fires twice for all downloads to [Execute] plugin fires twice for all downloads
  • Version changed from other (please specify) to 1.3.3

comment:2 Changed 12 years ago by Cas

  • Status changed from new to pending

Afraid I cannot replicate this and we currently do not fire an event for 'move completed'.

To determine if it's the plugin or an issue in the core you need to enable debug logging and look for this event: TorrentFinishedEvent

Can you also paste the contents of the plugin config: ~/.config/deluge/execute.conf

comment:3 Changed 12 years ago by lazybones

  • Status changed from pending to new

Debug

[DEBUG   ] 08:03:17 core:406 Resuming: ('29aa045ab32cc7a9e92fe8bb0702a47a037935a1',)
[DEBUG   ] 08:03:17 alertmanager:123 torrent_resumed_alert: Another active torrent.avi resumed
[DEBUG   ] 08:03:17 alertmanager:123 tracker_announce_alert: Another active torrent.avi (http://www.trackername.org:2710/announce) sending announce (started)
[DEBUG   ] 08:03:17 torrentmanager:984 on_alert_torrent_resumed
[DEBUG   ] 08:03:17 torrent:379 set_state_based_on_ltstate: Downloading
[DEBUG   ] 08:03:17 torrent:380 session.is_paused: False
[DEBUG   ] 08:03:17 rpcserver:466 intevents: {0: ['NewVersionAvailableEvent', 'PluginEnabledEvent', 'TorrentResumedEvent', 'TorrentAddedEvent', 'TorrentRemovedEvent', 'PluginDisabledEvent', 'SessionResumedEvent', 'SessionPausedEvent', 'TorrentQueueChangedEvent', 'TorrentFolderRenamedEvent', 'TorrentStateChangedEvent', 'TorrentFinishedEvent', 'ConfigValueChangedEvent', 'TorrentFileRenamedEvent', 'ExecuteCommandAddedEvent', 'ExecuteCommandRemovedEvent']}
[DEBUG   ] 08:03:17 rpcserver:470 Emit Event: TorrentStateChangedEvent ['29aa045ab32cc7a9e92fe8bb0702a47a037935a1', 'Downloading']
[DEBUG   ] 08:03:17 rpcserver:466 intevents: {0: ['NewVersionAvailableEvent', 'PluginEnabledEvent', 'TorrentResumedEvent', 'TorrentAddedEvent', 'TorrentRemovedEvent', 'PluginDisabledEvent', 'SessionResumedEvent', 'SessionPausedEvent', 'TorrentQueueChangedEvent', 'TorrentFolderRenamedEvent', 'TorrentStateChangedEvent', 'TorrentFinishedEvent', 'ConfigValueChangedEvent', 'TorrentFileRenamedEvent', 'ExecuteCommandAddedEvent', 'ExecuteCommandRemovedEvent']}
[DEBUG   ] 08:03:17 rpcserver:470 Emit Event: TorrentResumedEvent ['29aa045ab32cc7a9e92fe8bb0702a47a037935a1']
[DEBUG   ] 08:03:17 torrentmanager:946 on_alert_tracker_announce
[DEBUG   ] 08:03:17 alertmanager:123 peer_blocked_alert: blocked peer: 84.235.72.57
[DEBUG   ] 08:03:17 alertmanager:123 tracker_reply_alert: Another active torrent.avi (http://www.trackername.org:2710/announce) received peers: 50
[DEBUG   ] 08:03:17 torrentmanager:929 on_alert_tracker_reply: Another active torrent.avi (http://www.trackername.org:2710/announce) received peers: 50

execute.conf

{
  "file": 1, 
  "format": 1
}{
  "commands": [
    [
      "eb9c28d9452da8e6a48e30cf5d29838e1ce17c46", 
      "complete", 
      "/home/deluge/deluge_complete.sh"
    ]
  ]
}

comment:4 Changed 12 years ago by Cas

Sorry should have clarified that you are looking for:

Emit Event: TorrentFinishedEvent

comment:5 Changed 12 years ago by Cas

Also in you logs should be debug output from the plugin when a command is run:

[execute] Running commands for complete

comment:6 Changed 12 years ago by lazybones

I don't see any Emit Event: TorrentFinishedEvent? in my current log set.. I will do a targeted test download later and gather the results.

comment:7 Changed 12 years ago by lazybones

  • Resolution set to invalid
  • Status changed from new to closed

I can no longer reproduce the bug my self... Possibly after some reboots and adding and removing plugins the problem corrected it self.

comment:8 Changed 8 years ago by Cas

  • Milestone 1.3.x deleted

Milestone deleted

Note: See TracTickets for help on using tickets.