dharmx / vile

Waste of time. Smelly widgets feat. Spaghetti code. Built with eww-3.0.

Home Page:https://dharmx.is-a.dev/eww-powermenu

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

playerctl.py: Color index out of bound

J4ckTh3R1pper opened this issue · comments

sometimes when the cover contains very simple colors (for example, only white letters in black background), the length of tuple parsed_colors would be shorter than 9, which may cause indexOutOfBoundException when parsing dark color from tuple in such situation. I'd recommend replacing "dark": colors[9]} with "dark": colors[len(colors) - 1] at function get_bright_dark_from_cover(), line 258

commented

Hello!

sometimes when the cover contains very simple colors (for example, only white letters in black background), the length of tuple parsed_colors would be shorter than 9

Have you seen this happen by the way? I reckon it just returns 10 colors of the same shade.
Could you confirm and let me know? I do not use EWW and BSPWM anymore so I can't really nicely test it.
Let me know what happens.

Thanks.

Stale issue message