values of "status" field changed

Ask for help and report issues with the GTK+ version of Transmission
Post Reply
liquidraver
Posts: 5
Joined: Tue Sep 20, 2011 2:19 pm

values of "status" field changed

Post by liquidraver »

Dear Community!

I need a little help as I'm not a very experienced programmer.

I tried to upgrade to 2.41 from 2.33, but the web interface I use constantly marks seeding torrents as "Done" and shows them stopped.

I saw that values of "status" field changed in the latest release, but I couldn't find what are these new values.

The only thing I could come up is these Seeding torrents' statuses changed to 6 from 8.

I tried to insert the code to the PHP like this, but nothing happens.

Anyone could give me some help, what have I missed?

Code: Select all

   /*
         * Convert RPC Status to TorrentFlux running
         */
        public function status_to_tf($status) {
                // 1 - waiting to verify
                // 2 - verifying
                // 4 - downloading
                // 5 - queued (incomplete)
               // 6 - something new status!!
                // 8 - seeding
                // 9 - queued (complete)
                // 16 - paused
                switch ((int) $status) {
                        case 1:
                        case 2:
                        case 4:
                        case 5:
                                $tfstatus=1;
                                break;
                        case 6:
                        case 8:
                        case 9:
                                $tfstatus=1;
                                break;
                        case 0:
                        case 16:
                        default:
                                $tfstatus=0;
                };
                //0: Stopped
                //1: Running
                //2: New
                //3: Queued (Qmgr)
                return $tfstatus;
        }
ssjoholm
Posts: 1
Joined: Wed Mar 24, 2010 4:39 pm

Re: values of "status" field changed

Post by ssjoholm »

Hi,

I was looking for the same thing when I started to use this "status" state, I however did do some search in the source code and found following;

Code: Select all

1813	/**
1814	 * What the torrent is doing right now.
1815	 *
1816	 * Note: these values will become a straight enum at some point in the future.
1817	 * Do not rely on their current `bitfield' implementation
1818	 */
1819	typedef enum
1820	{
1821	    TR_STATUS_STOPPED        = 0, /* Torrent is stopped */
1822	    TR_STATUS_CHECK_WAIT     = 1, /* Queued to check files */
1823	    TR_STATUS_CHECK          = 2, /* Checking files */
1824	    TR_STATUS_DOWNLOAD_WAIT  = 3, /* Queued to download */
1825	    TR_STATUS_DOWNLOAD       = 4, /* Downloading */
1826	    TR_STATUS_SEED_WAIT      = 5, /* Queued to seed */
1827	    TR_STATUS_SEED           = 6  /* Seeding */
1828	}
1829	tr_torrent_activity;
Here is a link to the source;

https://trac.transmissionbt.com/browser ... smission.h

Regards,
Sebastian
Post Reply