[101] update attribute names

pull/1328/head
meisnate12 2 years ago
parent f5adaa7706
commit 6d07d9eb45

@ -74,6 +74,7 @@ jobs:
with: with:
webhook_id: ${{ secrets.BUILD_WEBHOOK_ID }} webhook_id: ${{ secrets.BUILD_WEBHOOK_ID }}
webhook_token: ${{ secrets.BUILD_WEBHOOK_TOKEN }} webhook_token: ${{ secrets.BUILD_WEBHOOK_TOKEN }}
message: <@&1079153184007790652>
title: "develop build: **Failure**" title: "develop build: **Failure**"
color: 0xe30c43 color: 0xe30c43
url: https://github.com/meisnate12/Plex-Meta-Manager/actions/runs/${{ github.run_id }} url: https://github.com/meisnate12/Plex-Meta-Manager/actions/runs/${{ github.run_id }}

@ -57,6 +57,7 @@ jobs:
with: with:
webhook_id: ${{ secrets.BUILD_WEBHOOK_ID }} webhook_id: ${{ secrets.BUILD_WEBHOOK_ID }}
webhook_token: ${{ secrets.BUILD_WEBHOOK_TOKEN }} webhook_token: ${{ secrets.BUILD_WEBHOOK_TOKEN }}
message: <@&1079153184007790652>
title: "latest build: **Failure**" title: "latest build: **Failure**"
color: 0xe30c43 color: 0xe30c43
url: https://github.com/meisnate12/Plex-Meta-Manager/actions/runs/${{ github.run_id }} url: https://github.com/meisnate12/Plex-Meta-Manager/actions/runs/${{ github.run_id }}

@ -74,6 +74,7 @@ jobs:
with: with:
webhook_id: ${{ secrets.BUILD_WEBHOOK_ID }} webhook_id: ${{ secrets.BUILD_WEBHOOK_ID }}
webhook_token: ${{ secrets.BUILD_WEBHOOK_TOKEN }} webhook_token: ${{ secrets.BUILD_WEBHOOK_TOKEN }}
message: <@&1079153184007790652>
title: "nightly build: **Failure**" title: "nightly build: **Failure**"
color: 0xe30c43 color: 0xe30c43
url: https://github.com/meisnate12/Plex-Meta-Manager/actions/runs/${{ github.run_id }} url: https://github.com/meisnate12/Plex-Meta-Manager/actions/runs/${{ github.run_id }}

@ -52,6 +52,7 @@ jobs:
with: with:
webhook_id: ${{ secrets.BUILD_WEBHOOK_ID }} webhook_id: ${{ secrets.BUILD_WEBHOOK_ID }}
webhook_token: ${{ secrets.BUILD_WEBHOOK_TOKEN }} webhook_token: ${{ secrets.BUILD_WEBHOOK_TOKEN }}
message: <@&1079153184007790652>
title: "${{ steps.get_version.outputs.VERSION }} build: **Success**" title: "${{ steps.get_version.outputs.VERSION }} build: **Success**"
url: https://github.com/meisnate12/Plex-Meta-Manager/actions/runs/${{ github.run_id }} url: https://github.com/meisnate12/Plex-Meta-Manager/actions/runs/${{ github.run_id }}
username: Metabot username: Metabot

@ -1 +1 @@
1.18.3-develop100 1.18.3-develop101

@ -235,6 +235,8 @@ templates:
repo.exists: false repo.exists: false
value: images/<<set>>/<<style>> value: images/<<set>>/<<style>>
mapping_id: <<id>> mapping_id: <<id>>
run_definition:
- <<use_<<set>>>>
image_set: image_set:
pmm: <<pmm>> pmm: <<pmm>>
file: <<file>> file: <<file>>

@ -40,7 +40,7 @@ There are no detailed walkthroughs specifically for Plex Image Cleanup but the p
### Local Install Overview ### Local Install Overview
Plex Image Cleanup is compatible with Python 3.10 and 3.11. Later versions may function but are untested. Plex Image Cleanup is compatible with Python 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. These are high-level steps which assume the user has knowledge of python and pip, and the general ability to troubleshoot issues.

