diff --git a/VERSION b/VERSION index 019e3d02..5cdb919a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.17.3-develop153 +1.17.3-develop154 diff --git a/defaults/both/collectionless.yml b/defaults/both/collectionless.yml new file mode 100644 index 00000000..57964422 --- /dev/null +++ b/defaults/both/collectionless.yml @@ -0,0 +1,40 @@ +############################################################################## +# Other Awards Collections # +# Created by Yozora, Bullmoose20, & Sohjiro # +# EDITING THIS FILE MAY CAUSE PULLING NEW UPDATES TO FAIL # +# https://metamanager.wiki/en/latest/defaults/both/collectionless.html # +############################################################################## + +translations: + pmm: translations + +templates: + collectionless: + default: + exclude_prefix: + - "!" + - "~" + summary: <> + name: <> + sort_title: ~_Collectionless + collection_order: alpha + url_poster: https://raw.githubusercontent.com/meisnate12/Plex-Meta-Manager-Images/master/collectionless.jpg + optional: + - collection_mode + - exclude + url_poster: <> + collection_mode: hide + collection_order: <> + sort_title: <> + sync_mode: sync + summary: <>> + name: <> + plex_collectionless: + exclude_prefix: <> + exclude: <> + +collections: + Collectionless: + template: + - name: collectionless + - name: translation \ No newline at end of file diff --git a/defaults/translations/CHANGELOG b/defaults/translations/CHANGELOG index 6e99e583..57889cf1 100644 --- a/defaults/translations/CHANGELOG +++ b/defaults/translations/CHANGELOG @@ -1,4 +1,9 @@ +1.18.0.6 -> 1.18.0.7 + +Added collectionless_name and collectionless_summary + 1.18.0.5 -> 1.18.0.6 + Added Key Name 'Malayalam' to be translated 1.18.0.4 -> 1.18.0.5 diff --git a/defaults/translations/default.yml b/defaults/translations/default.yml index cbf7e297..b01440b4 100644 --- a/defaults/translations/default.yml +++ b/defaults/translations/default.yml @@ -422,6 +422,9 @@ translations: audio_language_other_name: Other Audio audio_language_other_summary: <>s filmed in other uncommon Languages. + collectionless_name: Collectionless + collectionless_summary: Collection of <>s used to make Plex display items correctly. + # example key_name: TV-MA content_rating_name: <> <>s content_rating_summary: <>s that are rated <>. diff --git a/docs/conf.py b/docs/conf.py index fe4c873f..a0ab2e68 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -227,6 +227,7 @@ html_theme_options = { ("_menu", "Movie", "defaults/separators", [ ("Actors", "defaults/both/actor"), ("Audio Languages", "defaults/both/audio_language"), + ("Collectionless", "defaults/both/collectionless"), ("Common Sense Media Content Ratings", "defaults/both/content_rating_cs"), ("MyAnimeList Content Ratings", "defaults/both/content_rating_mal"), ("Content Ratings (US)", "defaults/movie/content_rating_us"), @@ -250,6 +251,7 @@ html_theme_options = { ("_menu", "Show", "defaults/separators", [ ("Actors", "defaults/both/actor"), ("Audio Languages", "defaults/both/audio_language"), + ("Collectionless", "defaults/both/collectionless"), ("Common Sense Media Content Ratings", "defaults/both/content_rating_cs"), ("MyAnimeList Content Ratings", "defaults/both/content_rating_mal"), ("US Content Ratings", "defaults/show/content_rating_us"), diff --git a/docs/defaults/both/collectionless.md b/docs/defaults/both/collectionless.md new file mode 100644 index 00000000..37413ee3 --- /dev/null +++ b/docs/defaults/both/collectionless.md @@ -0,0 +1,69 @@ +# Collectionless Collection + +The `collectionless` Default Metadata File is used to create a [Collectionless collection](../../metadata/builders/plex.md#plex-collectionless) to help Show/Hide Movies/Shows properly in your library. + +**For this file to work it needs to run last under `metadata_path` and all other normal collections must use `collection_mode: hide_items`.** + +**This file works with Movie and Show Libraries.** + +![](../images/collectionless.png) + +## Collection + +| Collection | Description | +|:-----------------|:-------------------------------------------------------------------------------------------------------------------------------------------| +| `Collectionless` | [Collectionless collection](../../metadata/builders/plex.md#plex-collectionless) to help Show/Hide Movies/Shows properly in your library.. | + +## Config + +The below YAML in your config.yml will create the collections: + +```yaml +libraries: + Movies: + metadata_path: + - pmm: collectionless + TV Shows: + metadata_path: + - pmm: collectionless +``` + +## Template Variables + +Template Variables can be used to manipulate the file in various ways to slightly change how it works without having to make your own local copy. + +Note that the `templates_variables:` section only needs to be used if you do want to actually change how the defaults work. Any value not specified is its default value if it has one if not it's just ignored. + +**[Shared Collection Variables](../variables) are NOT available to this default file.** + +| Variable | Description & Values | +|:-------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `name` | **Description:** Changes the name of the collection.
**Values:** New Collection Name | +| `summary` | **Description:** Changes the summary of the collection.
**Values:** New Collection Summary | +| `sort_title` | **Description:** Sets the sort title for the collection.
**Default:** `~_Collectionless`
**Values:** Any String | +| `collection_order` | **Description:** Changes the Collection Order for all collections in this file.
**Default:** `alpha`
**Values:**
`release`Order Collection by Release Dates
`alpha`Order Collection Alphabetically
`custom`Order Collection Via the Builder Order
[Any `plex_search` Sort Option](../../metadata/builders/plex.md#sort-options)Order Collection by any `plex_search` Sort Option
| +| `url_poster` | **Description:** Changes the poster url of thecollection.
**Values:** URL directly to the Image | +| `exclude` | **Description:** Exclude these Collections from being considered for collectionless.
**Values:** List of Collections | +| `exclude_prefix` | **Description:** Overrides the [default exclude_prefix list](#default-exclude_prefix). Exclude Collections with one of these prefixes from being considered for collectionless.
**Default:** [default exclude_prefix list](#default-exclude_prefix)
**Values:** List of Prefixes | | + + +The below is an example config.yml extract with some Template Variables added in to change how the file works. + +```yaml +libraries: + Movies: + metadata_path: + - pmm: collectionless + template_variables: + exclude: + - Marvel Cinematic Universe + collection_order: release +``` + +## Default `exclude_prefix` + +```yaml +exclude_prefix: + - "!" + - "~" +``` \ No newline at end of file diff --git a/docs/defaults/collections.md b/docs/defaults/collections.md index f94c3f0b..f1d919e2 100644 --- a/docs/defaults/collections.md +++ b/docs/defaults/collections.md @@ -40,6 +40,7 @@ These collections are applied by calling the below paths into the `metadata_path |:------------------------------------------------------------------------------------|:--------------------:|:-------------------------------------------------------|:-----------------:|:----------------:| | [Actor](both/actor) | `actor` | Chris Hemsworth, Margot Robbie | ✅ | ✅ | | [Audio Language](both/audio_language) | `audio_language` | French Audio, Korean Audio | ✅ | ✅ | +| [Collectionless](both/collectionless) | `collectionless` | Collectionless | ✅ | ✅ | | [Common Sense Content Rating](both/content_rating_cs) | `content_rating_cs` | 1, 2, 3, 4, 5, 6, 15, 16, 17, 18 | ✅ | ✅ | | [MyAnimeList Content Rating](both/content_rating_mal) | `content_rating_mal` | G, PG, PG-13, R, R+, Rx | ✅ | ✅ | | [Content Rating (UK)](both/content_rating_uk) | `content_rating_uk` | U, PG, 12A | ✅ | ✅ | diff --git a/docs/defaults/variables.md b/docs/defaults/variables.md index 8a811486..8d0f0e9a 100644 --- a/docs/defaults/variables.md +++ b/docs/defaults/variables.md @@ -1,6 +1,6 @@ # Shared Collection Template Variables -There are some `templates_variables` that all the PMM Defaults except `franchise` can use to manipulate the file from the default settings which are provided. +There are some `templates_variables` that all the PMM Defaults except [`franchise`](movie/franchise) and [`collectionless`](both/collectionless) can use to manipulate the file from the default settings which are provided. Note that the `templates_variables:` section only needs to be used if you do want to actually change how the defaults work. Any value not specified is its default value if it has one if not it's just ignored. diff --git a/docs/home/environmental.md b/docs/home/environmental.md index 5ce516b5..45191bad 100644 --- a/docs/home/environmental.md +++ b/docs/home/environmental.md @@ -12,6 +12,8 @@ These docs are assuming you have a basic understanding of Docker concepts. One | [Time to Run](#time-to-run) | `-t` or `--time` | `PMM_TIME` | | [Run](#run) | `-r` or `--run` | `PMM_RUN` | | [Run Tests](#run-tests) | `-rt`, `--tests`, or `--run-tests` | `PMM_TEST` | +| [Debug](#debug) | `-db` or `--debug` | `PMM_DEBUG` | +| [Trace](#trace) | `-tr` or `--trace` | `PMM_TRACE` | | [Timeout](#timeout) | `-ti` or `--timeout` | `PMM_TIMEOUT` | | [Collections Only](#collections-only) | `-co` or `--collections-only` | `PMM_COLLECTIONS_ONLY` | | [Playlists Only](#playlists-only) | `-po` or `--playlists-only` | `PMM_PLAYLISTS_ONLY` | @@ -174,7 +176,7 @@ docker run -it -v "X:\Media\Plex Meta Manager\config:/config:rw" meisnate12/plex ### Run Tests -Run Plex Meta Manager in test/debug mode +Perform a debug test run immediately, bypassing the time to run flag. This will only run collections with `test: true` in the definition. @@ -213,9 +215,87 @@ docker run -it -v "X:\Media\Plex Meta Manager\config:/config:rw" meisnate12/plex +### Debug + +Run with Debug Logs Reporting to the Command Window. + +
+ + + + + + + + + + + + + + + +
ShellEnvironment
Flags-db or --debugPMM_DEBUG
Example--debugPMM_TIMEOUT=true
+ +
+ Local Environment + +```shell +python plex_meta_manager.py --debug +``` + +
+
+ Docker Environment + +```shell +docker run -it -v "X:\Media\Plex Meta Manager\config:/config:rw" meisnate12/plex-meta-manager --debug +``` + +
+ +### Trace + +Run with extra Trace Debug Logs. + + + + + + + + + + + + + + + + + +
ShellEnvironment
Flags-tr or --tracePMM_TIMEOUT
Example--tracePMM_TRACE=true
+ +
+ Local Environment + +```shell +python plex_meta_manager.py --trace +``` + +
+
+ Docker Environment + +```shell +docker run -it -v "X:\Media\Plex Meta Manager\config:/config:rw" meisnate12/plex-meta-manager --trace0 +``` + +
+ ### Timeout -Change the main Plex Meta Manager timeout. +Change the main Plex Meta Manager timeout. This timeout is overwritten byt those in your config file for those services. @@ -239,7 +319,7 @@ Change the main Plex Meta Manager timeout. Local Environment ```shell -python plex_meta_manager.py ---timeout 360 +python plex_meta_manager.py --timeout 360 ``` @@ -247,7 +327,7 @@ python plex_meta_manager.py ---timeout 360 Docker Environment ```shell -docker run -it -v "X:\Media\Plex Meta Manager\config:/config:rw" meisnate12/plex-meta-manager ---timeout 360 +docker run -it -v "X:\Media\Plex Meta Manager\config:/config:rw" meisnate12/plex-meta-manager --timeout 360 ``` @@ -411,7 +491,7 @@ docker run -it -v "X:\Media\Plex Meta Manager\config:/config:rw" meisnate12/plex ### Run Collections -Run only the pre-defined collections +Perform a collections run immediately to run only the pre-defined collections, bypassing the time to run flag.
@@ -454,7 +534,7 @@ docker run -it -v "X:\Media\Plex Meta Manager\config:/config:rw" meisnate12/plex ### Run Libraries -Run only the pre-defined libraries +Perform a libraries run immediately to run only the pre-defined libraries, bypassing the time to run flag.
@@ -497,7 +577,7 @@ docker run -it -v "X:\Media\Plex Meta Manager\config:/config:rw" meisnate12/plex ### Run Metadata Files -Run only the pre-defined metadata files +Perform a metadata files run immediately to run only the pre-defined metadata files, bypassing the time to run flag.
@@ -736,7 +816,8 @@ docker run -it -v "X:\Media\Plex Meta Manager\config:/config:rw" meisnate12/plex ### Resume Run -Resume a run from a specific collection use the `--resume` option. + +Perform a resume run immediately resuming from the first instance of the specified collection, bypassing the time to run flag.
@@ -857,7 +938,7 @@ docker run -it -v "X:\Media\Plex Meta Manager\config:/config:rw" meisnate12/plex ### No Report -Run without saving report. +Run without saving the report.
@@ -896,7 +977,7 @@ docker run -it -v "X:\Media\Plex Meta Manager\config:/config:rw" meisnate12/plex ### Read Only Config -Run without writing to the configuration file +Run without writing to the configuration file.
@@ -935,7 +1016,7 @@ docker run -it -v "X:\Media\Plex Meta Manager\config:/config:rw" meisnate12/plex ### Divider Character & Screen Width -Change the terminal output divider character or width +Change the terminal output divider character or width. #### Divider Character diff --git a/docs/metadata/builders/plex.md b/docs/metadata/builders/plex.md index f3225c00..20dd15d4 100644 --- a/docs/metadata/builders/plex.md +++ b/docs/metadata/builders/plex.md @@ -76,18 +76,25 @@ To combat the problem above you set all collections to `Hide items in this colle With the variability of collections generated by the Plex Meta Manager maintaining a collection like this becomes very difficult, so in order to automate it, you can use `plex_collectionless`. You just have to tell it what collections to exclude or what collection prefixes to exclude. -There are two attributes for `plex_collectionless`, `exclude` (To exclude specific collections) and `exclude_prefix` (To exclude every collection whose title or sort title starts with the prefix). At least one exclusion is required. +There are two attributes for `plex_collectionless`: +* `exclude`: Exclude these Collections from being considered for collectionless. +* `exclude_prefix` Exclude Collections whose title or sort title starts with a prefix from being considered for collectionless. + +**At least one exclusion is required.** ```yaml collections: Collectionless: plex_collectionless: exclude_prefix: - - + - - ~ - exclude: Marvel Cinematic Universe + - "!" + - "+" + - "~" + exclude: + - Marvel Cinematic Universe sort_title: ~_Collectionless collection_order: alpha + collection_mode: hide ``` * Both `exclude` and `exclude_prefix` can take multiple values as a List. diff --git a/plex_meta_manager.py b/plex_meta_manager.py index 8e22ff32..d9648f02 100644 --- a/plex_meta_manager.py +++ b/plex_meta_manager.py @@ -18,8 +18,8 @@ if sys.version_info[0] != 3 or sys.version_info[1] < 7: sys.exit(0) parser = argparse.ArgumentParser() -parser.add_argument("-db", "--debug", dest="debug", help=argparse.SUPPRESS, action="store_true", default=False) -parser.add_argument("-tr", "--trace", dest="trace", help=argparse.SUPPRESS, action="store_true", default=False) +parser.add_argument("-db", "--debug", dest="debug", help="Run with Debug Logs Reporting to the Command Window", action="store_true", default=False) +parser.add_argument("-tr", "--trace", dest="trace", help="Run with extra Trace Debug Logs", action="store_true", default=False) parser.add_argument("-c", "--config", dest="config", help="Run with desired *.yml file", type=str) parser.add_argument("-t", "--time", "--times", dest="times", help="Times to update each day use format HH:MM (Default: 05:00) (comma-separated list)", default="05:00", type=str) parser.add_argument("-ti", "--timeout", dest="timeout", help="PMM Global Timeout (Default: 180)", default=180, type=int)