Skip to content

Commit 79dd755

Browse files
committed
Skip header when retrieving the list of torrents
1 parent d689f31 commit 79dd755

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tracker-add-auto.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ while true; do
3535
sleep 3m
3636
rm -f "/tmp/TTAA.$id.lock"
3737
}
38+
3839
# Get list of active torrents
39-
ids="$(transmission-remote "$host" --auth="$auth" --list | grep -vE 'Seeding|Stopped|Finished|[[:space:]]100%[[:space:]]' | grep '^ ' | awk '{ print $1 }')"
40+
ids="$(transmission-remote "$host" --auth="$auth" --list | tail -n +2 | grep -vE 'Seeding|Stopped|Finished|[[:space:]]100%[[:space:]]' | grep '^ ' | awk '{ print $1 }')"
4041
for id in $ids; do
4142
add_date="$(transmission-remote "$host" --auth="$auth" --torrent "$id" --info | grep '^ Date added: ' | cut -c 21-)"
4243
add_date_t="$(date -d "$add_date" "+%Y-%m-%d %H:%M")"

0 commit comments

Comments
 (0)