(not a bug) Torrent queue and priorities (includes patch)

Bug #192770 reported by apopescu
2
Affects Status Importance Assigned to Milestone
qBittorrent
Fix Released
High
Christophe Dumez

Bug Description

This is a feature patch made by me.

It adds Torrent Queues and Torrent Priorities, modeled after uTorrent.
I tried to cover all the scenarios, but this patch hasn't been extensively tested. Tested against latest trunk

A few thing to note:
 -- I had to disable loadHiddenColumns() as it crashes now and I don't know how to fix it :)
 -- I also had to disable some Q_ASSERTs during development and didn't re-enable them (they may still crash the program)
 -- seeding torrents are not part of the queue
 -- I didn't change anything in the sorting, so the list will rarely be sorted properly (I can probably fix this if needed.. not today)
 -- queued torrents and the new Priority Up/Down buttons are icon-less
 -- I hope this wasn't already implemented in some branch and I wasted my afternoon for it

files changed:
     src/DLListDelegate.h
     src/FinishedTorrents.cpp
     src/GUI.cpp
     src/GUI.h
     src/MainWindow.ui
     src/TorrentQueues.cpp (new)
     src/TorrentQueues.h (new)
     src/bittorrent.cpp
     src/bittorrent.h
     src/downloadingTorrents.cpp
     src/downloadingTorrents.h
     src/options.ui
     src/options_imp.cpp
     src/options_imp.h
     src/torrentAddition.h

Revision history for this message
apopescu (xipeos) wrote :
Revision history for this message
apopescu (xipeos) wrote :

oh.. I just noticed I forgot to implement code to save the que (as it is, it only saves priorities)

Revision history for this message
Christophe Dumez (hydr0g3n) wrote : Re: [Bug 192770] Re: (not a bug) Torrent queue and priorities (includes patch)

No, This was not already implemented :)

Thanks. I'll have a look at it after a good night sleep :)

On Mon, Feb 18, 2008 at 12:04 AM, apopescu <email address hidden> wrote:

> oh.. I just noticed I forgot to implement code to save the que (as it
> is, it only saves priorities)
>
> --
> (not a bug) Torrent queue and priorities (includes patch)
> https://bugs.launchpad.net/bugs/192770
> You received this bug notification because you are the bug contact for
> qBittorrent.
>

Revision history for this message
apopescu (xipeos) wrote :
Revision history for this message
apopescu (xipeos) wrote :

Update 01
  - fixes a bug that would cause qBittorrent to crash if seeding priorities are in a certain order
  - fixed seed priority loading from file

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

This looks very good, thanks. I'll apply it soon.

It looks like I'm having trouble with sourceforge svn though... I hope this will be back soon.

Sorry for the delay but I've been kept very busy at work and some other projects. Anyway, It's nice to see someone patch qbittorrent's code :)

Revision history for this message
apopescu (xipeos) wrote :

Don't apply it yet, I still have some bugs to fix.
Right know I have this short list:
  - fix maxActiveTotal & maxAtiveDownloads spinboxes
   - maxActiveTotal can't be smaller than maxActiveDownloads & vice-versa
  - add code to detect whether a priority is already in use (while loading torrents)
  - fix spacing issue in individual tool tip if name.length<9
  - remove useless getNameFromHash() (replace with h.name() )

I will submit an update tomorrow that addresses these bugs

https://blueprints.launchpad.net/qbittorrent/+spec/real-torrent-queues-patch

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

I'm currently working on it in trunk (future v1.2.0). I'm using the provided patch as a basis

Changed in qbittorrent:
assignee: nobody → hydr0g3n
importance: Undecided → High
milestone: none → 1.2.0
status: New → In Progress
Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

This is implemented in svn/trunk. It works the same way as µtorrent.
This implied a lot of code change and it will require beta testing before release (good thing it was introduced in early stages of v1.2.0 development).

Changed in qbittorrent:
status: In Progress → Fix Committed
Revision history for this message
Bardok (bardok) wrote :

Torrent queue and priority are also in seeding torrent but it's not possible to change the priority. It's not display
It's possible to change this for add this feature?

Sorry for my poor english.

La mise en attente et la priorité est aussi présente lorsque l'on upload mais il est impossible de modifier la priorité. Ce n'est pas affiché.
Est-il possible d'ajouter cette fonctionnalité?

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

If you use latest svn, there should be no problem.

There are priority button in the top toolbar and also actions on right-click on a torrent.

Revision history for this message
Bardok (bardok) wrote :

I use 1.2.0 beta 3.

In svn, priority column in upload is display?

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

Well, it is displayed on my box for both beta3 and svn. However, by looking at the code, I found some problems that I'm currently fixing.

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

Please try beta4 and tell me if you are still experiencing problems. I have fixed several bugs.

Revision history for this message
Bardok (bardok) wrote :

Ok that's work, i have the column and i see priority of each torrent now.

A little bug in torrent sort when the sort is on priority, number greater than "10" are sort just behind "1" and before "2". See attachment.

Thanks.

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

Ok. I have just committed a fix for priority column sorting in svn. Thanks a lot for the report ;)

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

Please try qBittorrent v1.2.0rc2 and report any problem you may experience.

Changed in qbittorrent:
milestone: 1.2.0 → 1.2.0rc2
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.