But I've this really useful script that I make Transmission call when download complete and it will unrar the files i just downloaded using Mac app called 'Stuffit Expander', i tried that script with qBittorrent but it doesn't work i think it just need little editing but because of my lack of knowledge in this field i couldn't do it my self, I googled for scripts for qBittorrent that would do the same job, but no luck
can someone help with this ? here's the script
Code: Select all
#!/bin/sh
exec osascript <<END
on reformat(theName)
set newName to ""
repeat with i from 1 to length of theName
if ((character i of theName) is "/") then
set newName to newName & ":"
else
set newName to newName & character i of theName
end if
end repeat
return newName
end reformat
tell application "Finder"
set found_rar to false
set str to "$TR_TORRENT_DIR" & ":" & "$TR_TORRENT_NAME"
set str to my reformat(str)
set source_folder to "OSX" & str & ":"
set item_list to source_folder
set src_folder to item_list
set the the_items to list folder item_list without invisibles
set item_list to item_list as string
repeat with i from 1 to number of items in the the_items
set the_item to item i of the the_items
set the_item to (item_list & the_item) as alias
set this_info to info for the_item
if name extension of this_info is "rar" then
try
tell application "StuffIt Expander"
expand the_item
quit
end tell
set found_rar to true
end try
end if
end repeat
if found_rar then
repeat with i from 1 to number of items in the the_items
set the_item to item i of the the_items
set the_item to (item_list & the_item) as alias
--Permanently remove it
set posPath to POSIX path of the_item
do shell script "rm -rf \"" & posPath & "\""
--Or send to trash
--delete file the_item
end repeat
end if
end tell
END