Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
b027957
Basic VLC backend to chose
fridrich Aug 6, 2026
3224518
Play/Pause and Stop buttons
fridrich Aug 7, 2026
8408943
A sandwich menu to be able to change video/audio/subtitle streams
fridrich Aug 7, 2026
85eb9f5
Extract the VLC gui logic into vlcgui.py not to clutter hypnotix.py
fridrich Aug 7, 2026
b238231
Choice of backends for video playback
fridrich Aug 7, 2026
a696761
Don't list in the chose Vlc backend if its dependencies are not satis…
fridrich Aug 7, 2026
de30f3c
Remove some duplications and cut rought edges of the vlc gui
fridrich Aug 7, 2026
3705dd8
Toggle the pause_button's icon in playback_bar according to the state
fridrich Aug 7, 2026
8f109ef
Reuse the pause button icon toggling
fridrich Aug 7, 2026
d3bc19e
Add the tooltips and make our vlcgui.py localisable
fridrich Aug 7, 2026
9c52230
Restore the vlc gui when back from full screen mode
fridrich Aug 9, 2026
14f3caf
Determine vlc backend availability only once
fridrich Aug 9, 2026
6f49df7
Fix backend initialization logic and volume control
fridrich Aug 9, 2026
e497548
Make the vlc ui float over the video show/hide it in full-screen too
fridrich Aug 9, 2026
0992213
Don't draw vlc interface if mpv backed is used
fridrich Aug 9, 2026
4a6840d
A trace if no channel is currently selected
fridrich Aug 9, 2026
d3fc0fa
Fix the switch button for yt-dlp
fridrich Aug 8, 2026
fe1f531
Initial implementation of OSD for vlc backend
fridrich Aug 9, 2026
d2da28a
Get the OSD text size according to the stream size
fridrich Aug 9, 2026
5718224
Fix race condition
fridrich Aug 9, 2026
19f7490
Fix the Add to/Remove from favourites icon
fridrich Aug 9, 2026
1d29384
Clear the play page when channel is stopped
fridrich Aug 10, 2026
9277240
Try to match the OSD sizes between mpv and vlc
fridrich Aug 10, 2026
66b3b86
Fix UI playback state when stopping a paused stream in MPV
fridrich Aug 10, 2026
bd4552c
prevent infinite hang during MPV initialization
fridrich Aug 11, 2026
1580e89
Implement hardware polling for reliable fullscreen cursor auto-hide
fridrich Aug 11, 2026
b5ec94f
Make mpv backend optional too
fridrich Aug 12, 2026
05c8a98
Use dynamic resource paths relative to the script location
fridrich Aug 12, 2026
0d39f70
hypnotix.py: cleanup of unused attributes and variables
fridrich Aug 13, 2026
6fcfd34
Support yt-dlp resolution in VLC backend and allow local M3U favorites
fridrich Aug 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion usr/lib/hypnotix/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
import threading

import requests
from gi.repository import GLib, GObject
from gi.repository import GLib, GObject, Gtk
import gettext
_ = gettext.gettext

# M3U parsing regex
PARAMS = re.compile(r'(\S+)="(.*?)"')
Expand Down Expand Up @@ -35,6 +37,12 @@ def wrapper(*args):

return wrapper

def set_playback_button_state(button: Gtk.Button, is_paused: bool):
"""Updates a button's icon and tooltip based on the paused state."""
icon = "media-playback-start-symbolic" if is_paused else "media-playback-pause-symbolic"
tooltip = _("Play") if is_paused else _("Pause")
button.set_image(Gtk.Image.new_from_icon_name(icon, Gtk.IconSize.BUTTON))
button.set_tooltip_text(tooltip)

def slugify(string):
"""
Expand Down
Loading