[64] small fixes

pull/1311/head
meisnate12 2 years ago
parent 09c7cc800c
commit 566a411c56

@ -8,7 +8,7 @@ body:
attributes:
value: >
**THIS IS NOT THE PLACE TO ASK FOR SUPPORT OR FEATURE REQUESTS!**
Please use [Plex Meta Manager Discord](https://discord.gg/NfH6mGFuAB) and post your question under the `pmm-support` channel for support issues.
Please use [Plex Meta Manager Discord](https://discord.gg/NfH6mGFuAB) and post your question under the `pmm-help` channel for support issues.
Please use [Plex Meta Manager Features](https://features.metamanager.wiki/) to request and upvote features.
- type: input
id: version

@ -1 +1 @@
1.18.3-develop63
1.18.3-develop64

@ -39,8 +39,8 @@ Assets are searched for only at specific times.
The table below shows the asset folder path structures that will be searched for. There are two options for how Plex Meta Manager looks at the files inside your Asset Directories. Choose an option with the [`asset_folders` Setting Attribute](../../config/settings.md#image-asset-folders). Note that `asset_folders` is a toggle; you can't put some images in folders and some not in a context where it is enabled.
| Image Type | Image Path With Folders<br>`asset_folders: true` | Image Path Without Folder<br>`asset_folders: false` |
|:---------------------------------|:-------------------------------------------------|:----------------------------------------------------|
| Image Type | Asset Folders Image Paths<br>`asset_folders: true` | Flat Assets Image Paths<br>`asset_folders: false` |
|:---------------------------------|:---------------------------------------------------|:--------------------------------------------------|
| Collection/Movie/Show poster | `assets/ASSET_NAME/poster.ext` | `assets/ASSET_NAME.ext` |
| Collection/Movie/Show background | `assets/ASSET_NAME/background.ext` | `assets/ASSET_NAME_background.ext` |
| Season poster | `assets/ASSET_NAME/Season##.ext` | `assets/ASSET_NAME_Season##.ext` |
@ -66,7 +66,7 @@ The table below shows the asset folder path structures that will be searched for
Here's an example config folder structure with an assets directory with `asset_folders` set to true and false.
### `asset_folders: true`
### Asset Folders `asset_folders: true`
```
config
@ -118,7 +118,7 @@ config
│ ├── Season04_background.png
```
### `asset_folders: false`
### Flat Assets `asset_folders: false`
```
config

@ -30,7 +30,7 @@ If you are using unRAID, Kubernetes, QNAP, or Synology refer to the following ba
## Local Install Overview
Plex Meta Manager is compatible with Python 3.7 through 3.10. Later versions may function but are untested.
Plex Meta Manager is compatible with Python 3.7 through 3.11. 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. For a detailed step-by-step walkthrough, refer to the [Local Walkthrough](guides/local) guide.
@ -94,5 +94,7 @@ services:
- /path/to/config:/config
restart: unless-stopped
```
## Dockerfile
### 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 Plex Meta Manager build is available on the [Dockerhub Website](https://hub.docker.com/r/meisnate12/plex-meta-manager).

@ -0,0 +1,130 @@
# Plex Meta Manager Overlay Reset
Plex Meta Manager Overlay Reset is an open source Python 3 project that has been created to Remove all Overlays placed on a Plex Library.
## Installing PMM Overlay Reset
Generally, PMM 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 container
GENERALLY 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 walkthroguhs specifically for PMM Overlay Reset but the process is extremely similar to how you would do it with Plex Meta Manager](https://metamanager.wiki/en/latest/home/installation.html#install-walkthroughs).
### Local Install Overview
PMM Overlay Reset is compatible with Python 3.7 through 3.11. 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/meisnate12/PMM-Overlay-Reset/archive/refs/heads/master.zip) the repo.
```shell
git clone https://github.com/meisnate12/PMM-Overlay-Reset
```
2. Install dependencies:
```shell
pip install -r requirements.txt
```
3. If the above command fails, run the following command:
```shell
pip install -r requirements.txt --ignore-installed
```
At this point PMM-Overlay-Reset has been installed, and you can verify installation by running:
```shell
python pmm_overlay_reset.py
```
### Docker Install Overview
#### Docker Run:
```shell
docker run -v <PATH_TO_CONFIG>:/config:rw meisnate12/pmm-overlay-reset
```
* The `-v <PATH_TO_CONFIG>:/config:rw` flag mounts the location you choose as a persistent volume to store your files.
* Change `<PATH_TO_CONFIG>` 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 "<PATH_TO_CONFIG>:/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\PMM Overlay Reset\config:/config:rw" meisnate12/pmm-overlay-reset
```
#### Docker Compose:
Example Docker Compose file:
```yaml
version: "2.1"
services:
plex-meta-manager:
image: meisnate12/pmm-overlay-reset
container_name: pmm-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 PMM Overlay Reset build is available on the [Dockerhub Website](https://hub.docker.com/r/meisnate12/pmm-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.<br>**Shell Command:** `-u` or `--url "http://192.168.1.12:32400"`<br>**Environment Variable:** `PLEX_URL=http://192.168.1.12:32400` | &#9989; |
| Plex Token | Plex Token of the Server you want to connect to.<br>**Shell Command:** `-t` or `--token "123456789"`<br>**Environment Variable:** `PLEX_TOKEN=123456789` | &#9989; |
| Plex Library | Plex Library Name you want to reset.<br>**Shell Command:** `-l` or `--library Movies`<br>**Environment Variable:** `PLEX_LIBRARY=Movies` | &#9989; |
| PMM Asset Folder | Plex Meta Manager Asset Folder to Scan for restoring posters.<br>**Shell Command:** `-a` or `--asset C:\Plex Meta Manager\config\assets`<br>**Environment Variable:** `PMM_ASSET=C:\Plex Meta Manager\config\assets` | &#10060; |
| PMM Original Folder | Plex Meta Manager Original Folder to Scan for restoring posters.<br>**Shell Command:** `-o` or `--original C:\Plex Meta Manager\config\overlays\Movies Original Posters`<br>**Environment Variable:** `PMM_ORIGINAL=C:\Plex Meta Manager\config\overlays\Movies Original Posters` | &#10060; |
| TMDb V3 API Key | TMDb V3 API Key for restoring posters from TMDb.<br>**Shell Command:** `-ta` or `--tmdbapi 123456789123456789`<br>**Environment Variable:** `TMDBAPI=123456789123456789` | &#10060; |
| Resume | Plex Item Title to Resume restoring posters from.<br>**Shell Command:** `-re` or `--resume "Mad Max"`<br>**Environment Variable:** `RESUME=Mad Max` | &#10060; |
| Timeout | Timeout can be any number greater then 0. **Default:** `600`<br>**Shell Command:** `-ti` or `--timeout 1000`<br>**Environment Variable:** `TIMEOUT=1000` | &#10060; |
| Dry Run | Run as a Dry Run without making changes in Plex.<br>**Shell Command:** `-d` or `--dry`<br>**Environment Variable:** `DRY_RUN=True` | &#10060; |
| Flat Assets | PMM Asset Folder uses [Flat Assets Image Paths](https://metamanager.wiki/en/latest/home/guides/assets.html#asset-naming).<br>**Shell Command:** `-f` or `--flat`<br>**Environment Variable:** `PMM_FLAT=True` | &#10060; |
| Reset Season Posters | Restore Season posters during run.<br>**Shell Command:** `-s` or `--season`<br>**Environment Variable:** `SEASON=True` | &#10060; |
| Reset Episode Posters | Restore Episode posters during run.<br>**Shell Command:** `-e` or `--episode`<br>**Environment Variable:** `EPISODE=True` | &#10060; |
| Trace Logs | Run with every request logged.<br>**Shell Command:** `-tr` or `--trace`<br>**Environment Variable:** `TRACE=True` | &#10060; |
### Example .env File
```
PLEX_URL=http://192.168.1.12:32400
PLEX_TOKEN=123456789
PLEX_LIBRARY=Movies
PMM_ASSET=C:\Plex Meta Manager\config\assets
PMM_ORIGINAL=C:\Plex Meta Manager\config\overlays\Movies Original Posters
TMDBAPI=123456789123456789
RESUME=
TIMEOUT=600
DRY_RUN=True
PMM_FLAT=False
SEASON=True
EPISODE=True
TRACE=False
```

@ -43,7 +43,8 @@ ignored_details = [
"smart_filter", "smart_label", "smart_url", "run_again", "schedule", "sync_mode", "template", "variables", "test", "suppress_overlays",
"delete_not_scheduled", "tmdb_person", "build_collection", "collection_order", "builder_level", "overlay",
"validate_builders", "libraries", "sync_to_users", "exclude_users", "collection_name", "playlist_name", "name",
"blank_collection", "allowed_library_types", "delete_playlist", "ignore_blank_results", "only_run_on_create", "delete_collections_named"
"blank_collection", "allowed_library_types", "delete_playlist", "ignore_blank_results", "only_run_on_create",
"delete_collections_named", "tmdb_person_offset"
]
details = [
"ignore_ids", "ignore_imdb_ids", "server_preroll", "changes_webhooks", "collection_filtering", "collection_mode", "limit", "url_theme",

@ -266,7 +266,7 @@ class Overlays:
elif mod == "00":
final_value = f"{int(actual_value):03}"
elif mod == "/":
final_value = f"{int(actual_value) / 2:.2f}"
final_value = f"{float(actual_value) / 2:.1f}"
elif mod == "U":
final_value = str(actual_value).upper()
elif mod == "L":

@ -625,6 +625,8 @@ class Plex(Library):
except Failed as e:
logger.trace(f"Plex Error: {e}")
continue
else:
image_url = poster.key
break
if provider == "tmdb":
try:

@ -109,7 +109,7 @@ class Webhooks:
def delete_hooks(self, message, server=None, library=None):
if self.delete_webhooks:
json = {"event": "delete", "message": message}
json = {"event": "delete", "message": str(message)}
if server: json["server_name"] = str(server)
if library: json["library_name"] = str(library)
self._request(self.delete_webhooks, json)

Loading…
Cancel
Save