Skip to content

Instantly share code, notes, and snippets.

@brccabral
Last active May 15, 2024 20:09
Show Gist options
  • Save brccabral/5f8d334b329aa2e677103363b1af3241 to your computer and use it in GitHub Desktop.
Save brccabral/5f8d334b329aa2e677103363b1af3241 to your computer and use it in GitHub Desktop.
Hypnotix

Hypnotix

Hypnotix is an IPTV streaming application with support for live TV, movies and series.

https://github.com/linuxmint/hypnotix

Hypnotix install

Probably need to install some dependency like

apt install libmpv-dev python3-setproctitle python3-imdbpy python3-unidecode python3-gi-cairo python3-xapp

Instructions for commit d9060f0 ("Add the ability to set channels as favorite", 2023-10-12)

Download the source code or clone the repo

sudo apt-get install git debhelper gir1.2-xapp-1.0
cd ~/Downloads
git clone https://github.com/linuxmint/hypnotix --depth 1
cd hypnotix

Then, run make.

Install locally at $HOME/.local following these next instructions:

Copy folders from hypnotix/usr/* into $HOME/.local/bin/hypnotix.d

mkdir -p $HOME/.local/bin/hypnotix.d
cp -r ./usr/* $HOME/.local/bin/hypnotix.d

Compile the GTK schema

cd $HOME/.local/bin/hypnotix.d/share/glib-2.0/schemas
glib-compile-schemas .

Edit $HOME/.local/bin/hypnotix.d/bin/hypnotix by adding XDG_DATA_DIRS that points to your local installation and to point to the local start python script.

#!/bin/sh
SCRIPT_DIR=$(dirname "$(readlink -f "$0")")
XDG_DATA_DIRS=$SCRIPT_DIR/../share/:$XDG_DATA_DIRS
...
...some config options...
...
$SCRIPT_DIR/../lib/hypnotix/hypnotix.py &

Edit $HOME/.local/bin/hypnotix.d/lib/hypnotix/hypnotix.py by adding the constant HIPNOTIX_DIR before APP

HIPNOTIX_DIR = os.path.abspath(os.path.dirname(__file__)) + "/../.."

and replace all occurencies of "/usr to HIPNOTIX_DIR + ", except:

  • in function add_flag().
path = f"{HIPNOTIX_DIR}/share/circle-flags-svg/{code.lower()}.svg"
  • in function open_about().
h = open("/usr/share/common-licenses/GPL", encoding="utf-8")

Install circle-flags-svg from Linux Mint https://www.ubuntuupdates.org/package/mint_main/una/main/base/circle-flags-svg, it can be in your local directory $HOME/.local/bin/hypnotix.d/share/circle-flags-svg

Set dark_mode_manager to None self.dark_mode_manager = None

Create a symlink

ln -s ~/.local/bin/hypnotix.d/bin/hypnotix ~/.local/bin/hypnotix

Hypnotix config

Open dconf https://wiki.gnome.org/Projects/dconf. Search for org.x.hypnotix.providers. Change the default value to point to a local .m3u8 file in your system. ['Free-TV:::url:::$HOME/.config/hypnotix/playlist.m3u8:::::::::']

.deb install (failing, ignore this)

This option fails due to Ubuntu dependency on gir2.0.
One option is to download the packages.tar.gz, extract the .deb file and install.

Build as dpkg

To build the dkpg package the project needs to be in a filesystem "Linux friendly", ie ext4, it can't be in ntfs (Windows partition).
Also, file debian\install is marked as executable, but I had to remove the x flag.

git clone https://github.com/linuxmint/hypnotix
cd hypnotix
chmod -x debian\install
dpkg-buildpackage -uc -us

If you want to install into the system, the .deb package will be created in one folder up.

sudo apt-get install ../hypnotix_X.Y_all.deb

It has dependency on circle-flags-svg (see above).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment