ClawShorts
YouTube Shorts limiter for Fire TV. Monitors watch time per device and auto-blocks when daily limit is reached.
Invocation
Primary entry point:
CODEBLOCK0
Commands
| Command | When to use |
|---|
| INLINECODE0 | Check today's usage, remaining quota, daemon health |
| INLINECODE1 |
Reset today's counter (all devices or specific IP) |
|
start | Start the daemon if not running |
|
stop | Stop the daemon |
|
history [days] | Show watch history (default 30 days) |
|
logs [N] | Show last N daemon log lines (default 50) |
|
list | List all configured devices |
|
setup <IP> [NAME] | First-time setup for a new device |
|
add <IP> [NAME] | Add another Fire TV |
|
connect <IP> | Connect ADB to device |
|
enable <IP> /
disable <IP> | Enable/disable a device |
Detection Logic
- - Poll interval: 3 seconds via ADB
- Shorts: ~45% screen width (portrait aspect)
- Regular video: ~100% screen width
- Home/browse: no video active
- Only actual Shorts playback counts toward limit
Data Locations
- - Device config + history:
~/.clawshorts/clawshorts.db (SQLite) - Daemon log: INLINECODE13
- LaunchAgent: INLINECODE14
Requirements
- -
adb (Android platform tools) - Python 3
- Fire TV with ADB debugging enabled
- INLINECODE16 symlink at INLINECODE17
ClawShorts
适用于Fire TV的YouTube Shorts限制器。监控每台设备的观看时长,达到每日限额时自动屏蔽。
调用方式
主要入口点:
bash
~/.openclaw/workspace/skills/clawshorts/scripts/clawshorts.sh <命令>
命令
| 命令 | 使用场景 |
|---|
| status | 查看今日使用量、剩余配额、守护进程状态 |
| reset [IP] |
重置今日计数器(所有设备或指定IP) |
| start | 启动守护进程(若未运行) |
| stop | 停止守护进程 |
| history [天数] | 查看观看历史(默认30天) |
| logs [N] | 显示最近N行守护进程日志(默认50行) |
| list | 列出所有已配置设备 |
| setup
[名称] | 新设备首次设置 |
| add [名称] | 添加另一台Fire TV |
| connect | 通过ADB连接设备 |
| enable / disable | 启用/禁用设备 |
检测逻辑
- - 轮询间隔:通过ADB每3秒检测一次
- Shorts:约占屏幕宽度45%(竖屏比例)
- 普通视频:约占屏幕宽度100%
- 主页/浏览:无视频播放
- 仅实际Shorts播放计入限额
数据存储位置
- - 设备配置+历史记录:~/.clawshorts/clawshorts.db(SQLite)
- 守护进程日志:~/.clawshorts/daemon.log
- LaunchAgent:~/Library/LaunchAgents/com.fink.clawshorts.plist
系统要求
- - adb(Android平台工具)
- Python 3
- 已启用ADB调试的Fire TV
- shorts符号链接位于/opt/homebrew/bin/shorts