xingyu (@xingyuyu) 在 用ai写了个emby清除播放记录的python脚本 中发帖
起因:添加到媒体库后,随意点了几个播放,又懒得一个个删除,长此以往就有很多记录,看着很烦,就用ai写了个清除的脚本
脚本如下
import requests
import sys
import io
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding=‘utf-8’)
EMBY_URL = “填入你的emby地址”
API_KEY = “填入你的api key”
def get_headers():
return {“X-Emby-Token”: API_KEY, “Content-Type”: “application/json”}
def get_users():
url = f"{EMBY_URL}/Users"
resp = requests.get(url, headers=get_heade...