Plex Meta Manager - Liberate Your Library with Auto Collections & More


Recommended Posts

  • 1 month later...
  • 4 weeks later...

I'm having trouble getting this to work. I'm running binhex-plexpass on my host network.

When i run the python script in the container, i see:

|========================================================================================================================================================================================================|
|                                                                                                                                                                                                        |
|                                                          ____  _             __  __      _          __  __                                                                                             |
|                                                         |  _ \| | _____  __ |  \/  | ___| |_ __ _  |  \/  | __ _ _ __   __ _  __ _  ___ _ __                                                           |
|                                                         | |_) | |/ _ \ \/ / | |\/| |/ _ \ __/ _` | | |\/| |/ _` | '_ \ / _` |/ _` |/ _ \ '__|                                                          |
|                                                         |  __/| |  __/>  <  | |  | |  __/ || (_| | | |  | | (_| | | | | (_| | (_| |  __/ |                                                             |
|                                                         |_|   |_|\___/_/\_\ |_|  |_|\___|\__\__,_| |_|  |_|\__,_|_| |_|\__,_|\__, |\___|_|                                                             |
|                                                                                                                              |___/                                                                     |
|     Version: 1.15.1                                                                                                                                                                                    |
|========================================================================================================================================================================================================|
|                                                                                              Starting Run                                                                                              |
|========================================================================================================================================================================================================|
| Locating config...                                                                                                                                                                                     |
| Using //config/config.yml as config                                                                                                                                                                    |
|========================================================================================================================================================================================================|
| Initializing cache database at //config/config.cache                                                                                                                                                   |
|========================================================================================================================================================================================================|
| notifiarr attribute not found                                                                                                                                                                          |
|========================================================================================================================================================================================================|
| Connecting to TMDb...                                                                                                                                                                                  |
| TMDb Connection Successful                                                                                                                                                                             |
|========================================================================================================================================================================================================|
| omdb attribute not found                                                                                                                                                                               |
|========================================================================================================================================================================================================|
| Connecting to Trakt...                                                                                                                                                                                 |
| Config Error: trakt sub-attribute client_id is blank                                                                                                                                                   |
| Trakt Connection Failed                                                                                                                                                                                |
|========================================================================================================================================================================================================|
| mal attribute not found                                                                                                                                                                                |
|========================================================================================================================================================================================================|
| playlist_files attribute not found                                                                                                                                                                     |
|========================================================================================================================================================================================================|
| Connecting to Plex Libraries...                                                                                                                                                                        |
|========================================================================================================================================================================================================|
|                                                                                          Movies Configuration                                                                                          |
|========================================================================================================================================================================================================|
|                                                                                                                                                                                                        |
| Connecting to Movies Library...                                                                                                                                                                        |
|                                                                                                                                                                                                        |
| Loading Metadata File: config/Movies.yml                                                                                                                                                               |
| YAML Error: File Error: File does not exist /config/Movies.yml                                                                                                                                         |
|                                                                                                                                                                                                        |
| Loading Metadata Git: meisnate12/MovieCharts                                                                                                                                                           |
| Metadata File Loaded Successfully                                                                                                                                                                      |
|                                                                                                                                                                                                        |
| Loading Metadata Git: meisnate12/Studios                                                                                                                                                               |
| Metadata File Loaded Successfully                                                                                                                                                                      |
|                                                                                                                                                                                                        |
| Loading Metadata Git: meisnate12/IMDBGenres                                                                                                                                                            |
| Metadata File Loaded Successfully                                                                                                                                                                      |
|                                                                                                                                                                                                        |
| Loading Metadata Git: meisnate12/People                                                                                                                                                                |
| Metadata File Loaded Successfully                                                                                                                                                                      |
|                                                                                                                                                                                                        |
| Using Asset Directory: //config/assets                                                                                                                                                                 |
|                                                                                                                                                                                                        |
| Plex Error: Plex url is invalid                                                                                                                                                                        |
|                                                                                                                                                                                                        |
| Movies Library Connection Failed                                                                                                                                                                       |
|========================================================================================================================================================================================================|
|                                                                                            TV Configuration                                                                                            |
|========================================================================================================================================================================================================|
|                                                                                                                                                                                                        |
| Connecting to TV Library...                                                                                                                                                                            |
|                                                                                                                                                                                                        |
| Loading Metadata File: config/TV.yml                                                                                                                                                                   |
| YAML Error: File Error: File does not exist /config/TV.yml                                                                                                                                             |
|                                                                                                                                                                                                        |
| Loading Metadata Git: meisnate12/ShowCharts                                                                                                                                                            |
| Metadata File Loaded Successfully                                                                                                                                                                      |
|                                                                                                                                                                                                        |
| Loading Metadata Git: meisnate12/Networks                                                                                                                                                              |
| Metadata File Loaded Successfully                                                                                                                                                                      |
|                                                                                                                                                                                                        |
| Using Asset Directory: //config/assets                                                                                                                                                                 |
|                                                                                                                                                                                                        |
| Plex Error: Plex url is invalid                                                                                                                                                                        |
|                                                                                                                                                                                                        |
| TV Library Connection Failed                                                                                                                                                                           |
|========================================================================================================================================================================================================|
| Plex Error: No Plex libraries were connected to                                                                                                                                                        |
|                                                                                                                                                                                                        |
|========================================================================================================================================================================================================|
|                                                                                              Finished Run                                                                                              |
|                                                                            Finished: 22:39:53 2022-02-09 Run Time: 0:00:00                                                                             |
|========================================================================================================================================================================================================|
# 

 

I verified that the Plex URL is correct -- i visited it in the browser and i was able to connect. And i validated i had the correct token in there as well. Any thoughts?

 

Edit: I'm not thrilled about it, but i figured it out. I had to switch "Secure Connection: Required" to "Secure Connection: Preferred" in Plex Network settings, and i had to use HTTP in the config.yml. It's possible this is because there is no valid certificate configured on my Plex app.

Edited by mmwilson0
Link to comment
  • 4 weeks later...
  • 3 weeks later...
  • 2 months later...

I'm using the linuxserver version of this and I'm having trouble getting it to accept the command line arguments.

 

I've found the plex_meta_manager.py and tried running:
 

python plex_meta_manager.py --delete-collections

 

But it doesn't accept the --delete-collections and behaves the same as when I run:
python plex_meta_manager.py

 

image.thumb.png.79b44154d805b12e77a0ffbe0ecd5397.png

 

image.thumb.png.dfee8db88c62440d21fe43b98a5251bc.png

 

Edit:
Found a work around by installing it into a linux vm and running it from there.

 

I had a huge amount of collections that had been erroneously created repeatedly ( eg. 40+ best of 2019, 2018 etc. ) that would have been a rfeal pain to delete manually.

 

Further Edit as actually that just helped me figure out what was the real problem:

 

Okay, actually PMM makes it difficult to figure out how the delete collections command works.

 

It actually tells it to delete the collections just before it refreshes them.

 

So as it is hard coded to run at scheduled times it won't delete them immediately.

 

To get around this I combined -r with -dc so it would delete the collections then rebuild them immediately after sending the command.

Edited by dodgypast
Found a work around
Link to comment
  • 5 months later...

Hi can anyone help me out with this.. have followed the ibracorp video and web guide and default configs for movies & tv but getting this error:

 

# python plex_meta_manager.py -r
|========================================================================================================================================================================================================|
|                                                                                                                                                                                                        |
|                                                          ____  _             __  __      _          __  __                                                                                             |
|                                                         |  _ \| | _____  __ |  \/  | ___| |_ __ _  |  \/  | __ _ _ __   __ _  __ _  ___ _ __                                                           |
|                                                         | |_) | |/ _ \ \/ / | |\/| |/ _ \ __/ _` | | |\/| |/ _` | '_ \ / _` |/ _` |/ _ \ '__|                                                          |
|                                                         |  __/| |  __/>  <  | |  | |  __/ || (_| | | |  | | (_| | | | | (_| | (_| |  __/ |                                                             |
|                                                         |_|   |_|\___/_/\_\ |_|  |_|\___|\__\__,_| |_|  |_|\__,_|_| |_|\__,_|\__, |\___|_|                                                             |
|                                                                                                                              |___/                                                                     |
|     Version: 1.17.3                                                                                                                                                                                    |
|========================================================================================================================================================================================================|
| --config (PMM_CONFIG): None                                                                                                                                                                            |
| --time (PMM_TIME): 6:00                                                                                                                                                                                |
| --run (PMM_RUN): True                                                                                                                                                                                  |
| --run-tests (PMM_TEST): False                                                                                                                                                                          |
| --collections-only (PMM_COLLECTIONS_ONLY): False                                                                                                                                                       |
| --playlists-only (PMM_PLAYLISTS_ONLY): False                                                                                                                                                           |
| --operations (PMM_OPERATIONS): False                                                                                                                                                                   |
| --overlays (PMM_OVERLAYS): False                                                                                                                                                                       |
| --libraries-first (PMM_LIBRARIES_FIRST): False                                                                                                                                                         |
| --run-collections (PMM_COLLECTIONS): None                                                                                                                                                              |
| --run-libraries (PMM_LIBRARIES): None                                                                                                                                                                  |
| --run-metadata-files (PMM_METADATA_FILES): None                                                                                                                                                        |
| --ignore-schedules (PMM_IGNORE_SCHEDULES): False                                                                                                                                                       |
| --ignore-ghost (PMM_IGNORE_GHOST): False                                                                                                                                                               |
| --cache-libraries (PMM_CACHE_LIBRARIES): False                                                                                                                                                         |
| --delete-collections (PMM_DELETE_COLLECTIONS): False                                                                                                                                                   |
| --resume (PMM_RESUME): None                                                                                                                                                                            |
| --no-countdown (PMM_NO_COUNTDOWN): False                                                                                                                                                               |
| --no-missing (PMM_NO_MISSING): False                                                                                                                                                                   |
| --read-only-config (PMM_READ_ONLY_CONFIG): False                                                                                                                                                       |
| --divider (PMM_DIVIDER): =                                                                                                                                                                             |
| --width (PMM_WIDTH): 200                                                                                                                                                                               |
| --debug (PMM_DEBUG): False                                                                                                                                                                             |
| --trace (PMM_TRACE): False                                                                                                                                                                             |
|                                                                                                                                                                                                        |
|========================================================================================================================================================================================================|
|                                                                                              Starting Run                                                                                              |
|========================================================================================================================================================================================================|
| Locating config...                                                                                                                                                                                     |
| Using //config/config.yml as config                                                                                                                                                                    |
| Traceback (most recent call last):                                                                                                                                                                     |
|   File "/modules/util.py", line 828, in __init__                                                                                                                                                       |
|     self.data = self.yaml.load(fp)                                                                                                                                                                     |
|   File "/usr/local/lib/python3.10/site-packages/ruamel/yaml/main.py", line 434, in load                                                                                                                |
|     return constructor.get_single_data()                                                                                                                                                               |
|   File "/usr/local/lib/python3.10/site-packages/ruamel/yaml/constructor.py", line 119, in get_single_data                                                                                              |
|     node = self.composer.get_single_node()                                                                                                                                                             |
|   File "/usr/local/lib/python3.10/site-packages/ruamel/yaml/composer.py", line 76, in get_single_node                                                                                                  |
|     document = self.compose_document()                                                                                                                                                                 |
|   File "/usr/local/lib/python3.10/site-packages/ruamel/yaml/composer.py", line 99, in compose_document                                                                                                 |
|     node = self.compose_node(None, None)                                                                                                                                                               |
|   File "/usr/local/lib/python3.10/site-packages/ruamel/yaml/composer.py", line 143, in compose_node                                                                                                    |
|     node = self.compose_mapping_node(anchor)                                                                                                                                                           |
|   File "/usr/local/lib/python3.10/site-packages/ruamel/yaml/composer.py", line 223, in compose_mapping_node                                                                                            |
|     item_value = self.compose_node(node, item_key)                                                                                                                                                     |
|   File "/usr/local/lib/python3.10/site-packages/ruamel/yaml/composer.py", line 143, in compose_node                                                                                                    |
|     node = self.compose_mapping_node(anchor)                                                                                                                                                           |
|   File "/usr/local/lib/python3.10/site-packages/ruamel/yaml/composer.py", line 216, in compose_mapping_node                                                                                            |
|     while not self.parser.check_event(MappingEndEvent):                                                                                                                                                |
|   File "/usr/local/lib/python3.10/site-packages/ruamel/yaml/parser.py", line 146, in check_event                                                                                                       |
|     self.current_event = self.state()                                                                                                                                                                  |
|   File "/usr/local/lib/python3.10/site-packages/ruamel/yaml/parser.py", line 612, in parse_block_mapping_key                                                                                           |
|     raise ParserError(                                                                                                                                                                                 |
| ruamel.yaml.parser.ParserError: while parsing a block mapping                                                                                                                                          |
|   in "//config/config.yml", line 4, column 2                                                                                                                                                           |
| expected <block end>, but found '<block mapping start>'                                                                                                                                                |
|   in "//config/config.yml", line 11, column 3                                                                                                                                                          |
|                                                                                                                                                                                                        |
| During handling of the above exception, another exception occurred:                                                                                                                                    |
|                                                                                                                                                                                                        |
| Traceback (most recent call last):                                                                                                                                                                     |
|   File "//plex_meta_manager.py", line 229, in start                                                                                                                                                    |
|     config = ConfigFile(default_dir, attrs)                                                                                                                                                            |
|   File "/modules/config.py", line 92, in __init__                                                                                                                                                      |
|     loaded_yaml = YAML(self.config_path)                                                                                                                                                               |
|   File "/modules/util.py", line 831, in __init__                                                                                                                                                       |
|     raise Failed(f"YAML Error: {e}")                                                                                                                                                                   |
| modules.util.Failed: YAML Error: while parsing a block mapping                                                                                                                                         |
|         in "//config/config.yml", line 4, column 2                                                                                                                                                     |
|       expected <block end>, but found '<block mapping start>'                                                                                                                                          |
|         in "//config/config.yml", line 11, column 3                                                                                                                                                    |
|                                                                                                                                                                                                        |
| YAML Error: while parsing a block mapping                                                                                                                                                              |
|         in "//config/config.yml", line 4, column 2                                                                                                                                                     |
|       expected <block end>, but found '<block mapping start>'                                                                                                                                          |
|         in "//config/config.yml", line 11, column 3                                                                                                                                                    |
|                                                                                                                                                                                                        |
|========================================================================================================================================================================================================|
|                                                                                              Finished Run                                                                                              |
|                                                                                            Version: 1.17.3                                                                                             |
|                                                                            Finished: 16:46:40 2022-11-02 Run Time: 0:00:00                                                                             |
|========================================================================================================================================================================================================|
# 

 

And this is my config file:

## This file is a template remove the .template to use the file

libraries:                                      # This is called out once within the config.yml file                                       
 My Films:
    metadata_path:
      - file: config/Movies.yml
      - git: meisnate12/MovieCharts
      - git: meisnate12/Studios
      - git: meisnate12/IMDBGenres
      - git: meisnate12/People
  My TV Shows:                           
    metadata_path:
      - file: config/TV.yml
      - git: meisnate12/ShowCharts
      - git: meisnate12/Networks
settings:                  # Can be individually specified per library as well
  cache: true
  cache_expiration: 60
  asset_directory: config/assets
  asset_folders: true
  assets_for_all: false
  sync_mode: append
  show_unmanaged: true
  show_filtered: false
  show_missing: true
  save_missing: true
  run_again_delay: 2
  missing_only_released: false
  create_asset_folders: false
  collection_minimum: 1
  delete_below_minimum: false
  tvdb_language: default
  show_missing_assets: true
plex:                                          # Can be individually specified per library as well
  url: (redacted)
  token: (redacted)
  timeout: 60
  clean_bundles: false
  empty_trash: false
  optimize: false
tmdb:                                           
  apikey: (redacted)
  language: en
tautulli:                                       # Can be individually specified per library as well
  url: (redacted)
  apikey: (redacted)
radarr:                                         # Can be individually specified per library as well
  url: (redacted)
  token: (redacted)
  version: (redacted)
  add: false
  root_folder_path: /data/media/movies
  monitor: true
  availability: announced
  quality_profile: HD - 720p/1080p
  tag:
  search: false
  add_existing: false
sonarr:                                         # Can be individually specified per library as well
  url: (redacted)
  token: (redacted)
  version: (redacted)
  add: false
  root_folder_path: /data/media/tv
  monitor: all
  quality_profile: Any
  language_profile: English
  series_type: standard
  season_folder: true
  tag:
  search: false
  cutoff_search: false
  add_existing: false

 

Edited by dopeytree
Link to comment
  • 5 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.