Code Monkey home page Code Monkey logo

deluge-pieces-plugin's People

Contributors

daniel-marynicz avatar jenstimmerman avatar jnqnfe avatar lexman098 avatar neatsoft avatar nicklan avatar sanek9 avatar zg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

deluge-pieces-plugin's Issues

Partial squares on ends of rows

If the row width is not a perfect multiple of 'cell size', you end up with partial squares on the end of rows.

I'm working on a PR to fix this.

Odd selection behaviour on right click

If you right click a square, this selects the square before showing the context menu. That's fine. If though you then (with that square still selected) click to dismiss the context menu, then right click on a different square, then this additional square is also selected. This behaviour is odd/unexpected.

The behaviour that I would expect is that (prior to showing the context menu):

  • If you right click on a square that is already selected, then any existing selection is simply preserved (as now).
  • Else, if the shift or control keys are held, then the square is added to the existing selection.
  • Else, any existing selection is dropped, and the square clicked on is instead selected on its own.

This would be more in line with selection behaviour in things like my file manager for instance.

I'll see about making a fix.

Plugin doesn't work with Deluge 1.3.6

Symptoms:

  • "Pieces" section in settings doesn't show up
  • block colors on "Pieces" tab are reset to default (made my eyes bleed again BTW)
  • "Prioritize first pieces" checkbox on torrent properties' "Pieces" tab is effectively ignored

Translation of plugin

Hello! I don't know Python well, so I don't know if it's serious task or trivial. Could you make plugin translatable? I'd provide a few translations if it would be possible.

Improving "priority_thread.py"

I am working on improving the priority_thread.py code, so that when selecting "Select priority of first un-downloaded piece to High" 2,5% of the first un-downloaded pieces are set to Highest, 2,5% of the next un-downloaded pieces are set to Higher and 2,5% of the next un-downloaded pieces after that is set to High.

That way any torrent will stream very efficiently. Because just setting High priority on 1 single piece doesn't work well, as is the default in the current code.

But I am unable to change the priority of an amount of pieces relative to the total amount of pieces in the torrent. So currently I have a set amount of pieces that is changed.
Which doesn't work so well when the torrent either have very few or very many of pieces.

Here is what I have done so far.
I have changed this:

__target_priority = 5

(...)

# lf is now the first un-downloaded, desired piece of this torrent
if (tor.handle.piece_priority(lf) < __target_priority):
tor.handle.piece_priority(lf,__target_priority)
__last_first[t] = lf

into this:

__target_priority = 7
__target_priority2 = 5
__target_priority3 = 2

(...)

# lf is now the first un-downloaded, desired piece of this torrent
if (tor.handle.piece_priority(lf) < __target_priority):
    for e in range(0, 25):
        tor.handle.piece_priority(lf+e,__target_priority)
    for e2 in range(25, 51):
        tor.handle.piece_priority(lf+e2,__target_priority2)
    for e3 in range(51, 77):
        tor.handle.piece_priority(lf+e3,__target_priority3)
__last_first[t] = lf

What is the variable for the total amount of pieces, so that I can dynamically calculate the ranges of the for loops?

optional gtk dependency?

Hi, I'm using deluged in an environment where gtk is not installed and no python dependency for gtk is present, and when I try to load the plugin in deluged, I get the following error in the logs:

deluge-deluged-1  | 17:34:51 [ERROR   ][deluge.pluginmanagerbase            :154 ] Unable to instantiate plugin 'Pieces' from '/home/deluge/.config/deluge/plugins/Pieces-0.6-py3.6.egg'!
deluge-deluged-1  | 17:34:51 [ERROR   ][deluge.pluginmanagerbase            :1343] Namespace Gtk not available
deluge-deluged-1  | Traceback (most recent call last):
deluge-deluged-1  |   File "/usr/lib/python3/dist-packages/deluge/pluginmanagerbase.py", line 148, in enable_plugin
deluge-deluged-1  |     instance = cls(plugin_name.replace('-', '_'))
deluge-deluged-1  |   File "/home/deluge/.config/deluge/plugins/Pieces-0.6-py3.6.egg/pieces/__init__.py", line 46, in __init__
deluge-deluged-1  |     from .core import Core as _plugin_cls
deluge-deluged-1  |   File "<frozen importlib._bootstrap>", line 971, in _find_and_load
deluge-deluged-1  |   File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
deluge-deluged-1  |   File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
deluge-deluged-1  |   File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
deluge-deluged-1  |   File "/home/deluge/.config/deluge/plugins/Pieces-0.6-py3.6.egg/pieces/core.py", line 49, in <module>
deluge-deluged-1  |     from .colors import Colors
deluge-deluged-1  |   File "<frozen importlib._bootstrap>", line 971, in _find_and_load
deluge-deluged-1  |   File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
deluge-deluged-1  |   File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
deluge-deluged-1  |   File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
deluge-deluged-1  |   File "/home/deluge/.config/deluge/plugins/Pieces-0.6-py3.6.egg/pieces/colors.py", line 40, in <module>
deluge-deluged-1  |     from .color import Color
deluge-deluged-1  |   File "<frozen importlib._bootstrap>", line 971, in _find_and_load
deluge-deluged-1  |   File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
deluge-deluged-1  |   File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
deluge-deluged-1  |   File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
deluge-deluged-1  |   File "/home/deluge/.config/deluge/plugins/Pieces-0.6-py3.6.egg/pieces/color.py", line 42, in <module>
deluge-deluged-1  |     gi.require_version("Gtk", "3.0")
deluge-deluged-1  |   File "/usr/lib/python3/dist-packages/gi/__init__.py", line 130, in require_version
deluge-deluged-1  |     raise ValueError('Namespace %s not available' % namespace)
deluge-deluged-1  | ValueError: Namespace Gtk not available

