Skip to content

Commit

Permalink
Merge branch 'linuxmint:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
mtravascio committed Nov 24, 2022
2 parents cf568e1 + 3744bfb commit dbfa5b7
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 10 deletions.
19 changes: 19 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
hypnotix (3.0) vera; urgency=medium

[ Michael Webster ]
* Add github workflow.

[ woxcab ]
* Fix error when the Content-Length header is missing (#241)

[ Dmitriy Yefremov ]
* Fixed disabling osc via MPV options (#240) (#242)

[ fire-hawk-86 ]
* Update common.py (#244)

[ atzlinux ]
* d/control: Depends: add python3-requests

-- Clement Lefebvre <[email protected]> Mon, 21 Nov 2022 11:47:43 +0000

hypnotix (2.9) vanessa; urgency=medium

* l10n: Update translations
Expand Down
1 change: 1 addition & 0 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Architecture: all
Depends: gir1.2-xapp-1.0 (>= 2.2.11),
python3,
python3-gi,
python3-requests,
python3-setproctitle,
python3-unidecode,
xapps-common,
Expand Down
19 changes: 11 additions & 8 deletions usr/lib/hypnotix/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,17 @@ def __init__(self, provider, info):
if self.name == None and "," in info:
self.name = info.split(",")[-1].strip()
if self.logo != None:
ext = None
for known_ext in [".png", ".jpg", ".gif", ".jpeg"]:
if self.logo.lower().endswith(known_ext):
ext = known_ext
break
if ext == ".jpeg":
ext = ".jpg"
self.logo_path = os.path.join(PROVIDERS_PATH, "%s-%s%s" % (slugify(provider.name), slugify(self.name), ext))
if self.logo.startswith("file:https://"):
self.logo_path = self.logo[7:]
else:
ext = None
for known_ext in [".png", ".jpg", ".gif", ".jpeg"]:
if self.logo.lower().endswith(known_ext):
ext = known_ext
break
if ext == ".jpeg":
ext = ".jpg"
self.logo_path = os.path.join(PROVIDERS_PATH, "%s-%s%s" % (slugify(provider.name), slugify(self.name), ext))

class Manager():

Expand Down
14 changes: 12 additions & 2 deletions usr/lib/hypnotix/hypnotix.py
Original file line number Diff line number Diff line change
Expand Up @@ -1441,8 +1441,18 @@ def reinit_mpv(self):
while not self.mpv_drawing_area.get_window() and not Gtk.events_pending():
time.sleep(0.1)

self.mpv = mpv.MPV(**options, script_opts='osc-layout=box,osc-seekbarstyle=bar,osc-deadzonesize=0,osc-minmousemove=3', input_default_bindings=True, \
input_vo_keyboard=True,osc=True, ytdl=True, wid=str(self.mpv_drawing_area.get_window().get_xid()))
osc = True
if "osc" in options:
# To prevent 'multiple values for keyword argument'!
osc = options.pop("osc") != "no"

self.mpv = mpv.MPV(**options,
script_opts="osc-layout=box,osc-seekbarstyle=bar,osc-deadzonesize=0,osc-minmousemove=3",
input_default_bindings=True,
input_vo_keyboard=True,
osc=osc,
ytdl=True,
wid=str(self.mpv_drawing_area.get_window().get_xid()))

def on_mpv_drawing_area_draw(self, widget, cr):
cr.set_source_rgb(0.0, 0.0, 0.0)
Expand Down

0 comments on commit dbfa5b7

Please sign in to comment.