@ -32,7 +32,7 @@ There are no detailed walkthroughs specifically for PMM Overlay Reset but the pr
### Local Install Overview ### Local Install Overview
PMM Overlay Reset is compatible with Python 3.7 through 3.11. Later versions may function but are untested. PMM Overlay Reset is compatible with Python 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. These are high-level steps which assume the user has knowledge of python and pip, and the general ability to troubleshoot issues.
@ -107,19 +107,21 @@ Each option can be applied in three ways:
3. Adding the Environment Variables to `config/.env` 3. Adding the Environment Variables to `config/.env`
| Option | Description | Required | | 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 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 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; | | 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 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; | | 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; | | 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; | | Start From | Plex Item Title to Start restoring posters from.<br>**Shell Command:** `-st` or `--start "Mad Max"`<br>**Environment Variable:** `START=Mad Max` | &#10060; |
| Items | Restore specific Plex Items by Title. Can use a bar-separated (<code>&#124;</code>) list.<br>**Shell Command:** `-it` or <code>--items "Mad Max&#124;Mad Max 2"</code><br>**Environment Variable:** <code>ITEMS=Mad Max&#124;Mad Max 2</code> | &#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; | | 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; | | 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; | | 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 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; | | Reset Episode Posters | Restore Episode posters during run.<br>**Shell Command:** `-e` or `--episode`<br>**Environment Variable:** `EPISODE=True` | &#10060; |
| Ignore Automatic Resume | Ignores the automatic resume.<br>**Shell Command:** `-ir` or `--ignore-resume`<br>**Environment Variable:** `IGNORE_RESUME=True` | &#10060; |
| Trace Logs | Run with extra trace logs.<br>**Shell Command:** `-tr` or `--trace`<br>**Environment Variable:** `TRACE=True` | &#10060; | | Trace Logs | Run with extra trace logs.<br>**Shell Command:** `-tr` or `--trace`<br>**Environment Variable:** `TRACE=True` | &#10060; |
| Log Requests | Run with every request logged.<br>**Shell Command:** `-lr` or `--log-requests`<br>**Environment Variable:** `LOG_REQUESTS=True` | &#10060; | | Log Requests | Run with every request logged.<br>**Shell Command:** `-lr` or `--log-requests`<br>**Environment Variable:** `LOG_REQUESTS=True` | &#10060; |
@ -132,12 +134,14 @@ PLEX_LIBRARY=Movies
PMM_ASSET=C:\Plex Meta Manager\config\assets PMM_ASSET=C:\Plex Meta Manager\config\assets
PMM_ORIGINAL=C:\Plex Meta Manager\config\overlays\Movies Original Posters PMM_ORIGINAL=C:\Plex Meta Manager\config\overlays\Movies Original Posters
TMDBAPI=123456789123456789 TMDBAPI=123456789123456789
RESUME= START=
ITEMS=
TIMEOUT=600 TIMEOUT=600
DRY_RUN=True DRY_RUN=True
PMM_FLAT=False PMM_FLAT=False
SEASON=True SEASON=True
EPISODE=True EPISODE=True
IGNORE_RESUME=False
TRACE=False TRACE=False
LOG_REQUESTS=False LOG_REQUESTS=False
``` ```

@ -0,0 +1,121 @@
# Metadata Set Creator
Metadata Set Creator is an open source Python 3 project that has been created to create a Plex Meta Manager metadata file and associated set file for a list.
## Installing Metadata Set Creator
Generally, Metadata Set Creator 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 Metadata Set Creator 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
Metadata Set Creator is compatible with Python 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/Metadata-Set-Creator/archive/refs/heads/master.zip) the repo.
```shell
git clone https://github.com/meisnate12/Metadata-Set-Creator
```
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 Metadata-Set-Creator has been installed, and you can verify installation by running:
```shell
python metadata_set_creator.py
```
### Docker Install Overview
#### Docker Run:
```shell
docker run -v <PATH_TO_CONFIG>:/config:rw meisnate12/metadata-set-creator
```
* 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\Metadata Set Creator\config:/config:rw" meisnate12/metadata-set-creator
```
#### Docker Compose:
Example Docker Compose file:
```yaml
version: "2.1"
services:
plex-meta-manager:
image: meisnate12/metadata-set-creator
container_name: metadata-set-creator
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 Metadata Set Creator build is available on the [Dockerhub Website](https://hub.docker.com/r/meisnate12/metadata-set-creator).
## 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 |
|:------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------:|
| List URL | TMDb List, TMDb Collection, IMDb List, Trakt List, or MDbList List URL. <br>**Shell Command:** `-u` or `--url "https://trakt.tv/users/movistapp/lists/christmas-movies"` <br>**Environment Variable:** `URL=https://trakt.tv/users/movistapp/lists/christmas-movies` | &#9989; |
| PMM Config | Path to PMM Config with TMDb/Trakt configured. **Default:** `config/config.yml`<br>**Shell Command:** `-pm` or `--pmm-config "C:\Plex Meta Manager\config\config.yml"`<br>**Environment Variable:** `PMM_CONFIG=C:\Plex Meta Manager\config\config.yml` | &#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; |
| TPDb Placeholders | Add TPDb placeholders over url placeholders.<br>**Shell Command:** `-tp` or `--tpdb`<br>**Environment Variable:** `TPDB=True` | &#10060; |
| Background Placeholders | Add Background placeholders.<br>**Shell Command:** `-b` or `--background`<br>**Environment Variable:** `BACKGROUND=True` | &#10060; |
| Season Placeholders | Add Season posters placeholders.<br>**Shell Command:** `-s` or `--season`<br>**Environment Variable:** `SEASON=True` | &#10060; |
| Episode Placeholders | Add Episode posters placeholders.<br>**Shell Command:** `-e` or `--episode`<br>**Environment Variable:** `EPISODE=True` | &#10060; |
| Trace Logs | Run with extra trace logs.<br>**Shell Command:** `-tr` or `--trace`<br>**Environment Variable:** `TRACE=True` | &#10060; |
| Log Requests | Run with every request logged.<br>**Shell Command:** `-lr` or `--log-requests`<br>**Environment Variable:** `LOG_REQUESTS=True` | &#10060; |
### Example .env File
```
URL=https://trakt.tv/users/movistapp/lists/christmas-movies
PMM_CONFIG=C:\Plex Meta Manager\config\config.yml
TIMEOUT=600
TPDB=True
BACKGROUND=False
SEASON=True
Episode=True
TRACE=False
LOG_REQUESTS=False
```

@ -2618,6 +2618,7 @@ class CollectionBuilder:
tmdb_paths = [] tmdb_paths = []
tvdb_paths = [] tvdb_paths = []
for item in self.items: for item in self.items:
self.library.reload(item)
current_labels = [la.tag for la in self.library.item_labels(item)] current_labels = [la.tag for la in self.library.item_labels(item)]
if "item_assets" in self.item_details and self.asset_directory and "Overlay" not in current_labels: if "item_assets" in self.item_details and self.asset_directory and "Overlay" not in current_labels:
self.library.find_and_upload_assets(item, current_labels, asset_directory=self.asset_directory) self.library.find_and_upload_assets(item, current_labels, asset_directory=self.asset_directory)

@ -1172,14 +1172,14 @@ class Plex(Library):
if title is None: if title is None:
title = item.title title = item.title
posters, backgrounds = util.get_image_dicts(group, alias) posters, backgrounds = util.get_image_dicts(group, alias)
if image_set and "poster" in image_set and image_set["poster"]: if image_set and "url_poster" in image_set and image_set["url_poster"]:
posters["image_set"] = image_set["poster"] posters["image_set"] = image_set["url_poster"]
elif image_set and "poster_tpdb" in image_set and image_set["poster_tpdb"]: elif image_set and "tpdb_poster" in image_set and image_set["tpdb_poster"]:
posters["image_set"] = f"https://theposterdb.com/api/assets/{image_set['poster_tpdb']}" posters["image_set"] = f"https://theposterdb.com/api/assets/{image_set['tpdb_poster']}"
if image_set and "background" in image_set and image_set["background"]: if image_set and "url_background" in image_set and image_set["url_background"]:
backgrounds["image_set"] = image_set["background"] backgrounds["image_set"] = image_set["url_background"]
elif image_set and "background_tpdb" in image_set and image_set["background_tpdb"]: elif image_set and "tpdb_background" in image_set and image_set["tpdb_background"]:
posters["image_set"] = f"https://theposterdb.com/api/assets/{image_set['background_tpdb']}" posters["image_set"] = f"https://theposterdb.com/api/assets/{image_set['tpdb_background']}"
try: try:
asset_poster, asset_background, item_dir, folder_name = self.find_item_assets(item, item_asset_directory=asset_location, asset_directory=asset_directory) asset_poster, asset_background, item_dir, folder_name = self.find_item_assets(item, item_asset_directory=asset_location, asset_directory=asset_directory)
if asset_poster: if asset_poster:

Loading…
Cancel
Save