Opened 10 years ago

Closed 10 years ago

#4500 closed Bug (invalid)

Download-complete script: $TR_TORRENT_NAME and $TR_TIME_LOCALTIME variables have no values

Reported by: tals Owned by:
Priority: Normal Milestone:
Component: Transmission Version: 2.33
Severity: Normal Keywords:
Cc:

Description

When delete a complete torrent and add a new one $TR_TORRENT_NAME and $TR_TIME_LOCALTIME variables have not values

Precondition:
a). The following simple Download-complete script is specified in the configuration:
#/bin/bash
echo "Downloaded \"$TR_TORRENT_NAME\" on $TR_TIME_LOCALTIME" >> /tmp/out.txt
b). Three or more complete torrents in the list

Steps to reproduce:
1) Delete a torrent in the middle of the list (i.g.: 2)
transmission-remote –t 2 –r
2) Add a new torrent:
transmission-remote –a new_file.torrent
3) After the new torrent is complete, check the output file:
cat /tmp/out.txt

Actual Result: Downloaded {null} on {null}
Expected Result: Downloaded “new_file” on Thu Sep 22 16:25:36 EEST 2011

Change History (5)

comment:1 Changed 10 years ago by jordan

  • Milestone 2.41 deleted

comment:2 Changed 10 years ago by jordan

Hi tals,

Thanks for reporting this.

In testing, I'm not able to reproduce this behavior in 2.40 beta 1:

Precondition 1: Script

$ grep script /tmp/transmission-test/settings.json 
    "script-torrent-done-enabled": true, 
    "script-torrent-done-filename": "/tmp/foo.sh", 
$ cat /tmp/foo.sh
#/bin/bash
echo "Downloaded \"$TR_TORRENT_NAME\" on $TR_TIME_LOCALTIME" >> /tmp/out.txt

Precondition 2: Three complete torrents in the list

$ ./transmission-remote -l
ID     Done       Have  ETA           Up    Down  Ratio  Status       Name
   1   100%  685.3 MiB  Done         0.0     0.0   0.00  Seeding      ubuntu-11.04-desktop-i386.iso
   3   100%  695.3 MiB  Done         0.0     0.0   0.02  Seeding      ubuntu-11.10-beta1-desktop-i386.iso
   4   100%  698.2 MiB  Done        44.0     0.0   0.00  Seeding      ubuntu-11.04-desktop-amd64.iso
Sum:          2.03 GiB              44.0     0.0

Delete a torrent from the list:

$ ./transmission-remote -t3 -r
localhost:9091/transmission/rpc/ responded: "success"
$ ./transmission-remote -t3 -l
ID     Done       Have  ETA           Up    Down  Ratio  Status       Name
   1   100%  685.3 MiB  Done         0.0     0.0   0.00  Seeding      ubuntu-11.04-desktop-i386.iso
   4   100%  698.2 MiB  Done        38.0     0.0   0.01  Seeding      ubuntu-11.04-desktop-amd64.iso
Sum:          1.35 GiB              38.0     0.0

Add a new torrent (ubuntu-11.04-server-amd64.iso):

$ ./transmission-remote -a ~/ubuntu-11.04-server-amd64.iso.torrent 
localhost:9091/transmission/rpc/ responded: "success"
$ ./transmission-remote -l
ID     Done       Have  ETA           Up    Down  Ratio  Status       Name
   1   100%  685.3 MiB  Done         0.0     0.0   0.00  Seeding      ubuntu-11.04-desktop-i386.iso
   4   100%  698.2 MiB  Done        56.0     0.0   0.03  Seeding      ubuntu-11.04-desktop-amd64.iso
   5     0%       None  Unknown      0.0     0.0   None  Idle         ubuntu-11.04-server-amd64.iso
Sum:          1.35 GiB              56.0     0.0

And then checking out the output file after the new torrent is complete:

$ cat /tmp/out.txt 
Downloaded "ubuntu-11.04-desktop-i386.iso" on Thu Sep 22 09:20:21 2011
Downloaded "ubuntu-11.10-beta1-desktop-i386.iso" on Thu Sep 22 09:21:29 2011
Downloaded "ubuntu-11.04-desktop-amd64.iso" on Thu Sep 22 09:21:37 2011
Downloaded "ubuntu-11.04-server-amd64.iso" on Thu Sep 22 09:36:28 2011

comment:3 Changed 10 years ago by tals

Hi Jordan,
oops! the issue might be platform-specific: it is reproducible on a system compiled from scratches.

linux 2.4.28 i486 (uClibc-0.9.27, gcc 3.3.6, transmission-2.33 [./configure --prefix=/usr --disable-nls --disable-mac --disable-gtk --enable-lightweight])

Let me test it a few more days also with transmission 2.40 beta 1 and on another platforms.

Thanks,
Sergey

comment:4 Changed 10 years ago by tals

Hi Jordan,

the issue is not reproducible on transmission 2.40 beta 2 and can be closed.

Tested on:
==============
Linux 2.4.28 LFS
OpenSuSE 11.4
==============

Thanks,
Sergey

comment:5 Changed 10 years ago by livings124

  • Resolution set to invalid
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.