diff --git a/usr/local/bin/torrent-processor b/usr/local/bin/torrent-processor index 0646532..c0e2b54 100755 --- a/usr/local/bin/torrent-processor +++ b/usr/local/bin/torrent-processor @@ -127,8 +127,9 @@ process_single_torrent() { log_debug "Processing single torrent ID: \$id" # Get torrent info - local info - info=\$(get_torrent_info "\${id}") + local info cmd + cmd="transmission-remote \${TRANSMISSION_IP}:\${TRANSMISSION_PORT} -n \${TRANSMISSION_USER}:\${TRANSMISSION_PASSWORD} -t \${id} -i" + info=\$(eval "\$cmd") if [[ -z "\$info" ]]; then log_error "Failed to get info for torrent \$id" @@ -285,7 +286,9 @@ process_category_torrents() { # Process each torrent for id in \$torrent_ids; do # Get torrent info - local info=\$(get_torrent_info "\$id") + local info cmd + cmd="transmission-remote \${TRANSMISSION_IP}:\${TRANSMISSION_PORT} -n \${TRANSMISSION_USER}:\${TRANSMISSION_PASSWORD} -t \${id} -i" + info=\$(eval "\$cmd") if [[ -z "\$info" ]]; then log_warn "Failed to get info for torrent \$id, skipping"