https://github.com/pkarpovich/content-collector
Local Apple TV content aggregator: Easily collect, store, and manage media playback data from your Apple TV in a centralized database
https://github.com/pkarpovich/content-collector
appletv content-collector
Last synced: about 2 months ago
JSON representation
Local Apple TV content aggregator: Easily collect, store, and manage media playback data from your Apple TV in a centralized database
- Host: GitHub
- URL: https://github.com/pkarpovich/content-collector
- Owner: pkarpovich
- Created: 2023-03-11T22:35:36.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-25T05:34:36.000Z (about 2 years ago)
- Last Synced: 2025-01-13T22:16:47.484Z (over 1 year ago)
- Topics: appletv, content-collector
- Language: Python
- Homepage:
- Size: 19.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Content collector
## Description
This is a simple application that collects playing content from local Apple TV and stores it in a database
## Environment Variables
* `ATV_NAME` - Name of the Apple TV
* `ATV_ID` - ID of the Apple TV
* `ATV_AIR_PLAY_CREDENTIALS` - AirPlay credentials of the Apple TV
* `ATV_COMPANION_CREDENTIALS` - Companion credentials of the Apple TV
* `ATV_RAOP_CREDENTIALS` - RAOP credentials of the Apple TV
* `DATABASE_PATH` - Path to the database file
* `SLEEP_TIMEOUT` - Time to sleep between each collect in seconds
## Commands
* `make backup` - Make a backup of the database
* `make redeploy` - Redeploy the application
## Backups
This application data could be backup by restic. To do so, you need to setup repository:
```bash
restic init -r /path/to/repo
```
Set environment variables for repository:
```bash
export RESTIC_PASSWORD=your_password
export RESTIC_REPOSITORY=/path/to/repo
```
Make a backup file executable:
```bash
chmod +x backup.sh
```
Schedule a backup with cron if needed:
```bash
crontab -e
0 0 * * * /path/to/backup.sh
```