I think it should be possible to not fail if GTK is missing and not try to load it?

Square selection area misaligned

If you carefully move your cursor over the squares you might notice that the area that triggers selection of each square is misaligned such that the selection area for each square is approximately that of the square and all of the space to the right and bottom, whereas it should actually be the square and half of the surrounding space on all sides obviously.

This is directly related to the issue described in #30, coming from the exact same cause. The code dealing with selection area correctly expects the grid of squares, with each cell containing the square and its border, to start at position 0,0. However as described in #30, the squares in the first row and column do not leave room for the border space on the top and left edges respectively, incorrectly drawing the squares right up against the edges, and hence they are misaligned with the selection areas.

I'm preparing a fix.

Cannot read properties of undefined (reading 'get_config')

After some time of work unable to load WebUI content.

  1. After WebUI starts - it's work correctly w/o any errors and warnings.
  2. After some time (hours) - it's stop show content. UI stil work, but now torrents and no Buttons reaction.
    In Chrome console next log:
Uncaught TypeError: Cannot read properties of undefined (reading 'get_config')
    at constructor.updateConfig (pieces.js:62:25)
    at new constructor (pieces.js:42:9)
    at S.onEnable (pieces.js:170:23)
    at S.enable (deluge-all.js:243:383)
    at Object.initialize (deluge-all.js:284:226)
    at deluge-all.js:289:440
    at ext-all.js:21:2438
    at b (ext-all.js:21:19924)

Deluge 2.0.5
libtorrent: 2.0.5.0
pieces: libtorrent: 0.6

Future Request : Not only 1 piece

Hi, the plugin only makes the first piece to high. But the deluge is downloads 4 parts at the same time. So i would like to ask if the plugin makes next un-downloaded first 4 pieces to high ?

When highlighted, pieces do not respect custom colours

Even though I have selected different colours than default for downloading and completed, when I highlight a piece or multiple pieces in the pieces area, the highlighted ones will show up as the default colours (for example even though i have the completed colour as green, when i highlight a completed piece i can see that it is actually red underneath the highlight).

Drawing area does not shrink

If you select a torrent with a large number of pieces, such that vertical scrolling is enabled, then switch to a different torrent with fewer pieces, the drawing area does not shrink, thus vertical scrolling can remain when it should not, and the priority checkbox can be separated from the piece squares by a significant chunk of empty space you have to scroll through to get to it.

I'm preparing a fix.

Piece are not downloaded line by line

hi, I've installed your plug-in into deluge and enabled it, I'm having problems, for example I've ticked set priority of first un-downloaded piece to high, tested on a fast torrent, about 170mb and, when it starts to download it simply downloads random blocks, does not follow from the top down.

please help
thank you

Plugin breaks WebUI in 1.3.6

This plugin appears to work fine with the gtk interface however it completely breaks the WebUI. This is actually odd too because when you initially load it (if you have the webui open already) the tab shows up however when you refresh the webui interface it breaks completely.

I would like to see this fixed as the plugin has been useful to me.

Allow viewing pieces per file

It would be very useful, when working with a torrent containing multiple files, to be able to see the pieces separately by individual file. For example, if this is possible, you could add another column to the Files tab, showing the pieces for that file with the different colours etc. That would let you see whether a file has a missing piece at the beginning or end or wherever it is.

Half of border of top row & left column squares is hidden

For the squares in the top row and left column, half of the border on the top or left edges respectively, is hidden due to being drawn outside of the drawing area. This is due to the border half overlapping the square, and the squares being drawn right up against the edge of the drawing area, without leaving room for the full border to be drawn.

I'm producing a fix.

Does not work in client/daemon config

This plugin is not coded to work in daemon/client configuration.

TorrentManager(components.get('TorrentManager')) is not available when the gtkui is running in client mode connected to a deamon.

You need to "proxy" the commands to your core.py and get back the information you wish for.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.