[176] fix resolution

This commit is contained in:
meisnate12 2023-04-09 02:46:27 -04:00
parent c53c98d355
commit af9c4f0bb8
8 changed files with 58 additions and 92 deletions

View file

@ -1,3 +1,12 @@
# New Translation Portal
New Translation Portal located at [translations.metamanager.wiki](https://translations.metamanager.wiki/projects/plex-meta-manager/defaults/). If anyone is willing to help fill in what we have or add your own language feel free to sign up. If you have questions either contact us on Discord or in the Discussions on GitHub.
# New PMM Companion Scripts
[PMM Overlay Reset](https://metamanager.wiki/en/latest/home/scripts/overlay-reset.html): Script to Hard Reset PMM Overlays back to Default.
[Plex Image Cleanup](https://metamanager.wiki/en/latest/home/scripts/image-cleanup.html): Script to clean up Old Uploaded Images in Plex.
# Requirements Update (requirements will need to be reinstalled)
Updated pillow requirement to 9.5.0
Updated plexapi requirement to 4.13.4
@ -61,6 +70,4 @@ Closes #1336 Fixed "Mass Originally Available Update" attribute name within the
Closes #1327 Fixed an issue where searching for item assets could take longer than expected.
Closes #1346 Fixed an issue where using `PMM_TIME` with multiple times could ignore all but the last specified time.
Various other Minor Fixes

View file

@ -1 +1 @@
1.18.3-develop175
1.18.3-develop176

View file

@ -59,7 +59,7 @@ external_templates:
- IMAX
- Remastered
- Criterion
- Rich-Donner
- Richard-Donner
- Black-And-Chrome
- Definitive
- Ulysses
@ -346,7 +346,7 @@ overlays:
Criterion-Dovetail:
variables: {key: criterion, weight: 10, search: Criterion, type: edition_dovetail, allowed_libraries: movie}
template: [name: edition, name: standard]
Rich-Donner-Dovetail:
Richard-Donner-Dovetail:
variables: {key: richarddonner, weight: 9, search: Rich, type: edition_dovetail, allowed_libraries: movie}
template: [name: edition, name: standard]
Black-And-Chrome-Dovetail:
@ -486,8 +486,8 @@ overlays:
Criterion:
variables: {key: criterion, weight: 10, search: Criterion, type: edition, allowed_libraries: movie}
template: [name: edition, name: standard]
Rich-Donner:
variables: {key: richdonner, weight: 9, search: Rich, type: edition, allowed_libraries: movie}
Richard-Donner:
variables: {key: richarddonner, weight: 9, search: Rich, type: edition, allowed_libraries: movie}
template: [name: edition, name: standard]
Black-And-Chrome:
variables: {key: blackchrome, weight: 8, search: Black, type: edition, allowed_libraries: movie}

View file

@ -15,14 +15,14 @@ plex:
optimize: false
```
| Attribute | Allowed Values | Default | Required |
|:----------------|:---------------------------------------------------------------------------------------------------------------------------------|:--------|:--------:|
| `url` | Plex Server URL or `ENV` (This will use the Environment/Runtime Plex URL)<br><strong>Example:</strong> http://192.168.1.12:32400 | N/A | &#9989; |
| `token` | Plex Server Authentication Token or `ENV` (This will use the Environment/Runtime Plex URL) | N/A | &#9989; |
| `timeout` | Plex Server Timeout | 60 | &#10060; |
| `clean_bundles` | Runs Clean Bundles on the Server after all Metadata Files are run | false | &#10060; |
| `empty_trash` | Runs Empty Trash on the Server after all Metadata Files are run | false | &#10060; |
| `optimize` | Runs Optimize on the Server after all Metadata Files are run | false | &#10060; |
| Attribute | Allowed Values | Default | Required |
|:----------------|:-------------------------------------------------------------------------------------------------------------------------------|:--------|:--------:|
| `url` | Plex Server URL<br><strong>Example:</strong> http://192.168.1.12:32400 | N/A | &#9989; |
| `token` | Plex Server Authentication Token | N/A | &#9989; |
| `timeout` | Plex Server Timeout | 60 | &#10060; |
| `clean_bundles` | Runs Clean Bundles on the Server after all Metadata Files are run | false | &#10060; |
| `empty_trash` | Runs Empty Trash on the Server after all Metadata Files are run | false | &#10060; |
| `optimize` | Runs Optimize on the Server after all Metadata Files are run | false | &#10060; |
* **Do Not Use the Plex Token found in Plex's Preferences.xml file**

View file

@ -36,8 +36,6 @@ Environment Variables can also be placed inside a `.env` file inside your config
| [No Missing](#no-missing) | `-nm` or `--no-missing` | `PMM_NO_MISSING` |
| [No Report](#no-report) | `-nr` or `--no-report` | `PMM_NO_REPORT` |
| [Read Only Config](#read-only-config) | `-ro` or `--read-only-config` | `PMM_READ_ONLY_CONFIG` |
| [ENV Plex URL](#env-plex-url--token) | `-pu` or `--plex-url` | `PMM_PLEX_URL` |
| [ENV Plex Token](#env-plex-url--token) | `-pt` or `--plex-token` | `PMM_PLEX_TOKEN` |
| [Divider Character](#divider-character--screen-width) | `-d` or `--divider` | `PMM_DIVIDER` |
| [Screen Width](#divider-character--screen-width) | `-w` or `--width` | `PMM_WIDTH` |
| [Config Secrets](#config-secrets) | `--pmm-***` | `PMM_***` |
@ -948,62 +946,6 @@ docker run -it -v "X:\Media\Plex Meta Manager\config:/config:rw" meisnate12/plex
```
````
### ENV Plex URL & Token
Replaces `ENV` when it is used plex `url` or `token`.
#### Plex URL
<table class="dualTable colwidths-auto align-default table">
<tr>
<th style="background-color: #1d1d1d;"></th>
<th>Shell</th>
<th>Environment</th>
</tr>
<tr>
<th>Flags</th>
<td><code>-pu</code> or <code>--plex-url</code></td>
<td><code>PMM_PLEX_URL</code></td>
</tr>
<tr>
<th>Example</th>
<td><code>--plex-url 192.168.1.12:32400</code></td>
<td><code>PMM_PLEX_URL=192.168.1.12:32400</code></td>
</tr>
</table>
#### Plex Token
<table class="dualTable colwidths-auto align-default table">
<tr>
<th style="background-color: #1d1d1d;"></th>
<th>Shell</th>
<th>Environment</th>
</tr>
<tr>
<th>Flags</th>
<td><code>-pt</code> or <code>--plex-token</code></td>
<td><code>PMM_PLEX_TOKEN</code></td>
</tr>
<tr>
<th>Example</th>
<td><code>--plex-token AB23HE4588</code></td>
<td><code>PMM_PLEX_TOKEN=AB23HE4588</code></td>
</tr>
</table>
````{tab} Local Environment
```
python plex_meta_manager.py --plex-url 192.168.1.12:32400 --plex-token AB23HE4588
```
````
````{tab} Docker Environment
```
docker run -it -v "X:\Media\Plex Meta Manager\config:/config:rw" meisnate12/plex-meta-manager --plex-url 192.168.1.12:32400 --plex-token AB23HE4588
```
````
### Divider Character & Screen Width
Change the terminal output divider character or width.

View file

@ -2824,18 +2824,30 @@ class CollectionBuilder:
self.library.query(item.refresh)
if self.library.Radarr and tmdb_paths:
if "item_radarr_tag" in self.item_details:
self.library.Radarr.edit_tags([t[0] if isinstance(t, tuple) else t for t in tmdb_paths], self.item_details["item_radarr_tag"], self.item_details["apply_tags"])
if self.radarr_details["add_existing"]:
added = self.library.Radarr.add_tmdb(tmdb_paths, **self.radarr_details)
self.added_to_radarr.extend([{"title": movie.title, "id": movie.tmdbId} for movie in added])
try:
if "item_radarr_tag" in self.item_details:
self.library.Radarr.edit_tags([t[0] if isinstance(t, tuple) else t for t in tmdb_paths], self.item_details["item_radarr_tag"], self.item_details["apply_tags"])
if self.radarr_details["add_existing"]:
added = self.library.Radarr.add_tmdb(tmdb_paths, **self.radarr_details)
self.added_to_radarr.extend([{"title": movie.title, "id": movie.tmdbId} for movie in added])
except Failed as e:
logger.error(e)
except ArrException as e:
logger.stacktrace()
logger.error(f"Arr Error: {e}")
if self.library.Sonarr and tvdb_paths:
if "item_sonarr_tag" in self.item_details:
self.library.Sonarr.edit_tags([t[0] if isinstance(t, tuple) else t for t in tvdb_paths], self.item_details["item_sonarr_tag"], self.item_details["apply_tags"])
if self.sonarr_details["add_existing"]:
added = self.library.Sonarr.add_tvdb(tvdb_paths, **self.sonarr_details)
self.added_to_sonarr.extend([{"title": show.title, "id": show.tvdbId} for show in added])
try:
if "item_sonarr_tag" in self.item_details:
self.library.Sonarr.edit_tags([t[0] if isinstance(t, tuple) else t for t in tvdb_paths], self.item_details["item_sonarr_tag"], self.item_details["apply_tags"])
if self.sonarr_details["add_existing"]:
added = self.library.Sonarr.add_tvdb(tvdb_paths, **self.sonarr_details)
self.added_to_sonarr.extend([{"title": show.title, "id": show.tvdbId} for show in added])
except Failed as e:
logger.error(e)
except ArrException as e:
logger.stacktrace()
logger.error(f"Arr Error: {e}")
def load_collection(self):
if self.obj is None and self.smart_url:

View file

@ -18,7 +18,7 @@ auto = {
"Video": ["country", "content_rating"] + all_auto
}
dynamic_attributes = [
"type", "data", "exclude", "addons", "template", "template_variables", "other_template", "remove_suffix",
"type", "data", "exclude", "addons", "template", "template_variables", "other_template", "remove_suffix", "custom_keys",
"remove_prefix", "title_format", "key_name_override", "title_override", "test", "sync", "include", "other_name"
]
auto_type_translation = {

View file

@ -46,8 +46,6 @@ parser.add_argument("-nc", "--no-countdown", dest="no_countdown", help="Run with
parser.add_argument("-nm", "--no-missing", dest="no_missing", help="Run without running the missing section", action="store_true", default=False)
parser.add_argument("-nr", "--no-report", dest="no_report", help="Run without saving a report", action="store_true", default=False)
parser.add_argument("-ro", "--read-only-config", dest="read_only_config", help="Run without writing to the config", action="store_true", default=False)
parser.add_argument("-pu", "--plex-url", dest="plex_url", help="Plex URL for Plex ENV URLs", default="", type=str)
parser.add_argument("-pt", "--plex-token", dest="plex_token", help="Plex Token for Plex ENV Tokens", default="", type=str)
parser.add_argument("-d", "--divider", dest="divider", help="Character that divides the sections (Default: '=')", default="=", type=str)
parser.add_argument("-w", "--width", dest="width", help="Screen Width (Default: 100)", default=100, type=int)
args, unknown = parser.parse_known_args()
@ -126,17 +124,26 @@ timeout = get_arg("PMM_TIMEOUT", args.timeout, arg_int=True)
debug = get_arg("PMM_DEBUG", args.debug, arg_bool=True)
trace = get_arg("PMM_TRACE", args.trace, arg_bool=True)
log_requests = get_arg("PMM_LOG_REQUESTS", args.log_requests, arg_bool=True)
plex_url = get_arg("PMM_PLEX_URL", args.plex_url)
plex_token = get_arg("PMM_PLEX_TOKEN", args.plex_token)
secret_args = {}
plex_url = None
plex_token = None
i = 0
while i < len(unknown):
if str(unknown[i]).lower().startswith("--pmm-"):
secret_args[str(unknown[i]).lower()[6:]] = str(unknown[i + 1])
test_var = str(unknown[i]).lower()
if test_var.startswith("--pmm-") or test_var in ["-pu", "--plex-url", "-pt", "--plex-token"]:
if test_var in ["-pu", "--plex-url"]:
plex_url = str(unknown[i + 1])
elif test_var in ["-pt", "--plex-token"]:
plex_token = str(unknown[i + 1])
else:
secret_args[test_var[6:]] = str(unknown[i + 1])
i += 1
i += 1
plex_url = get_arg("PMM_PLEX_URL", plex_url)
plex_token = get_arg("PMM_PLEX_TOKEN", plex_token)
for env_name, env_data in os.environ.items():
if str(env_name).upper().startswith("PMM_") and str(env_name).upper() not in static_envs:
secret_args[str(env_name).lower()[4:]] = env_data
@ -275,8 +282,6 @@ def start(attrs):
logger.debug(f"--no-missing (PMM_NO_MISSING): {no_missing}")
logger.debug(f"--no-report (PMM_NO_REPORT): {no_report}")
logger.debug(f"--read-only-config (PMM_READ_ONLY_CONFIG): {read_only_config}")
logger.debug(f"--plex-url (PMM_PLEX_URL): {'Used' if plex_url else ''}")
logger.debug(f"--plex-token (PMM_PLEX_TOKEN): {'Used' if plex_token else ''}")
logger.debug(f"--divider (PMM_DIVIDER): {divider}")
logger.debug(f"--width (PMM_WIDTH): {screen_width}")
logger.debug(f"--debug (PMM_DEBUG): {debug}")