Closed GoogleCodeExporter closed 8 years ago
This is what I was looking into : adding more arguments than just the torrent
path
It's getting kinda tricky but I think we can make this work.
I'll add the ability to assign up to 5 variables to each one of the scripts
When this is ready, you'll need to use the processed_torrent_script variables
Keep in mind that movies_post, tv_shows_post and music_post will automatically
switch from move to copy when using this routine
Original comment by addicted...@gmail.com
on 10 Jan 2012 at 10:15
Can you try the attached script using the following variables :
processed_torrent_script_enabled="yes"
processed_torrent_script="/path/to/torrent2web.sh"
Then feed up to 5 variables using the following variables. If you set a value
to "file_path" then the processed directory or file path will be sent
processed_torrent_script_variable_1=""
processed_torrent_script_variable_2=""
processed_torrent_script_variable_3=""
processed_torrent_script_variable_4=""
processed_torrent_script_variable_5=""
Let me know how it works for you
Original comment by addicted...@gmail.com
on 10 Jan 2012 at 10:55
Use this script instead
It seems to work, but it is still experimental
Original comment by addicted...@gmail.com
on 10 Jan 2012 at 11:11
Attachments:
I can not made it to work.
Original comment by login...@gmail.com
on 12 Jan 2012 at 5:38
Turns out it didn't work as expected
Now it does
Say you want to pass this command :
ls -la /path/to/processed/directory
You'll need to use these values :
processed_torrent_script_enabled=yes
processed_torrent_script="ls" (or processed_torrent_script="/bin/ls")
processed_torrent_script_variable_1="-la"
processed_torrent_script_variable_2="file_path" (the script will replace
"file_path" with the actual processed directory path)
You can use up to 5 arguments, including the /path/to/processed/directory
Keep in mind that movies_post, tv_shows_post and music_post will automatically
switch from move to copy when this feature is enabled
This script won't be run in the background. So torrentexpander will only exit
when your script is done.
This means that if transmission send a new torrent to torrentexpander in the
meantime and if your script lasts more than one hour, this new instance of
torrentexpander will quit without processing the new torrent.
Original comment by addicted...@gmail.com
on 12 Jan 2012 at 10:38
Sorry, i could not understand Comment 5, because torrent2web.sh script path is
missing.
Original comment by login...@gmail.com
on 18 Jan 2012 at 11:35
Ops, sorry, it was only an example...
This would be correct:
processed_torrent_script_enabled="yes"
processed_torrent_script="/home/Gianni/torrent2web.sh"
processed_torrent_script_variable_1="file_path"
But i need one more var like "name" ($2 would be good)
Original comment by login...@gmail.com
on 18 Jan 2012 at 11:40
If you have some time...
Is it possible to have a "imdb_poster_url" var?
Original comment by login...@gmail.com
on 18 Jan 2012 at 11:53
What do you mean by name ?
Just an equivalent to "$(basename "$file_path")" or something else ?
Please list all variables that may be required so that I can add them all in
one shot (imdb title, imdb poster url, and so on.
Adding custom values is not as easy as it may seem. Unless I export them, the
line looks like this with only one custom value.
"$processed_torrent_script" "$(if [ "$processed_torrent_script_variable_1" ==
"file_path" ]; then echo "$file_path"; else echo
"$processed_torrent_script_variable_1"; fi)" "$(if [
"$processed_torrent_script_variable_2" == "file_path" ]; then echo
"$file_path"; else echo "$processed_torrent_script_variable_2"; fi)" "$(if [
"$processed_torrent_script_variable_3" == "file_path" ]; then echo
"$file_path"; else echo "$processed_torrent_script_variable_3"; fi)" "$(if [
"$processed_torrent_script_variable_4" == "file_path" ]; then echo
"$file_path"; else echo "$processed_torrent_script_variable_4"; fi)" "$(if [
"$processed_torrent_script_variable_5" == "file_path" ]; then echo
"$file_path"; else echo "$processed_torrent_script_variable_5"; fi)"
Thanks
Original comment by addicted...@gmail.com
on 18 Jan 2012 at 2:22
'Name' could be the second argoument that transmission/rtorrent/pyload send to
program, otherwise it could be the directory name or the single-file name.
Other vars that could be usefully:
imdb_id
imdb_title
imdb_poster_url
tmdb_fanart_url
poster_file_path
fanart_file_path
Original comment by login...@gmail.com
on 18 Jan 2012 at 5:40
In SVN revision 164, you'll now have access to new variables for your script.
Just set any of the 5 script variables to one of these values :
file_path
name_with_extension
name_without_extension
imdb_title
imdb_url
imdb_id
poster_url
poster_file_path and fanart_file_path need too much work because I would need
to keep track of all their movements during the script. I don't think that
would be worth it.
Thanks
Original comment by addicted...@gmail.com
on 18 Jan 2012 at 10:23
Original comment by login...@gmail.com
on 21 Jan 2012 at 3:31
Original issue reported on code.google.com by
login...@gmail.com
on 10 Jan 2012 at 9:53