Initial Commit
This commit is contained in:
120
README.md
Normal file
120
README.md
Normal file
@@ -0,0 +1,120 @@
|
||||
# Emby Live TV Channel Logo Updater
|
||||
|
||||
Automatically copy or clear Live TV channel logos in Emby Server.
|
||||
|
||||
## What It Does
|
||||
|
||||
- **Copy Mode** (default): Copies the Primary logo (Logo Dark Version) to LogoLight (Logo Light Version) and LogoLightColor (Logo Light with Colour) for all TV channels
|
||||
- **Clear Mode** (`--clear`): Removes all logos (Primary, LogoLight, LogoLightColor) from channels
|
||||
|
||||
## Requirements
|
||||
|
||||
- Python 3.6+
|
||||
- Emby Server with API access
|
||||
- API key from Emby Server
|
||||
|
||||
## Getting Your API Key
|
||||
|
||||
1. Log into Emby Server as an administrator
|
||||
2. Go to Settings → Advanced → API Keys
|
||||
3. Create a new API key or use an existing one
|
||||
|
||||
## Usage
|
||||
|
||||
### Copy Logos (Default Mode)
|
||||
|
||||
**Dry run** (see what would happen without making changes):
|
||||
```bash
|
||||
python update_channel_logos.py \
|
||||
--server https://your-emby-server.com \
|
||||
--api-key YOUR_API_KEY
|
||||
```
|
||||
|
||||
**Execute** (actually make changes):
|
||||
```bash
|
||||
python update_channel_logos.py \
|
||||
--server https://your-emby-server.com \
|
||||
--api-key YOUR_API_KEY \
|
||||
--execute
|
||||
```
|
||||
|
||||
**Test on first channel only**:
|
||||
```bash
|
||||
python update_channel_logos.py \
|
||||
--server https://your-emby-server.com \
|
||||
--api-key YOUR_API_KEY \
|
||||
--first-only \
|
||||
--execute
|
||||
```
|
||||
|
||||
### Clear All Logos
|
||||
|
||||
**Dry run**:
|
||||
```bash
|
||||
python update_channel_logos.py \
|
||||
--server https://your-emby-server.com \
|
||||
--api-key YOUR_API_KEY \
|
||||
--clear
|
||||
```
|
||||
|
||||
**Execute**:
|
||||
```bash
|
||||
python update_channel_logos.py \
|
||||
--server https://your-emby-server.com \
|
||||
--api-key YOUR_API_KEY \
|
||||
--clear \
|
||||
--execute
|
||||
```
|
||||
|
||||
## Command-Line Options
|
||||
|
||||
| Option | Description |
|
||||
|--------|-------------|
|
||||
| `--server` | **Required.** Emby server URL (e.g., `https://emby.example.com`) |
|
||||
| `--api-key` | **Required.** Your Emby API key |
|
||||
| `--execute` | Actually perform the changes (without this, runs in dry-run mode) |
|
||||
| `--first-only` | Only process the first channel (useful for testing) |
|
||||
| `--clear` | Clear all logos instead of copying them |
|
||||
|
||||
## Examples
|
||||
|
||||
**Recommended workflow:**
|
||||
|
||||
1. Test on first channel with dry run:
|
||||
```bash
|
||||
python update_channel_logos.py --server URL --api-key KEY --first-only
|
||||
```
|
||||
|
||||
2. Execute on first channel:
|
||||
```bash
|
||||
python update_channel_logos.py --server URL --api-key KEY --first-only --execute
|
||||
```
|
||||
|
||||
3. If successful, run on all channels:
|
||||
```bash
|
||||
python update_channel_logos.py --server URL --api-key KEY --execute
|
||||
```
|
||||
|
||||
## How It Works
|
||||
|
||||
1. Connects to your Emby server
|
||||
2. Fetches all Live TV channels
|
||||
3. For each channel:
|
||||
- **Copy mode**: Downloads the Primary logo and uploads it as LogoLight and LogoLightColor
|
||||
- **Clear mode**: Deletes Primary, LogoLight, and LogoLightColor
|
||||
4. Skips channels that already have the logos (copy mode) or have no logos (clear mode)
|
||||
5. Shows a summary of results
|
||||
|
||||
## Safety Features
|
||||
|
||||
- **Dry run by default**: Always runs in simulation mode unless `--execute` is specified
|
||||
- **Confirmation prompt**: Asks for confirmation before executing changes
|
||||
- **First-only testing**: Test on a single channel before processing all channels
|
||||
- **Skip existing**: In copy mode, skips channels that already have both light logos
|
||||
|
||||
## Notes
|
||||
|
||||
- The script only affects Live TV channels, not other media
|
||||
- Changes may take a few moments to appear in the Emby interface
|
||||
- You may need to refresh your browser/app to see changes
|
||||
- Use `--clear` with caution - it deletes logos from all channels
|
||||
Reference in New Issue
Block a user