#!/usr/bin/env python3 import subprocess import time # 128kbps Opus URL="https://radio.animebits.moe/stream/stream128.ogg" # 256kbps Opus #URL="https://radio.animebits.moe/stream/stream256.ogg" # ~148kbps VBR AAC #URL="https://radio.animebits.moe/stream/stream128.aac" # ~192kbps VBR MP3 #URL="https://radio.animebits.moe/stream/stream192.mp3" # Lossless FLAC #URL="https://radio.animebits.moe/stream/stream.flac" #volume VOL=20 while True: try: print("Playing now...") subprocess.run(["notify-send", "Playing now..."]) subprocess.run(["mpv", "--no-video", f"--volume={VOL}", URL]) except KeyboardInterrupt: subprocess.run(["notify-send", "Stopping now..."]) print("\nStopping now...") break except Exception as e: print(f"Something broke... trying again... Error: {e}") time.sleep(2)