Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Kometa-Team/Overlay-Reset
Python3 Script to Remove all Overlays Generated by Kometa.
https://github.com/Kometa-Team/Overlay-Reset
Last synced: 5 days ago
JSON representation
Python3 Script to Remove all Overlays Generated by Kometa.
- Host: GitHub
- URL: https://github.com/Kometa-Team/Overlay-Reset
- Owner: Kometa-Team
- License: mit
- Created: 2023-02-09T01:18:33.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-07-22T16:55:20.000Z (4 months ago)
- Last Synced: 2024-08-01T22:00:14.339Z (3 months ago)
- Language: Python
- Homepage:
- Size: 803 KB
- Stars: 26
- Watchers: 3
- Forks: 3
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Kometa Overlay Reset
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/Kometa-Team/Overlay-Reset?style=plastic)](https://github.com/Kometa-Team/Overlay-Reset/releases)
[![Docker Image Version (latest semver)](https://img.shields.io/docker/v/kometateam/overlay-reset?label=docker&sort=semver&style=plastic)](https://hub.docker.com/r/kometateam/overlay-reset)
[![Docker Pulls](https://img.shields.io/docker/pulls/kometateam/overlay-reset?style=plastic)](https://hub.docker.com/r/kometateam/overlay-reset)
[![Develop GitHub commits since latest stable release (by SemVer)](https://img.shields.io/github/commits-since/Kometa-Team/Overlay-Reset/latest/develop?label=Commits%20in%20Develop&style=plastic)](https://github.com/Kometa-Team/Overlay-Reset/tree/develop)[![Discord](https://img.shields.io/discord/822460010649878528?color=%2300bc8c&label=Discord&style=plastic)](https://discord.gg/NfH6mGFuAB)
[![Reddit](https://img.shields.io/reddit/subreddit-subscribers/Kometa?color=%2300bc8c&label=r%2FKometa&style=plastic)](https://www.reddit.com/r/Kometa/)
[![Wiki](https://img.shields.io/readthedocs/kometa?color=%2300bc8c&style=plastic)](https://kometa.wiki/en/latest/home/scripts/overlay-reset.html)
[![GitHub Sponsors](https://img.shields.io/github/sponsors/meisnate12?color=%238a2be2&style=plastic)](https://github.com/sponsors/meisnate12)
[![Sponsor or Donate](https://img.shields.io/badge/-Sponsor%2FDonate-blueviolet?style=plastic)](https://github.com/sponsors/meisnate12)Kometa Overlay Reset is an open source Python 3 project that has been created to Remove all Overlays placed on a Plex Library.
## Installing Kometa Overlay Reset
Generally, Kometa Overlay Reset can be installed in one of two ways:
1. Running on a system as a Python script [we will refer to this as a "local" install]
2. Running as a Docker containerGENERALLY SPEAKING, running as a Docker container is simpler, as you won't have to be concerned about installing Python, or support libraries, or any possible system conflicts generated by those actions.
For this reason, it's generally recommended that you install via Docker rather than directly on the host.
If you have some specific reason to avoid Docker, or you prefer running it as a Python script for some particular reason, then this general recommendation is not aimed at you. It's aimed at someone who doesn't have an existing compelling reason to choose one over the other.
### Install Walkthroughs
There are no detailed walkthroughs specifically for Kometa Overlay Reset but the process is extremely similar to how you would do it with [Kometa](https://kometa.wiki/en/latest/home/installation.html#install-walkthroughs).
### Local Install Overview
Kometa Overlay Reset requires Python 3.11 or later. Later versions may function but are untested.
These are high-level steps which assume the user has knowledge of python and pip, and the general ability to troubleshoot issues.
1. Clone or [download and unzip](https://github.com/Kometa-Team/Overlay-Reset/archive/refs/heads/master.zip) the repo.
```shell
git clone https://github.com/Kometa-Team/Overlay-Reset
```
2. Move into the script directory.```shell
cd Overlay-Reset
```
3. Install dependencies (it's recommended to do this in a virtual environment):```shell
pip install -r requirements.txt
```4. If the above command fails, run the following command:
```shell
pip install -r requirements.txt --ignore-installed
```At this point Kometa-Overlay-Reset has been installed, and you can verify installation by running:
```shell
python overlay_reset.py
```### Docker Install Overview
#### Docker Run:
```shell
docker run -v :/config:rw kometateam/overlay-reset
```
* The `-v :/config:rw` flag mounts the location you choose as a persistent volume to store your files.* Change `` to a folder where your .env and other files are.
* If your directory has spaces (such as "My Documents"), place quotation marks around your directory pathing as shown here: `-v ":/config:rw"`Example Docker Run command:
These docs are assuming you have a basic understanding of Docker concepts. One place to get familiar with Docker would be the [official tutorial](https://www.docker.com/101-tutorial/).
```shell
docker run -v "X:\Media\Kometa Overlay Reset\config:/config:rw" kometateam/overlay-reset
```#### Docker Compose:
Example Docker Compose file:
```yaml
services:
overlay-reset:
image: kometateam/overlay-reset
container_name: overlay-reset
environment:
- TZ=TIMEZONE #optional
volumes:
- /path/to/config:/config
restart: unless-stopped
```#### Dockerfile
A `Dockerfile` is included within the GitHub repository for those who require it, although this is only suggested for those with knowledge of dockerfiles. The official Kometa Overlay Reset build is available on the [Dockerhub Website](https://hub.docker.com/r/kometateam/overlay-reset).
## Options
Each option can be applied in three ways:
1. Use the Shell Command when launching.
2. Setting the Environment Variable.
3. Adding the Environment Variables to `config/.env`
| Option | Description | Required |
|:------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------:|
| Plex URl | Plex URL of the Server you want to connect to.
**Shell Command:** `-u` or `--url "http://192.168.1.12:32400"`
**Environment Variable:** `PLEX_URL=http://192.168.1.12:32400` | ✅ |
| Plex Token | Plex Token of the Server you want to connect to.
**Shell Command:** `-t` or `--token 123456789`
**Environment Variable:** `PLEX_TOKEN=123456789` | ✅ |
| Plex Library | Plex Library Name you want to reset.
**Shell Command:** `-l` or `--library Movies`
**Environment Variable:** `PLEX_LIBRARY=Movies` | ✅ |
| Kometa Asset Folder | Kometa Asset Folder to Scan for restoring posters.
**Shell Command:** `-a` or `--asset "C:\Kometa\config\assets"`
**Environment Variable:** `KOMETA_ASSET=C:\Kometa\config\assets` | ❌ |
| Kometa Original Folder | Kometa Original Folder to Scan for restoring posters.
**Shell Command:** `-o` or `--original "C:\Kometa\config\overlays\Movies Original Posters"`
**Environment Variable:** `KOMETA_ORIGINAL=C:\Kometa\config\overlays\Movies Original Posters` | ❌ |
| TMDb V3 API Key | TMDb V3 API Key for restoring posters from TMDb.
**Shell Command:** `-ta` or `--tmdbapi 123456789123456789`
**Environment Variable:** `TMDBAPI=123456789123456789` | ❌ |
| Start From | Plex Item Title to Start restoring posters from.
**Shell Command:** `-st` or `--start "Mad Max"`
**Environment Variable:** `START=Mad Max` | ❌ |
| Items | Restore specific Plex Items by Title. Can use a bar-separated (|
) list.
**Shell Command:** `-it` or--items "Mad Max|Mad Max 2"
**Environment Variable:**ITEMS=Mad Max|Mad Max 2
| ❌ |
| Labels | Additional labels to remove. Can use a bar-separated (|
) list.
**Shell Command:** `-lb` or--labels "TCM|Other Label"
**Environment Variable:**LABELS=TCM|Other Label
| ❌ |
| Timeout | Timeout can be any number greater then 0. **Default:** `600`
**Shell Command:** `-ti` or `--timeout 1000`
**Environment Variable:** `TIMEOUT=1000` | ❌ |
| Dry Run | Run as a Dry Run without making changes in Plex.
**Shell Command:** `-d` or `--dry`
**Environment Variable:** `DRY_RUN=True` | ❌ |
| Flat Assets | Kometa Asset Folder uses [Flat Assets Image Paths](https://kometa.wiki/en/latest/home/guides/assets.html#asset-naming).
**Shell Command:** `-f` or `--flat`
**Environment Variable:** `KOMETA_FLAT=True` | ❌ |
| Reset Main Posters | Do not restore Main Show/Movie posters during run.
**Shell Command:** `-nm` or `--no-main`
**Environment Variable:** `NO_MAIN=True` | ❌ |
| Reset Season Posters | Restore Season posters during run.
**Shell Command:** `-s` or `--season`
**Environment Variable:** `SEASON=True` | ❌ |
| Reset Episode Posters | Restore Episode posters during run.
**Shell Command:** `-e` or `--episode`
**Environment Variable:** `EPISODE=True` | ❌ |
| Ignore Automatic Resume | Ignores the automatic resume.
**Shell Command:** `-ir` or `--ignore-resume`
**Environment Variable:** `IGNORE_RESUME=True` | ❌ |
| Trace Logs | Run with extra trace logs.
**Shell Command:** `-tr` or `--trace`
**Environment Variable:** `TRACE=True` | ❌ |
| Log Requests | Run with every request logged.
**Shell Command:** `-lr` or `--log-requests`
**Environment Variable:** `LOG_REQUESTS=True` | ❌ |### Example .env File
```
PLEX_URL=http://192.168.1.12:32400
PLEX_TOKEN=123456789
PLEX_LIBRARY=Movies
KOMETA_ASSET=C:\Kometa\config\assets
KOMETA_ORIGINAL=C:\Kometa\config\overlays\Movies Original Posters
TMDBAPI=123456789123456789
START=
ITEMS=
LABELS=
TIMEOUT=600
DRY_RUN=True
KOMETA_FLAT=False
NO_MAIN=False
SEASON=True
EPISODE=True
IGNORE_RESUME=False
TRACE=False
LOG_REQUESTS=False
```