It works fine.
However, I notice pourcentage calculation is not accurate enougth when episodes size is very different, because it is base on the average pecentage of downloading episodes. It should rather be based on ratio total volume done/ total volume remaining (it would also fix the problem with cancelled episode).

Have a try: allow only one episode in the queue, and start dowloading a small episode then a big one. The percentage will go very quick from 0 to 50% then very slow from 50 to 100%. The effect on progress bar is not very nice, and the estimated remaining time completly incorrect

I you agree, I can try to fix it.

Thomas Perl a écrit :
Hello, Jérôme!

On Fri, 2008-02-22 at 19:43 +0100, Jérôme Chabod wrote:
  
Indeed, much nicer like this. I vote for your version !

A few remarks:
* the bug is not really misterious: to fix it, replace trayicon.py
line 314 with "self.__current_pixbuf = self.__icon" ("__" are missing)
    

Thanks, I've fixed that :)

  
* although performance does not seems to be a problem,  the code could
be more efficient if you copy the icon only the first time (when ratio
is 0.0), it will preserve the cached download icon, whereas all other
icon with a piece of progress bar will be garbage collected anyway, so
no need to preserve them.
    

Well, because of the alpha channel, I have to copy the icon every time I
draw a progressbar on it (or else I would modify the current pixmap and
after some time, the progress bar would have a solid background).

  
* the tray icon is drawned on every ratio change, it happens very
offen (around 100*10 time during my big episodes download) and given
that the icon is 48 pixels big, only 48 are idealy needed. At least,
you could  improve this  by drawing only on integer percentage change,
it would then  only happen 100*.
    

I have updated the code so it only updates the progress bar when the
progress meter changes for more than 3 percent-points, so we save a lot
of updates and it doesn't get noticed in the tray icon (even at maximum
size). 100/3 ~ 30 pixels - given that we subtract some pixels for the
padding and the border, that will be about one pixel in full size.

I've also fixed a related problem where cancelling a download in a
two-download scenario would result in the cancelled download being
counted as finished in the complete progress.

Please test this patch and tell me what you think. If everything's okay,
I will commit it into SVN trunk.

Thanks,
Thomas
  

_______________________________________________ gpodder-devel mailing list [email protected] https://lists.berlios.de/mailman/listinfo/gpodder-devel

_______________________________________________
gpodder-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/gpodder-devel

Reply via email to