All your codebase are belong to us.

This commit is contained in:
coolnsx
2023-05-01 13:50:56 +05:30
parent 9fb07b739f
commit f9dc5f8759
5 changed files with 54 additions and 0 deletions

13
eww/music-presence.py Normal file
View File

@@ -0,0 +1,13 @@
from pypresence import Presence
import re, json
from time import time
RPC = Presence("1086258743823564903")
RPC.connect()
with open("/tmp/yt-music/current",'r') as file:
li = re.split(' >|: | - ',file.readline().strip('\n'))
file.close()
RPC.update(large_image=f"https://i.ytimg.com/vi/{li[-1]}/mqdefault.jpg",details=f"{li[1]}",state=li[2],small_image="/home/tanveer/Downloads/kisspng-mpv-logo-computer-software-5b0b2bfe514221.6053513215274588143328.png",start=time.time())