Script and post-processing features
Posted: May 31st, 2012, 1:18 pm
I have a script which scps a finished download to somewhere else then deletes the download and directory. However, the commands are of the form:
scp $directory/*
rm $directory/*
which works fine when there is just one file being copied/deleted but causes problems if there are multiple files from the same series being written to the directory. Whilst I'm sure that there are work arounds for this the easiest (from my point of view) is if the filename of the downloaded episode is passed to the script. I assume that there could be multiple files but they could be the parameters from 8 onwards.
Alternatively or additionally, in the Sorting section being able to apply different sorting rules to categories e.g. I'd like to sort stuff coming from Sickbeard differently than stuff added manually. Then I could get around the above problem by Sorting each download into a different directory and then there would never be more than one episode to copy or delete.
scp $directory/*
rm $directory/*
which works fine when there is just one file being copied/deleted but causes problems if there are multiple files from the same series being written to the directory. Whilst I'm sure that there are work arounds for this the easiest (from my point of view) is if the filename of the downloaded episode is passed to the script. I assume that there could be multiple files but they could be the parameters from 8 onwards.
Alternatively or additionally, in the Sorting section being able to apply different sorting rules to categories e.g. I'd like to sort stuff coming from Sickbeard differently than stuff added manually. Then I could get around the above problem by Sorting each download into a different directory and then there would never be more than one episode to copy or delete.