3
Home
hygienic-books edited this page 2022-05-03 23:57:20 +00:00
Table of Contents
Loose ideas
- Run in background permanently
- CLI database creation and version management, migrations
- On a loop iterate over all configured Kodi instances' JSON-RPC endpoints
- Get state either:
- Polling:
- Check if a player is running
- If yes check if player is playing back something
- If yes
- Subtract check interval from avaialble playback time (stored in database)
- Render new imagemagick overlay for sddm avatar indicating remaining time
- WebSockets and a subscription to notifications
- Get auto updates from Kodi
- What happens when user starts third party application such as an emulator?
- Polling:
- If less than n time left trigger Kodi notification
- If time's up check if playback running
- If yes end playback
- Exit Kodi
- Make user unable to login again (locked, displayed in sddm theme?)
- If it's time to allocate time do that
- Render new imagemagick overlay
- Unlock account
- If
sddm-greeter
is active reload the systemd unit or something like that
- If
- Get state either:
- Options
- Per instance
- Kodi address, username, password, address is mandatory
- Time of day when daily budget's allocated
- Daily playback budget, defaults to 20min, optional
- Max savable playback budget, defaults to 120min, optional
- Regex for
showtitle
s that get preferential treatment - Time subtract factor for preferential shows, defaults to 0.5
- Max playback time per day, defaults to 20min which equals 40min of preferential shows
- bools to enable/disable both notifications altogether
- Kodi notification lead time, defaults to 5min
- Kodi notification display time, defaults to 10s Time use factor for preferential shows
- Global
- Database credentials
- Check interval, maybe default 20s
- Check if user's trying to override it and warn about it
- Per instance