Closed MrCee closed 7 months ago
Ok, I see where this is at... the simple answer here is I had intentionally left the original file such that it could be resumed for seeding or deleted by the downloader. So when the Downloader is used to call the script, the script would use the
[Torrent]
deleteOriginal = 1
option to actually ask Transmission (Download Station) to delete the files/folders.
In your tests above, the fact that the directory is deleted is due to using the same folder for download complete and the
[Torrent]
outputDirectory
if these were different, you would again find that the original files are not deleted...
I'll have a bit of a play, but I guess I have tried to err on the side of not deleting files (people tell me off pretty quickly when my script deletes files they want!)
Hi Clinton,
Using the nightly branch things are working fantastically with directories. Thank you! I have TorrentToMedia.py set to run once every hour to deal with Synology's Download Station issue. Synology have confirmed scripts will be triggered correctly and the correct environment variables you currently use be parsed to scripts in a future release. Having mentioned this, this is not a Download Station issue, more of a hardlink then not deleting the original link problem.
Vikings.S04E01.A.Good.Treason.SDTV.PROPER.mp4 is located in
/volume1/downloads/tv/
Manual Run 1 If a torrent file is downloaded on it's own without being contained within a folder, the file itself is HARDLINKED to a newly created folder (created by the script), everything is processed/moved/hardlinked to the final destination. The folder created by the script is deleted. This leaves the original file not deleted.
SOURCE FOLDER: [/volume1/downloads/tv]
The script creates:TARGET FOLDER: [/volume1/downloads/tv/Vikings]
The original file is now linked to:/volume1/downloads/tv/Vikings/Vikings.S04E01.A.Good.Treason.SDTV.PROPER.mp4
Manual Run 2 If a torrent file is downloaded with a folder, and the file is contained within this folder, then TorrentToMedia.py when manually run will work perfectly and delete the remaining folder after it has been processed/moved/hardlinked to the final destination. I created a folder called 'Anything' and dragged the file into this.
SOURCE FOLDER: [/volume1/downloads/tv/Anything]'
TARGET FOLDER: [/volume1/downloads/tv/Anything]
Tested
The script will clean up afterwards if the file is in a folder: Manual Run 1
Deleting /volume1/downloads/tv/Vikings
Original file is left behind because this folder was created automatically and original file was HARDLINKED to this auto created 'Vikings' folderManual Run 2
Deleting /volume1/downloads/tv/Anything
Original file is deleted because it was already in a folder. COPYLINK process was skippedAre you able to take a look at this? Possibly COPYLINK to the new folder created and REMOVE the original LINK if this is not in a folder when the folder name
Vikings
is auto generated? (HARDLINK then REMOVE original link)Hard linking SOURCE MEDIAFILE -> TARGET FOLDER
rm SOURCE MEDIAFILE
?Cheers Paul