Transmission can be set to invoke a script when downloads complete. The environment variables supported are:
More information is available on the Transmission wiki.