[add] Add autofrom Option to Email Notify Plugin (#1966)
[add] Add autofrom Option to Email Notify Plugin (#1966)

* Add support to Rename the Torrent after adding

Adds the option container_directory to the Deluge plugin
container_directory is a jinja2 template used by client.core.rename_folder to rename the top level folder - which is effectively the torrent name in deluge 
added 'name' to status_keys array to support this

* updated per liiight's recommendation

* corrected logging

* Added single file check 

added code to check that there is more than 1 file and abort if the torrent is a single file

* switch to check for folder structure 

changed verification from file count greater than 1 to check for a folder structure
changed to folder_rename to use name extracted from folder structure instead of torrent name
removed 'name' from status_keys
 - thanks tubedogg for the suggestions and assistance

* change log level

changed logging to verbose / debug per liiight's suggestion

* added check for 0 files

* fix

removed condition on main_file_only because big_file_name is only generated if content_filename is valid

* change how container_directory is retrieved

changed container_directory to variable retrieved from config or set entry
 - container_directory option did not work if configured by set

* changed if to big_file_name

per tubedogg's recommendation

* Add autofrom Option

Added the ability to set the from automatically based on the FQDN hostname of the system and user running the process

* fixed indentation

removed extra spaces

* change from os.getlogin() to getpass.getuser()

looks like getpass.getuser() is cross platform 
I have tested on Windows and Linux, unfortunately I do not have a Mac to test on
could add error handling - lmk

* styling per suggestion

tobinjt/Flexget,ianstalk/Flexget,jawilson/Flexget,crawln45/Flexget,gazpachoking/Flexget,tobinjt/Flexget,crawln45/Flexget,LynxyssCZ/Flexget,OmgOhnoes/Flexget,ianstalk/Flexget,OmgOhnoes/Flexget,JorisDeRieck/Flexget,gazpachoking/Flexget,jawilson/Flexget,Danfocus/Flexget,Flexget/Flexget,Flexget/Flexget,qk4l/Flexget,Flexget/Flexget,LynxyssCZ/Flexget,malkavi/Flexget,malkavi/Flexget,malkavi/Flexget,tobinjt/Flexget,JorisDeRieck/Flexget,Danfocus/Flexget,OmgOhnoes/Flexget,jawilson/Flexget,Danfocus/Flexget,qk4l/Flexget,malkavi/Flexget,JorisDeRieck/Flexget,qk4l/Flexget,JorisDeRieck/Flexget,jawilson/Flexget,tobinjt/Flexget,LynxyssCZ/Flexget,ianstalk/Flexget,Flexget/Flexget,crawln45/Flexget,LynxyssCZ/Flexget,crawln45/Flexget,Danfocus/Flexget